HTML Encoder & Decoder
Convert special characters into HTML entities, or decode HTML entities back into readable text.
Certain characters, such as the less-than sign, greater-than sign, and ampersand, have special meaning in HTML and need to be converted into entities like <, >, and & before they can be safely displayed as plain text inside an HTML page. Encoding performs this conversion, while decoding reverses it, turning entities back into their original characters.
Type or paste your text into the box, then click Encode to convert special characters into their HTML entity equivalents, or click Decode to convert entities back into plain, readable text. Click Copy to copy the result.
This is commonly used when embedding user-submitted text safely inside HTML, debugging a page where entities are showing up as literal text instead of rendering correctly, or reading a chunk of encoded HTML copied from somewhere else.
Which characters get encoded?+
The ampersand, less-than sign, greater-than sign, double quote, and single quote are converted into their corresponding HTML entities.
Does this handle named and numeric entities when decoding?+
Yes, decoding uses the browser's own HTML parser, so it correctly handles named entities like &amp; as well as numeric entities like &#39;.
Is my text sent to a server?+
No. Both encoding and decoding happen entirely in your browser.
Why would I need to encode HTML entities?+
To safely display text that contains characters with special meaning in HTML, without the browser misinterpreting them as markup.