Dev Tools
HTML Entity Encoder / Decoder
The HTML Entity Encoder / Decoder escapes characters like <, >, &, and quotes into their HTML entity equivalents, or takes text full of entities and decodes it back into readable characters. It's handy for developers embedding user-generated text into HTML safely, and for anyone trying to read a chunk of entity-encoded markup pulled from a CMS or email.
Because everything is processed with JavaScript running in your own browser, none of the text you convert is ever transmitted to a server — it stays entirely on your machine from start to finish.
How to Use the HTML Entity Encoder / Decoder
- Open the HTML Entity Encoder / Decoder tool.
- Paste the text or HTML snippet you want to convert.
- Choose Encode to escape special characters, or Decode to reverse entities.
- Copy the converted output.
Frequently Asked Questions
Why do I need to encode characters like < and & in HTML?
Encoding them prevents a browser from misinterpreting the characters as markup, which helps avoid broken layouts and cross-site scripting issues when displaying user input.
Does it support named entities as well as numeric ones?
Yes, it recognizes common named entities like & and as well as numeric entities like © when decoding.
Is it safe to paste HTML from an untrusted source into this tool?
Yes — the tool only converts the text you paste into entity form, and everything runs locally in your browser without executing or sending the markup anywhere.