HTML Entity Encoder / Decoder Online
Escape special characters into HTML entities or decode entity-encoded strings back to plain text with this free online tool. Characters like <, >, &, and quotes break markup or get swallowed by browsers unless they are properly escaped — this encoder converts them to named (<), decimal (<), or hexadecimal (<) entities in one click.
It is essential for displaying code snippets inside HTML, cleaning up scraped content full of & and ", preparing text for XML/RSS feeds, and understanding what an encoded string actually says. Encoding untrusted text before rendering is also a fundamental defense against cross-site scripting (XSS).
How to Encode or Decode HTML Entities
-
Paste your text
Enter raw text with special characters, or an entity-encoded string you want to read.
-
Choose encode or decode
Encode converts special characters to entities; decode converts entities back to readable characters.
-
Pick the entity style
Choose named entities (©), decimal (©), or hex (©) depending on your target format.
-
Copy the result
One click copies the converted string, ready for your HTML, XML, or template.
Features of the HTML Entity Converter
-
Named, decimal, and hex entities
Output in whichever entity notation your format requires — HTML, XML, or legacy systems.
-
Full entity table support
Handles the complete set of named entities, from & and < to typographic symbols like — and ….
-
Two-way conversion
Decode messy double-encoded strings (&amp;) step by step to recover the original text.
-
Unicode-safe
Emoji, accented characters, and non-Latin scripts encode to correct numeric references.
-
Client-side processing
Nothing you paste is uploaded — safe for user data and production content.
Frequently Asked Questions
What are HTML entities?
HTML entities are escape sequences that represent reserved or special characters in markup — for example < renders as < and & renders as &. They prevent browsers from interpreting content as HTML tags.
Which characters must always be escaped in HTML?
At minimum: < (<), > (>), and & (&) in content, plus " (") and ' (') inside attribute values. Escaping these is also the first line of defense against XSS.
Why does my page show & instead of &?
The text was encoded twice. Paste it into the decoder — one pass turns & into &, a second pass yields the plain &. Then fix the pipeline stage that double-encodes.
Should I use named or numeric entities?
Named entities (©) are more readable in HTML. Numeric entities (© or ©) work everywhere, including XML formats where most named entities are undefined.