HTML Entity Encoder & Decoder
Encode and decode HTML entities — free, with named or numeric (decimal/hex) output and optional full non-ASCII encoding. 100% in your browser.
100% private — runs entirely in your browser. Nothing you enter is uploaded or logged.
Only five characters strictly need escaping in HTML: & < > " '. Encoding runs locally — nothing is uploaded. Decoding handles double-encoded text if you run it twice.
How to use the HTML Entity Encoder & Decoder
- Choose encode or decode.
- Paste your text.
- Pick named or numeric entities (encode mode).
- Copy the result.
What you can use it for
- Escape < > & so code shows as text
- Decode &-style entities back to characters
- Fix double-encoded text
- Display HTML snippets safely in a page
More free tools
Wrangling code or data?
Format, encode, hash and minify with our free developer tools — 100% in your browser.
Browse all free developer tools →Frequently asked questions
How do I encode <, > and & for HTML?
Paste your text in encode mode and the tool escapes them to <, > and & so they display as text instead of markup.
What's the difference between &amp; and &#38;?
Both represent an ampersand — & is the named entity and & is the numeric one; this tool can output either.
How do I decode double-encoded text?
Run the decoder twice — the first pass turns &amp; into &, the second into &.
How do I show code in HTML without it rendering?
Encode it first so the tags become entities, then paste the encoded version into your page.
Named or numeric entities — which should I use?
Named entities are more readable for the common characters; numeric entities work for any character, including emoji and other Unicode.