Escape text for HTML or decode named, decimal and hex entities as you type, with options for just the unsafe characters or all non-ASCII, and a searchable entity table.
HTML Entity Encoder / Decoder
Type plain text on the left to encode it, or HTML with entities on the right to decode it.
Encode
Entity style
Escapes & < > " and ', which is enough for text and attribute values in any UTF-8 page. Characters without a common name use a decimal reference, and the apostrophe is always '.
10 references
Entity reference
253 common named entities. Search by name, character, description or code point, and click a value to copy it.
Char
Named
Decimal
Hex
Description
Ampersand
Less-than sign
Greater-than sign
Double quotation mark
Apostrophe (single quote)
No-break space
En space
Em space
Thin space
Zero-width non-joiner
Zero-width joiner
Left-to-right mark
Right-to-left mark
Soft hyphen
En dash
Em dash
Left single quotation mark
Right single quotation mark
Single low-9 quotation mark
Left double quotation mark
Right double quotation mark
Double low-9 quotation mark
Left-pointing double angle quotation mark
Right-pointing double angle quotation mark
Single left-pointing angle quotation mark
Single right-pointing angle quotation mark
Horizontal ellipsis
Bullet
Middle dot
Inverted exclamation mark
Inverted question mark
Section sign
Pilcrow (paragraph sign)
Dagger
Double dagger
Prime (minutes, feet)
Double prime (seconds, inches)
Overline
Broken bar
Cent sign
Pound sign
Euro sign
Yen sign
Currency sign
Copyright sign
Registered sign
Trade mark sign
Degree sign
Micro sign
Per mille sign
Feminine ordinal indicator
Masculine ordinal indicator
Diaeresis
Acute accent
Cedilla
Macron
Modifier letter circumflex
Small tilde
Lozenge
Black spade suit
Black club suit
Black heart suit
Black diamond suit
Script capital P (Weierstrass p)
Black-letter capital I (imaginary part)
Black-letter capital R (real part)
Alef symbol
Latin small f with hook (function)
Plus-minus sign
Multiplication sign
Division sign
Minus sign
Fraction slash
Vulgar fraction one quarter
Vulgar fraction one half
Vulgar fraction three quarters
Superscript one
Superscript two
Superscript three
Not sign
Not equal to
Less-than or equal to
Greater-than or equal to
Identical to
Almost equal to
Approximately equal to
Tilde operator (similar to)
Proportional to
Infinity
N-ary summation
N-ary product
Square root
Integral
Partial differential
Nabla
For all
There exists
Empty set
Element of
Not an element of
Contains as member
Intersection
Union
Subset of
Superset of
Not a subset of
Subset of or equal to
Superset of or equal to
Logical and
Logical or
Circled plus
Circled times
Up tack (perpendicular)
Dot operator
Asterisk operator
Therefore
Angle
Left ceiling
Right ceiling
Left floor
Right floor
Mathematical left angle bracket
Mathematical right angle bracket
Leftwards arrow
Upwards arrow
Rightwards arrow
Downwards arrow
Left right arrow
Downwards arrow with corner leftwards (return)
Leftwards double arrow
Upwards double arrow
Rightwards double arrow
Downwards double arrow
Left right double arrow
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 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 final sigma
Greek small sigma
Greek small tau
Greek small upsilon
Greek small phi
Greek small chi
Greek small psi
Greek small omega
Greek theta symbol
Greek upsilon with hook symbol
Greek pi symbol
Capital A with grave
Capital A with acute
Capital A with circumflex
Capital A with tilde
Capital A with diaeresis
Capital A with ring above
Capital AE
Capital C with cedilla
Capital E with grave
Capital E with acute
Capital E with circumflex
Capital E with diaeresis
Capital I with grave
Capital I with acute
Capital I with circumflex
Capital I with diaeresis
Capital eth
Capital N with tilde
Capital O with grave
Capital O with acute
Capital O with circumflex
Capital O with tilde
Capital O with diaeresis
Capital O with stroke
Capital U with grave
Capital U with acute
Capital U with circumflex
Capital U with diaeresis
Capital Y with acute
Capital thorn
Small sharp s (eszett)
Small a with grave
Small a with acute
Small a with circumflex
Small a with tilde
Small a with diaeresis
Small a with ring above
Small ae
Small c with cedilla
Small e with grave
Small e with acute
Small e with circumflex
Small e with diaeresis
Small i with grave
Small i with acute
Small i with circumflex
Small i with diaeresis
Small eth
Small n with tilde
Small o with grave
Small o with acute
Small o with circumflex
Small o with tilde
Small o with diaeresis
Small o with stroke
Small u with grave
Small u with acute
Small u with circumflex
Small u with diaeresis
Small y with acute
Small thorn
Small y with diaeresis
Capital ligature OE
Small ligature oe
Capital S with caron
Small s with caron
Capital Y with diaeresis
About this tool
The HTML Entity Encoder / Decoder converts text to and from HTML character references in both directions as you type. Encoding can escape only the five characters that matter in HTML (& < > " and '), which is all you need to show code or user input safely in a page or attribute, or every character outside ASCII as well, for older systems and email templates that mangle accented letters, symbols and emoji. Choose named entities such as é where one exists, or decimal (é) or hex (é) references. Decoding uses your browser's own HTML parser in an isolated document, so all 2,231 HTML5 entity names, numeric references and edge cases come out exactly as a web page would show them, and nothing you paste can run as code. A searchable reference table lists over 250 common entities, from and — to arrows, maths symbols and Greek letters, with one-click copying. Everything runs in your browser.
How to use the HTML Entity Encoder / Decoder
Type or paste plain text in the left box to encode it, or HTML with entities in the right box to decode it.
Choose whether to escape only the five unsafe characters or all non-ASCII characters too.
Pick named, decimal or hex references for the encoded output.
Search the reference table for a character or entity name, and click to copy it.
Copy either side with its copy button.
Use it from your code
The HTML Entity Encoder / Decoder is also a REST API endpoint. Create a free API key and call it from your own scripts and apps.
Only & and < in normal text, plus the quote character that wraps an attribute value. Escaping all five of & < > " ' covers every case, which is what the default "only unsafe characters" option does. Pages saved as UTF-8 can include accented letters and emoji directly.
Why is the apostrophe encoded as ' and not '?
' is valid in HTML5 and XML but was not part of HTML 4, and some older email clients do not recognize it. ' works everywhere, so the encoder uses it even when named entities are selected.
Is decoding safe for untrusted HTML?
Yes. The text is parsed as the content of a textarea inside a separate document created with DOMParser, so tags are treated as plain text, scripts never run and nothing loads. The result is shown as text, never inserted into this page as HTML.
Why do some entities without a semicolon still decode?