HTML Entity Encoder & Decoder
Escape raw text into HTML entities so code displays as text — or decode entities back into readable characters. Named, decimal and hex entities supported.
0 characters
0 characters
Everything stays in your browser. Nothing is uploaded or stored.
How to encode and decode HTML entities
- Paste your text into the Raw box and click Encode — or paste entity-filled text into the Encoded box and click Decode.
- Leave Live convert on and the other box updates as you type: typing raw text encodes it, typing entities decodes them.
- Copy the result. Encoded output is safe to paste into HTML, emails, or CMS editors without becoming real markup.
What gets encoded
Encoding escapes the five dangerous characters — &, <, >, quotes — and converts every non-ASCII character (accented letters, symbols, emoji) into a decimal numeric entity. That means the output is pure ASCII: it survives any encoding mismatch, email gateway, or legacy database column.
What decoding understands
Decoding reverses all three entity spellings: named (the common set — accented letters, punctuation, symbols, arrows, math), decimal (é), and hexadecimal (é). Decoding runs in a single pass, so double-encoded text like &lt; decodes one layer at a time — click Decode again for the next layer. Anything the decoder doesn't recognize is left untouched, never mangled.
- What is an HTML entity?
- An HTML entity is a text code that stands in for a character — for example, the code for an ampersand or for the letter e with an acute accent. Browsers render the character but never treat it as markup, which is why entities are used to display code safely.
- When should I encode HTML?
- Whenever you display user-written or code content inside a web page: comments, code samples, pasted text. Encoding ampersands, angle brackets and quotes stops the browser from interpreting the text as real tags — the core defense against cross-site scripting (XSS).
- What is the difference between named, decimal and hex entities?
- They are three spellings of the same idea: the named, decimal and hexadecimal forms of the copyright symbol all render as the same character. Named entities are readable; numeric ones cover every Unicode character, including emoji.
- What happens to entities this tool does not recognize?
- They are left exactly as-is. Partial entities missing their semicolon and unknown names are never guessed or removed, so decoding cannot corrupt your text.
- Is my text sent anywhere?
- No. Encoding and decoding happen entirely in your browser with JavaScript. Nothing is uploaded, stored, or tracked.
Kept alive by readers like you
Every tool in the codex is free. If they save you time, a small donation inscribes new pages.
DonateMore from the codex
HTML Entity Codec
Encode and decode HTML entities, named and numeric.
URL Encoder / Decoder
Encode/decode URLs and parse query strings.
Open tool → LiveBase64 Encoder
Encode and decode Base64, URL-safe too.
Open tool → LiveJSON Formatter
Validate, format, and minify JSON.
Open tool → LiveMarkdown Previewer
Write Markdown and preview it live.
Open tool → LiveFancy Text Generator
Bold, italic, script and 12 more unicode styles.
Open tool → LiveCase Converter
UPPER, lower, Title Case and more.
Open tool → LiveRegex Tester
Test regular expressions with live highlighting.
Open tool →