HTML Entity Encoder / Decoder
Encode special characters to HTML entities and decode them back. Supports essential escaping, extended named entities, and numeric references — all in your browser.
<h1>Hello & “World”</h1>
How to use HTML Entity Encoder / Decoder
- 1Choose Encode or Decode
Select the Encode tab to convert plain text to HTML entities, or the Decode tab to convert entity-encoded HTML back to readable text.
- 2Paste or type your input
Enter your text in the input panel. The output updates instantly as you type.
- 3Select an encode mode (Encode tab only)
Choose Essential to encode only the five critical characters (& < > " '), or Extended to encode all named HTML entities and any remaining non-ASCII characters as numeric references.
- 4Copy or swap the result
Click Copy to copy the output to your clipboard. Use the Swap button to send the encoded output straight into the Decode tab for round-trip verification.
Frequently Asked Questions
What is the difference between Essential and Extended encode modes?
- Essential mode encodes only the five characters that must be escaped in HTML: & (→ &), < (→ <), > (→ >), " (→ "), and ' (→ '). Extended mode additionally encodes all characters that have a named HTML entity — such as © (©), € (€), Greek letters, math symbols, and accented Latin characters.
What entity formats can the Decoder handle?
- The decoder handles all three entity formats: named references (& © —), decimal numeric references (© —), and hexadecimal numeric references (© —).
Does my text get sent to a server?
- No. All encoding and decoding runs entirely in your browser using JavaScript string processing. Your text is never transmitted to any server.
Why do I need to encode HTML entities?
- Characters like <, >, and & have special meaning in HTML. If they appear unescaped in page content or attributes, the browser may misinterpret them as markup, causing layout breaks or security vulnerabilities such as cross-site scripting (XSS). Encoding them as entities ensures they display correctly as literal characters.