HTML Entity Encoder / Decoder
Encode special characters as HTML entities or decode entities back to text. Includes a searchable reference of 150+ entities.
All processing happens locally in your browser. Nothing is uploaded.
HTML entity reference
Click any cell to copy. 195 of 195 entities shown.
Reserved HTML
| Char | Named | Decimal | Hex | Description |
|---|---|---|---|---|
| Ampersand | ||||
| Less-than sign | ||||
| Greater-than sign | ||||
| Quotation mark | ||||
| Apostrophe (HTML5) |
Whitespace
| Char | Named | Decimal | Hex | Description |
|---|---|---|---|---|
| Non-breaking space | ||||
| En space | ||||
| Em space | ||||
| Thin space | ||||
| Zero-width space | ||||
| Zero-width joiner | ||||
| Zero-width non-joiner |
Punctuation
| Char | Named | Decimal | Hex | Description |
|---|---|---|---|---|
| En dash | ||||
| Em dash | ||||
| Horizontal ellipsis | ||||
| Left single quote | ||||
| Right single quote | ||||
| Left double quote | ||||
| Right double quote | ||||
| Left guillemet | ||||
| Right guillemet | ||||
| Copyright | ||||
| Registered trademark | ||||
| Trademark | ||||
| Section sign | ||||
| Paragraph sign | ||||
| Dagger | ||||
| Double dagger | ||||
| Bullet | ||||
| Middle dot | ||||
| Inverted question mark | ||||
| Inverted exclamation mark |
Math
| Char | Named | Decimal | Hex | Description |
|---|---|---|---|---|
| Multiplication | ||||
| Division | ||||
| Plus-minus | ||||
| Minus sign | ||||
| Less than or equal | ||||
| Greater than or equal | ||||
| Not equal | ||||
| Almost equal | ||||
| Identical to | ||||
| Square root | ||||
| Infinity | ||||
| Summation | ||||
| Product | ||||
| Integral | ||||
| Partial differential | ||||
| Degree | ||||
| One quarter | ||||
| One half | ||||
| Three quarters | ||||
| Superscript two | ||||
| Superscript three | ||||
| Micro sign |
Currency
| Char | Named | Decimal | Hex | Description |
|---|---|---|---|---|
| Euro | ||||
| Pound sterling | ||||
| Yen | ||||
| Cent | ||||
| Indian rupee | ||||
| Bitcoin | ||||
| Generic currency | ||||
| Florin |
Arrows
| Char | Named | Decimal | Hex | Description |
|---|---|---|---|---|
| Left arrow | ||||
| Right arrow | ||||
| Up arrow | ||||
| Down arrow | ||||
| Left-right arrow | ||||
| Carriage return | ||||
| Double left arrow | ||||
| Double right arrow | ||||
| Double up arrow | ||||
| Double down arrow | ||||
| Double left-right arrow |
Greek (uppercase)
| Char | Named | Decimal | Hex | Description |
|---|---|---|---|---|
| Greek capital alpha | ||||
| Greek capital beta | ||||
| Greek capital gamma | ||||
| Greek capital delta | ||||
| Greek capital epsilon | ||||
| Greek capital zeta | ||||
| Greek capital eta | ||||
| Greek capital theta | ||||
| Greek capital iota | ||||
| Greek capital kappa | ||||
| Greek capital lambda | ||||
| Greek capital mu | ||||
| Greek capital nu | ||||
| Greek capital xi | ||||
| Greek capital omicron | ||||
| Greek capital pi | ||||
| Greek capital rho | ||||
| Greek capital sigma | ||||
| Greek capital tau | ||||
| Greek capital upsilon | ||||
| Greek capital phi | ||||
| Greek capital chi | ||||
| Greek capital psi | ||||
| Greek capital omega |
Greek (lowercase)
| Char | Named | Decimal | Hex | Description |
|---|---|---|---|---|
| Greek small alpha | ||||
| Greek small beta | ||||
| Greek small gamma | ||||
| Greek small delta | ||||
| Greek small epsilon | ||||
| Greek small zeta | ||||
| Greek small eta | ||||
| Greek small theta | ||||
| Greek small iota | ||||
| Greek small kappa | ||||
| Greek small lambda | ||||
| Greek small mu | ||||
| Greek small nu | ||||
| Greek small xi | ||||
| Greek small omicron | ||||
| Greek small pi | ||||
| Greek small rho | ||||
| Greek small sigma | ||||
| Greek small tau | ||||
| Greek small upsilon | ||||
| Greek small phi | ||||
| Greek small chi | ||||
| Greek small psi | ||||
| Greek small omega |
Accented Latin
| Char | Named | Decimal | Hex | Description |
|---|---|---|---|---|
| A grave | ||||
| A acute | ||||
| A circumflex | ||||
| A tilde | ||||
| A umlaut | ||||
| A ring | ||||
| AE ligature | ||||
| C cedilla | ||||
| E grave | ||||
| E acute | ||||
| E circumflex | ||||
| E umlaut | ||||
| I grave | ||||
| I acute | ||||
| I circumflex | ||||
| I umlaut | ||||
| N tilde | ||||
| O grave | ||||
| O acute | ||||
| O circumflex | ||||
| O tilde | ||||
| O umlaut | ||||
| O slash | ||||
| U grave | ||||
| U acute | ||||
| U circumflex | ||||
| U umlaut | ||||
| Y acute | ||||
| Sharp s (eszett) | ||||
| a grave | ||||
| a acute | ||||
| a circumflex | ||||
| a tilde | ||||
| a umlaut | ||||
| a ring | ||||
| ae ligature | ||||
| c cedilla | ||||
| e grave | ||||
| e acute | ||||
| e circumflex | ||||
| e umlaut | ||||
| i grave | ||||
| i acute | ||||
| i circumflex | ||||
| i umlaut | ||||
| n tilde | ||||
| o grave | ||||
| o acute | ||||
| o circumflex | ||||
| o tilde | ||||
| o umlaut | ||||
| o slash | ||||
| u grave | ||||
| u acute | ||||
| u circumflex | ||||
| u umlaut | ||||
| y acute | ||||
| y umlaut |
Symbols
| Char | Named | Decimal | Hex | Description |
|---|---|---|---|---|
| Spade suit | ||||
| Heart suit | ||||
| Diamond suit | ||||
| Club suit | ||||
| Black star | ||||
| White star | ||||
| Check mark | ||||
| Ballot X | ||||
| Black sun | ||||
| Cloud | ||||
| Telephone | ||||
| Envelope | ||||
| Warning sign | ||||
| Recycling symbol | ||||
| Checked box | ||||
| Crossed box |
HTML entity encoding replaces special characters like <, >, &, " and ' with safe equivalents (<, >, &, ", ') so they render as literal text inside HTML instead of being parsed as markup. Paste text above to encode or decode in your browser — no upload, no signup.
Which characters must I encode in HTML?
Five at minimum: &, <, >, " and '. These are the structural characters that — left unescaped — can break the surrounding markup or open an XSS hole. Inside body text you always escape < and &; inside attribute values you always escape " and &. The other two are escaped by convention to keep the markup robust under rewriting.
For non-ASCII characters (©, →, é, emoji), modern UTF-8 HTML doesn’t require entity encoding at all. You only need it when emitting into something that may transcode the page — legacy email, RSS in mixed encodings, CMS fields that strip extended characters.
Named, decimal, or hex — which format should I use?
The encoder supports three output shapes:
- Named —
©,&,™. The most readable and what code review expects to see in source. - Decimal numeric —
©,&,™. Works in every HTML version including HTML 4 and obscure email clients that don’t recognise extended named entities. - Hex numeric —
©,&,™. Preferred in JSON, CSP and XML attribute contexts where decimal can clash with other numerics.
All three are functionally equivalent in modern browsers. The “scope” toggle decides how aggressively to encode: Reserved only touches just the five structural characters; All non-ASCII also encodes every character above code point 127.
How does the decoder handle every variant?
The decoder accepts named entities (©), decimal numeric (©), hex numeric (©) and all 250+ HTML5 named entities. It uses the browser’s own HTML parser via DOMParser, so anything the browser would render correctly, this tool decodes correctly — including malformed input that real-world HTML often contains.
When should I NOT encode HTML entities?
You don’t need to encode for URLs — use percent encoding via URL Encoder/Decoder. You don’t encode for JSON values — use JSON.stringify. You don’t encode for shell arguments — use proper argument arrays. Picking the wrong encoding produces output that looks right but breaks downstream.
You also don’t need to manually encode when using a templating engine that escapes by default (React JSX, Vue, Svelte, Jinja2, ERB, Liquid). Belt-and-suspenders encoding causes double-encoding — & becomes &amp; and shows up visibly in output.
A searchable reference for the entities you actually need
The table below the encoder covers reserved HTML, whitespace, common punctuation (em-dash, curly quotes, copyright, trademark), math symbols, currency, arrows, full Greek alphabet, accented Latin and common pictographs — 195 entities across 10 categories. Click any cell to copy. Search by name (copy), by character (©) or by code point (169 or A9).
Privacy
Everything runs in your browser via DOMParser and string operations — no network round trip, no server, no logging. The reference table is static data shipped with the page. Verify in DevTools → Network: encoding triggers zero requests.
Frequently asked questions
- Which characters must I always encode in HTML?
- Five — `&` (`&amp;`), `<` (`&lt;`), `>` (`&gt;`), `"` (`&quot;`) and `'` (`&#39;`). These are the structural characters that, left unescaped, can break markup or open an XSS hole. Inside attribute values you must always encode `"` and `&`; inside body text you must always encode `<` and `&`. The other two are encoded by convention to keep the markup robust under rewriting.
- Named, decimal or hex — which encoding format should I use?
- Named (`&copy;`) is the most readable and is what most code review will expect. Decimal numeric (`&#169;`) works in every HTML version including HTML 4 and obscure email clients that don't recognise extended named entities. Hex (`&#xA9;`) is preferred in JSON/CSP/XML attribute contexts where decimal can clash with other numerics. All three are functionally equivalent in modern browsers.
- Will this tool send my text to a server?
- No. The encoder/decoder runs entirely in your browser using the standard `DOMParser` API. There is no upload, no logging, no analytics on what you paste. You can verify this in DevTools → Network — converting text triggers zero requests.
- Does HTML5 still need entity encoding for non-ASCII characters like emoji or 你好?
- Usually no. With UTF-8 (the default for HTML5) any Unicode character — emoji, CJK, accented Latin — can be written directly. Entity encoding for those characters is only useful when you're emitting into a context that may transcode (legacy email, RSS in unknown encodings, CMS fields that strip non-ASCII).
- What''s the difference between HTML entities and URL encoding?
- They solve different problems. HTML entities (`&amp;`, `&#60;`) protect characters that have meaning in HTML markup. URL encoding (`%26`, `%3C`) protects characters that have meaning in a URL. Encoding the wrong way produces garbage — for example, `https://example.com/?q=foo&bar=1` should be URL-encoded to `?q=foo%26bar%3D1`, not entity-encoded.