HTML Entity Encoder / Decoder
Escape < > & " ' to entities or restore <div> and A back to text — a staple for debugging front-end templates.
>_ USAGE GUIDE
Two-way conversion: turn < > & " ' into HTML entities, or restore <div> and A back to plain characters. Named entities (&, ) and numeric entities in decimal or hex form (A, A) are both recognized on decode.
- Encode: paste raw text and the escaped version appears in real time, safe to embed in any HTML page
- Decode: paste escaped markup and recover the original characters, including numeric forms
- Verify round trips: paste the decoded output back in to confirm nothing was double-escaped
Typical scenarios: showing code snippets on a blog or documentation page (unescaped < would be executed as a tag), debugging escaping issues in front-end templates, and auditing the HTML produced by rich-text editors. A useful debugging habit: paste a template's rendered output, encode it, and compare with the original source — any spot where escaping happened twice, such as a visible &lt; on the page, shows up immediately. Conversion runs locally in real time with zero uploads — content never leaves your device.
>_ FAQ
Q1 · What do < and & mean?
In HTML, characters like < and & carry special meaning — they start tags and entities. Entity notation writes them safely as &name; or &#number;: < is < (less than), & is &, and is a non-breaking space. When you view page source and see many < sequences, that is code that has been escaped for display.
Q2 · Why does the code I paste into a webpage never display correctly?
The browser parses <div> as an element, not as text. To display code as-is, <, >, and & must be escaped into entities — which is exactly what the encode direction of this tool does. Blog posts and CMS rich-text fields need this step (many Markdown renderers do it automatically; plain HTML environments do not).
Q3 · What is the difference between and a normal space?
is a non-breaking space: the layout engine will not wrap a line there, and consecutive occurrences are not collapsed into one. It keeps "3 km" from splitting across lines and aligns form fields. Regular spaces collapse — several in a row render as one — which is the most common source of spacing confusion in HTML.
Q4 · Why are A and A the same character?
Decimal 65 and hexadecimal 41 are both the Unicode code point of the letter A. Every character has up to three entity forms — a named entity when one is defined, decimal, and hex — and they are fully equivalent. Hex notation is more common in bulk character-to-entity output. Decode either form here to confirm.
Q5 · When must characters be escaped, and when can they stay?
Rules of thumb: an & in text must become & (otherwise it may be read as the start of an entity); a < in text must be escaped (it starts a tag); a > technically may stay but escaping it is good practice; quotes inside attribute values must be escaped when they match the wrapping quote. When unsure, escape everything — redundant escaping never changes rendering.