HTML Entity Encoder & Decoder
Encode text as HTML entities, or decode entities back to text, without running any HTML.
Result
How it works
Encoding replaces five characters with HTML entities: the ampersand becomes &, the less than sign <, the greater than sign >, a double quote " and an apostrophe '. Other characters, including accents and emoji, are left as they are. An ampersand that is already part of an entity is encoded again, so & becomes &amp;.
Decoding uses your browser's own rules for named entities such as © and numeric ones such as © and ©. Text that is not a valid entity is left as typed, apart from a few older names that browsers accept without a semicolon, so ¬ becomes a not sign. Some invalid numbers, such as �, become the replacement character.
The decoded result is shown as plain text only. It is never inserted into the page as HTML, so tags in it are not run or displayed. Encoding does not make text safe in every place. Text inside a script, a style block or a web address needs different escaping.
What this result means
The result is your text with five characters written as HTML entities, or your entities turned back into text.
Examples
- "Tom & Jerry" encoded: Tom & Jerry
Assumptions and limitations
- Only the ampersand, less than, greater than and both quote characters are encoded.
