Escape text so it is safe inside HTML, or unescape escaped HTML again
Runs in your browser. Nothing you type is sent anywhere. Checked against sources on 16 Oct 2026.Five characters can break HTML or open it to script injection when user text is pasted in: the ampersand, the less-than and greater-than signs and both quote marks. Escaping writes them as &, <, >, " and ', which is enough for element text and quoted attribute values. Everything else, accents and emoji included, stays as it is.
Paste or type your input.
Choose the options you need.
Press Ctrl+Enter, then copy or download.
An HTML entity, or character reference, is a way of writing a character with plain ASCII: a name such as ©, a decimal number such as ©, or a hex number such as ©. A browser shows all three as ©.
Decoding follows the rules browsers use. All 2,125 names in the HTML standard are known, including the ones that stand for two characters. The 106 legacy names that work without a semicolon, such as © 2026, are decoded and flagged. �, surrogates and numbers past U+10FFFF become the replacement character, and € to Ÿ are read as Windows-1252, so – is an en dash, as in every browser. Text that is still encoded after one pass, such as &lt;, is pointed out, with a button to decode again.
The rest of the article, and all 6 questions about HTML Entity Encoder & Decoder, are on the HTML Entity Encoder & Decoder page.
Five characters need escaping when text goes into HTML: the ampersand as &, the less-than sign as <, the greater-than sign as >, the double quote as " and the apostrophe as '. Inside element text only & and < are strictly required, but escaping all five also keeps quoted attribute values safe.
Text that shows &lt; was encoded twice: the first pass turned < into <, and a second pass turned that ampersand into &. Decode it twice to get the original back. After each pass this tool counts the entities still present and offers one tap to run the decoder again.
Named entities such as é are easier to read, while numeric ones such as é or é work for every Unicode character, including emoji that have no name. A page saved as UTF-8 needs neither for accents; entities matter mainly for the five special characters and for systems limited to ASCII.
Yes, is the non-breaking space, U+00A0, also written   or  . A browser never breaks a line at it and never collapses several of them into one, unlike ordinary spaces. Overusing it for layout makes text hard to reflow on phones, so CSS margins are usually the better tool.
Rates and rules change; check the source before you rely on a figure.
Still stuck? Ask about HTML Entity Encoder & Decoder and anybody who knows can answer. No account needed.
Same job, other tools: Query String Parser – Split a URL query string into a table of decoded parameters.
On the related tools: TSV to JSON – Convert tab-separated values, such as a paste from Excel, into JSON.