HTML Entity Encoder / Decoder
Encode special characters for safe use in HTML (< > & " ') or decode
named and numeric entities ( © é) back to text.
All processing in your browser — no data is sent to any server.
100% Client-Side Processing
Your text is encoded or decoded entirely in your browser. No data is sent to any server.
Encode: Converts & < > " ' to & < > " '. With "Encode non-ASCII", characters above U+007F become &#decimal;. Decode: Converts named entities
( ©) and numeric
(© é) back to characters.
Table of Contents
What are HTML Entities?
HTML entities are escape sequences used to represent characters that have special meaning in HTML
(or that are hard to type). For example, < represents the less-than character, & represents the ampersand, and is a non-breaking space. Numeric entities use &#decimal; or &#xhex; (e.g. © for ©, é for é).
Encoding text with entities makes it safe to embed in HTML without being interpreted as tags or attributes. Decoding converts entity references back to the actual characters. All processing in this tool runs in your browser.
How it Works
Encode: Replaces & < > " and apostrophe with & < > " '. With "Encode non-ASCII" enabled, any character with code above 127
is replaced by &#code;.
Decode: Converts named entities (< ©) and numeric
(© é) back to the
corresponding characters using the browser’s built-in HTML entity decoding.
Common Use Cases
- Safe HTML output: Encode user input or dynamic text before inserting into HTML to prevent XSS and broken markup.
- Display code or samples: Encode
<and>so they show as text instead of tags. - Attributes and quotes: Encode quotes and ampersands in attribute values.
- Decode scraped or stored HTML: Convert entity-encoded content back to plain text for display or processing.
- Non-ASCII in old systems: Use "Encode non-ASCII" to represent Unicode as numeric entities for legacy compatibility.
Frequently Asked Questions
By default: & < > " and apostrophe
(') become & < > " '.
With "Encode non-ASCII", any character with Unicode code above 127 is encoded as &#decimal;.
The tool uses the browser’s HTML entity decoder, so all standard named entities
( © é etc.) and numeric entities
(© é)
are supported. Malformed sequences may be left as-is or cause partial decode failure.
No. All encoding and decoding happens in your browser. Your text never leaves your device.