Display code in HTML
Encode angle brackets so code examples render as text instead of elements.
Free browser tool
This HTML entity encoder and decoder converts characters such as angle brackets, ampersands, quotes, and apostrophes into HTML-safe entities. It also decodes common entities back into readable text for inspection or cleanup.
HTML entities are useful when displaying code examples, escaping text that should not become markup, or debugging copied content from pages and templates.
Encode special HTML characters or decode HTML entities.
HTML entities represent special characters as safe text. For example, < becomes < and & becomes &. This matters when you want to display code, snippets, or user-provided text without letting it become active markup.
This encoder focuses on common escaping for examples and templates. It is useful for docs, blog posts, support replies, and quick cleanup of copied HTML entity text. It is not a complete HTML sanitizer for untrusted markup.
Encode angle brackets so code examples render as text instead of elements.
Turn entity-heavy text back into readable characters.
Escape text snippets before placing them in static HTML examples.
The encoded output can be displayed inside HTML without being parsed as a real button element.
<button aria-label="Save">Save</button><button aria-label="Save">Save</button>Escaping text helps display it safely, but sanitizing arbitrary HTML is a separate security task.
Double-encoded text can show visible entities such as &lt; instead of <.
Ampersands should be encoded first so new entity-looking text is not created accidentally.
Escape code examples for HTML pages.
Decode copied HTML entity text.
Avoid accidental markup in examples and snippets.
Encode snippets that should be shown as text, not executed as markup.
Decode entity-heavy content before making human edits.
For untrusted HTML, use a trusted sanitizer in your application stack.
HTML entities let special characters display as text instead of being interpreted as markup.
Good slugs are short, descriptive, lowercase, hyphen-separated, and stable enough to preserve links over time.
Different systems prefer different naming conventions. Knowing the common case formats makes APIs and code easier to keep consistent.
The tool encodes ampersands, angle brackets, double quotes, and apostrophes.
No. It is an encoder/decoder, not a security sanitizer for untrusted HTML.
Yes. The browser's HTML parser decodes common named and numeric entities.
The tool runs in your browser and does not require login, a database, or server-side processing.