HTML Entity Encoder / Decoder
Encode text to HTML entities or decode entities back to plain text — runs in your browser.
Encode and decode HTML entities online
Paste any text into the input and it is converted the moment you type — no button to press, no upload. Switch to Encode to escape characters such as <, >, &, ", and ' into safe HTML entity references. Switch to Decode to convert entities back to their original characters. Everything runs locally in your browser, so sensitive content never leaves your machine.
The decoder handles named entities (such as © and —), decimal numeric references (A), and hexadecimal numeric references (A). The encoder always escapes the ampersand first, so there is no risk of double-encoding an already-escaped string.
FAQ
Is my data sent to a server? No. Encoding and decoding happen entirely in your browser using JavaScript.
Which named entities does the decoder support? The most common ones: amp, lt, gt, quot, apos, nbsp, copy, reg, trade, hellip, mdash, ndash, euro, pound, cent, and deg. Numeric references (decimal and hex) work for any Unicode code point.
Why does encode only escape five characters? Those five — ampersand, less-than, greater-than, double quote, and single quote — are the characters that must be escaped to produce valid HTML. Encoding everything else is rarely necessary and makes the output harder to read.