HTML Entity Encoder
Escape HTML special characters so they display safely in code, or decode entities back into the characters they represent.
- Free
- No sign-up
- Runs in your browser
Advertisement
728 × 90 · leaderboard
Your text is processed locally in your browser.
How to use HTML Entity Encoder
- Paste the text or HTML fragment.
- Choose “Encode” to escape special characters, or “Decode” to turn entities back into characters.
- The result updates automatically.
- Copy it with one click.
About this tool
When you write code examples, embed user content in a page, or work with XML and HTML templates, characters like &, < and > must be escaped to prevent them from being interpreted as markup.
The encoder covers the essential entities plus a full pass for non-ASCII characters, and the decoder understands both named entities (&) and numeric ones (&).
Frequently asked questions
What does encoding actually do?
It replaces characters that have special meaning in HTML — like < and & — with their entity equivalents, so they render as plain text instead of markup.
Which entities does the decoder recognise?
All numeric entities (decimal and hexadecimal) plus the common named ones such as &, <, >, ", ' and .
Advertisement
Responsive · in-content