HTML Entity Encoder & Decoder
runs in your browserEncode text for HTML, escaping only what breaks markup or as much as you need, decode entities back, and look up the ones you can never remember.
Only the characters that can break markup: & < > " ' and the backtick. The right default for a UTF-8 page.
Text
Encoded
Common entities
40 shown| Character | Named | Numeric | What it is |
|---|---|---|---|
| & | & | Ampersand | |
| < | < | Less than | |
| > | > | Greater than | |
| " | " | Double quote | |
| ' | ' | Apostrophe, XML only | |
| space |   | Space that never wraps | |
| – | – | En dash, for ranges | |
| — | — | Em dash | |
| ‘ | ‘ | Left single quote | |
| ’ | ’ | Right single quote, apostrophe | |
| “ | “ | Left double quote | |
| ” | ” | Right double quote | |
| … | … | Ellipsis | |
| © | © | Copyright | |
| ® | ® | Registered | |
| ™ | ™ | Trademark | |
| ° | ° | Degree | |
| ± | ± | Plus or minus | |
| × | × | Multiplication | |
| ÷ | ÷ | Division | |
| ½ | ½ | One half | |
| € | € | Euro | |
| £ | £ | Pound | |
| ¥ | ¥ | Yen | |
| ¢ | ¢ | Cent | |
| § | § | Section | |
| ¶ | ¶ | Paragraph | |
| † | † | Dagger | |
| • | • | Bullet | |
| ← | ← | Left arrow | |
| → | → | Right arrow | |
| ↑ | ↑ | Up arrow | |
| ↓ | ↓ | Down arrow | |
| ≤ | ≤ | Less than or equal | |
| ≥ | ≥ | Greater than or equal | |
| ≠ | ≠ | Not equal | |
| ∞ | ∞ | Infinity | |
| α | α | Greek alpha | |
| β | β | Greek beta | |
| π | π | Greek pi |
about this tool
Escape less, not more
Only a handful of characters can break HTML: the ampersand, the angle brackets, the two kinds of quote and the backtick. Everything else is safe to write as itself, because documents have been UTF-8 for years.
Older tools encode every accented letter and symbol out of habit. That was
necessary when a page might be served in Latin-1 and a stray é would arrive
as mojibake. Today it makes the source unreadable and the file bigger for no
gain, which is why the default here escapes only what has to be escaped.
The wider modes are still there for the cases that need them: an email template going through a system with unknown encoding, or a field that will be handled by software you do not control.
Named or numeric
A named reference such as — is readable. A numeric one such as
— works everywhere, including in XML, which defines only five names of
its own. If the output is going into an XML document rather than HTML, prefer
numeric for anything beyond those five.
A quirk worth knowing
A few entities are recognised without their closing semicolon, for
compatibility with very old markup. ¬ is one of them, which means
¬anentity; does not decode as a broken entity: it becomes a not sign
followed by anentity;. Decoding here follows the same rule a browser does,
so what you see is what a browser would render.
Turn on strict decoding to refuse malformed input instead. Left off, anything shaped like an entity that is not one is passed through unchanged and reported underneath, so nothing disappears silently.