HTML Entity Encoder / Decoder
Convert special characters into HTML entities and back again — so code samples and symbols display on a page instead of breaking it.
What is HTML Encoder / Decoder?
HTML reserves certain characters for markup: < and > delimit tags, & starts entities, and quotes delimit attributes. To display those characters as text on a page, they must be written as entities — <, >, &, ". This tool converts in both directions: Encode turns raw characters into entities, Decode turns entities back into readable characters.
It counts the special characters it finds along with your word count, and the result appears instantly with copy and download buttons.
Both operations run in your browser; nothing is uploaded.
Why is HTML Encoder / Decoder Useful?
The classic task is publishing code on a web page. Paste a code sample containing <div> into a blog post as-is, and the browser interprets it as an actual tag — your example vanishes or wrecks the layout. Encoded as <div>, it displays exactly as written. Anyone who writes technical tutorials does this constantly.
Decoding solves the reverse annoyance: content pulled from feeds, APIs, or database exports often arrives with entities baked in — 'Fish & Chips' where 'Fish & Chips' belongs. One pass through Decode restores the readable text.
It's also relevant to security hygiene: encoding user-supplied text before rendering it is the standard defence against HTML injection, and this tool is a quick way to see what properly encoded output should look like.
How to Use HTML Encoder / Decoder
1. Paste your text or markup into the input box.
2. Click 'Encode' to convert special characters into entities, or 'Decode' to convert entities back.
3. Check the result and the special-character count.
4. Copy or download the output.
Example
Input (Encode):
<div>Hello & welcome!</div>
Output:
<div>Hello & welcome!</div>
Keep going
Related tools
More utilities that pair well with this one.
FAQ
Questions, answered
Everything you need to know about the HTML Entity Encoder / Decoder.
Yes — free in both directions, no limits.
