Encode &, <, > and quotes as HTML entities, or decode every named and numeric entity
Runs in your browser. Nothing you type is sent anywhere. Checked against sources on 16 Oct 2026.An HTML entity writes a character as a reference such as &, © or ©, so text cannot break the markup around it. Only 5 characters need it in normal HTML: &, <, >, " and '. The standard defines 2,125 named entities; this tool decodes all of them and encodes with the 252 classic names or numbers.
Paste text or HTML into the Input pane, or click Try an example.
Choose Encode to write characters as entities, or Decode to turn entities back into characters.
When encoding, pick which characters to encode and whether to write names, decimal or hex numbers.
Click Copy, or press Ctrl+Enter, to take the result from the Output pane.
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 ©.
Encoding. Pick how much to encode:
Then choose names, decimal or hex. Names come from the 252 in HTML 4.01, which every browser and mail client knows; characters without one are written as hex numbers. The apostrophe is written ', because ' is unknown to HTML 4.
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.
Everything runs in your browser; nothing you paste is sent anywhere.
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.
Both stand for the apostrophe. The name ' comes from XML and was added to HTML only in HTML5, so HTML 4 browsers and some older email clients show it literally. The number ' works everywhere, which is why encoders, including this one, write the apostrophe as '.
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.
The WHATWG HTML standard lists 2,125 named character references, and 106 of them are also accepted without the closing semicolon for compatibility with old pages. HTML 4.01 had 252 names. Any character at all can also be written by its Unicode number, in decimal as € or in hex as €.
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: Base64 Decode – Turn Base64 back into text or a downloadable file · Base64 Encode – Turn text or a file into Base64.
On the related tools: TSV to JSON – Convert tab-separated values, such as a paste from Excel, into JSON.