What is the HTML Entity Encoder and Decoder?
Characters like <, > and & have special meaning in HTML. To show them as text, for example in a code example or a user comment, they must be written as entities such as < and &. Forgetting this breaks pages and can open security holes.
Encode text for safe use in HTML, or decode entities back into readable characters. You can also encode every non-ASCII character if an old system needs it.
Features
Both directions
Encode or decode in one place.
All characters option
Turn every non-ASCII character into an entity.
How to use the HTML Entity Encoder and Decoder
- 1
Paste text or HTML.
- 2
Pick encode or decode.
- 3
Copy the result.
Who it is for
Code examples
Show HTML code inside a blog post.
Cleaning data
Turn &quot; mess back into normal text.
Tips for better results
- Encoding output in your own code (templates) is the real protection against XSS; this tool is for one-off text.
Questions people ask
Is it free?
Yes, free and private.
When do I need it?
Whenever you show user text or code samples inside a web page.