🔣 HTML Entity Encoder
Encode special characters to HTML entities — named, decimal or hex — or decode entities back to plain text. Entirely in your browser.
Frequently Asked Questions
What is an HTML entity?
A sequence like &, © or © that represents a character in HTML source. Entities let you show characters that would otherwise be parsed as markup (<, >, &) or that are hard to type (©, €, →). Named entities use a mnemonic, decimal and hex entities use the character's Unicode code point.
Which characters must always be encoded in HTML?
In element content, & and < must be encoded (> is recommended). Inside attribute values, also encode the quote character used for the attribute — " as " or ' as '. The default "Special only" mode encodes exactly these five.
When should I encode all non-ASCII characters?
When your HTML may be saved or served in a non-UTF-8 encoding (old email templates, legacy CMSes) — encoding ©, é, ₹ or emoji as entities keeps them intact regardless of the file's charset. Modern UTF-8 pages don't need this; the five special characters are enough.
Which entities can the decoder handle?
All of them — every named entity in the HTML standard (over 2,000, from & to →), plus decimal (©) and hexadecimal (©) numeric references. Decoding uses the browser's own HTML parser, so it matches exactly what a browser would render.
How is this different from the Escape/Unescape Tool?
The Escape/Unescape Tool covers four formats (HTML, URL, JSON, JavaScript) with basic HTML escaping. This tool is HTML-only but deeper: named/decimal/hex output formats, optional encoding of all non-ASCII characters, and a decoder that knows the full HTML entity table.
Is my text uploaded to a server?
No. Encoding and decoding run entirely in your browser with JavaScript — your text never leaves your device.