HTML Entity Encoder / Decoder
Encode and decode HTML entities online — &, <, ", numeric and named entities. Free and private.
100% client-side — your data never leaves this tab
Loading tool…
What is HTML Entity Encoder / Decoder?
HTML Entity Encoder and Decoder converts special characters to and from HTML entities — <, >, &, ", ', and extended named entities like ©, €, and —. Essential for safely embedding text in HTML, debugging escaped markup from CMS exports, and preparing content for the HTML Viewer. Encode mode escapes dangerous characters; decode mode restores readable text. 100% client-side.
HTML entity conversion runs entirely in-browser; text is never uploaded.
How to use HTML Entity Encoder / Decoder
- 1Choose Encode to escape special HTML characters, or Decode to convert entities back to text.
- 2Paste your input in the editor.
- 3For encoding, optionally enable named entities for symbols like © and €.
- 4Copy the output for use in HTML templates, emails, or documentation.
Examples
Encode
Becomes <a href="/search?q=fish&chips">Tom & Jerry</a>
<a href="/search?q=fish&chips">Tom & Jerry</a>
Decode
Becomes © 2024 Acme — All rights reserved
© 2024 Acme — All rights reserved
Tips & common mistakes
- Always encode user-generated content before inserting into HTML to prevent XSS.
- Use numeric entities (€) when named entities are not supported.
- Pair with HTML Viewer to preview encoded markup after decoding.
- Decode CMS exports when you see literal & or < in rendered text.
Who uses this tool?
- Developers escaping dynamic text for safe HTML insertion.
- Content editors fixing double-encoded entities from WordPress or CMS exports.
- Students learning HTML character encoding and XSS prevention.
- Email developers encoding special characters in HTML templates.
Frequently asked questions
- What is an HTML entity?
- An HTML entity is a text representation of a special character — like < for < or & for &. Browsers decode entities when rendering HTML.
- When should I encode HTML entities?
- Encode when inserting plain text into HTML attributes or body content — especially characters like <, >, &, and quotes that have special meaning in HTML.
- Does this support numeric entities?
- Yes. Both decimal (€) and hexadecimal (€) numeric entities are supported in decode mode.
- How is this different from URL encoding?
- HTML entities escape characters for HTML documents. URL encoding (percent-encoding) escapes characters for URLs and query strings. Use our URL Encoder for links.
- Is my text uploaded?
- No. Encoding and decoding happen entirely in your browser.