HTML Entity Encoder / Decoder
An HTML Entity Encoder/Decoder converts characters to their HTML entity equivalents — such as ampersand to & and less-than to < — and decodes entities back to plain characters, all in your browser so your text never leaves the page.
About HTML Entity Encoder / Decoder
Encode mode escapes the characters that break HTML — ampersand, angle brackets, and quote characters — and can optionally encode all non-ASCII characters as numeric entities for maximum compatibility. Decode mode turns named and numeric entities back into their characters using the browser's own HTML parser, so it understands the full entity set. Use it to safely display code in a page, debug mojibake, or clean up scraped markup. Nothing is uploaded.
What HTML Entity Encoder / Decoder does
- Encode the five special HTML characters
- Optionally encode all non-ASCII as numeric entities
- Decode named and numeric entities via the native HTML parser
- Handles the full standard entity set on decode
- One-click copy of the result
- Runs entirely in your browser — nothing uploaded
When to reach for HTML Entity Encoder / Decoder
- Displaying code or markup as text on a web page
- Escaping content before injecting it into HTML
- Decoding entities in scraped or exported content
- Debugging double-encoded strings
How to use HTML Entity Encoder / Decoder
- 01
Choose a mode
Pick encode or decode.
- 02
Paste your text
Enter plain text to encode, or entities to decode.
- 03
Copy the result
Copy the converted output with one click.
When to use HTML Entity Encoder / Decoder vs alternatives
| Alternative | Use HTML Entity Encoder / Decoder when… | Use the alternative when… |
|---|---|---|
| Writing an escape function by hand | you want a quick check without wiring up code. | you need escaping inside your own template layer. |
| url-encoder | your target is HTML markup. | your target is a URL or query string. |