HTML Entity Encoder / Decoder
Related external sites
Some links are affiliate links.
Related tools
Convert text to HTML entities and back. Escape the characters that have special meaning in HTML — like <, >, & and quotes — so they display as text, and optionally encode non-ASCII characters too. You can also decode named and numeric entities back to plain text. Everything runs in your browser.
How to use
- Choose a direction: Encode or Decode.
- When encoding, optionally also encode non-ASCII characters.
- Paste your text and copy the result.
How it works
Encoding replaces the five characters that matter in HTML — & < > " ' — with their entity equivalents like & and <, so a browser shows them literally instead of treating them as markup. With the non-ASCII option, characters above the basic range become numeric references like é. Decoding reverses this, turning named entities (©) and numeric ones (☕) back into characters.
Features
Escape HTML characters
Encode & < > and both quote types so text is safe to place in HTML.
Non-ASCII option
Optionally turn accented and symbol characters into numeric references.
Decode entities
Convert named and numeric entities back to readable characters.
Two-way
Switch between encoding and decoding with one toggle.
When to use it
Show code in HTML
Display tags and snippets on a page without them rendering.
Insert symbols
Add special characters safely with numeric references.
Email & templates
Escape user content before inserting it into HTML templates.
Read encoded text
Decode entity-laden text from logs or exports back to plain text.
Notes
- Decoding supports common named entities plus all numeric references.
- The apostrophe is encoded as ' for safe use in attributes.
- Escaping helps prevent markup from breaking or injecting into a page.
- Everything runs on your device; nothing is uploaded.
FAQ
- What is <?
- It is the HTML entity for the less-than sign (<). Writing < lets a browser show the character instead of starting a tag.
- What are numeric references?
- They encode a character by its code point, in decimal (é) or hex (é). They can represent any character.
- Why escape HTML?
- So special characters display correctly and untrusted text cannot inject markup or scripts into a page.
- Which entities can it decode?
- Common named entities like &, © and —, plus all decimal and hex numeric references.
- Is my text sent to a server?
- No. Encoding and decoding happen entirely in your browser.