HTML Entities Encode & Decode
Escape text for safe use in HTML, turn accents and symbols into entities, or decode entities back to characters.
Runs in your browser — nothing is uploaded.
Copied
How to use it
- Pick Encode or Decode and paste your text. The result updates as you type.
- When encoding, “Only unsafe characters” escapes & < > " and the apostrophe; “All non-ASCII” also converts accents, symbols and emoji.
- Choose named (©), decimal (©) or hex (©) references. Characters without a name use a number.
Frequently asked questions
Is my text uploaded?
No. Everything runs in your browser.
Which characters are unsafe?
Five of them: & < > " and the apostrophe. Escaping those is what keeps text from being read as markup.
Why is the apostrophe ' and not '?
' does not exist in HTML 4 and some old parsers ignore it; ' works everywhere.
Which named entities can it decode?
The five XML ones, all of Latin-1 ( , é, ©…) and a table of common symbols (€, …, →…). Any other name is left as typed. Numeric references always work.
What happens with invalid numeric references?
Zero, surrogates and numbers above U+10FFFF become the replacement character U+FFFD, as browsers do.
Related tools
URL Encode & Decode
Percent-encode and decode URLs and query strings online: encodeURIComponent, encodeURI and form encoding (+ for spaces). Private, in your browser.
String Escape & Unescape
Escape and unescape strings for JSON, JavaScript, PHP (single and double quotes), SQL, MySQL, CSV and regular expressions. Private, in your browser.
Unicode Inspector
Inspect every character of a text: code point, category, UTF-8 and UTF-16 bytes. Spots zero-width characters, bidi controls, odd spaces and look-alikes.