HTML Entity Encoder / Decoder

Escape text so it displays safely in HTML — or turn entities back into readable characters.

HTML Entity Encoder / Decoder

🔒 Nothing you enter is sent anywhere or stored. All processing happens in your browser.

How it works

HTML has a handful of characters with special meaning — <, >, &, and quotes. To display them as literal text (rather than have the browser treat them as markup) you replace them with entities. Doing this reliably is essential for showing code samples, preventing broken layouts, and avoiding injection bugs.

Encode escapes those special characters, and optionally every non-ASCII character (accents, symbols, emoji) into numeric entities for maximum compatibility. Decode reverses the process, turning both named entities (like &copy;) and numeric ones (&#169;) back into the characters they represent.

All conversion runs locally in your browser, so you can safely process snippets containing private content.

Examples

Encode 5 < 105 &lt; 10
Decode &copy; 2026© 2026
Tick "encode all non-ASCII" → café becomes caf&#233;

Frequently asked questions

When should I encode HTML entities?
Whenever you want to display characters like < or & as text inside HTML, or when inserting user-provided content to prevent it being interpreted as markup.
Does decoding handle both named and numeric entities?
Yes — it decodes common named entities (&copy;, &mdash; …) and any decimal or hexadecimal numeric entity.
Should I rely on this for security?
It's a helpful utility, but server-side frameworks provide context-aware escaping that you should use for production output.
Is my text uploaded?
No. Encoding and decoding happen entirely in your browser.