How to encode HTML entities
Put text in the input, then choose how the page should transform it. Encode writes entity references, while Decode turns recognized references back into characters. You can also open the Symbol Library to copy one reference at a time.
- Paste text into the input, or select
Uploadto load a text file. - Select
Encodeto write entity references, or selectDecodeto read them as characters. - For encoding, choose
HTML critical,All named, orAll non-ASCII. - Choose
Named &name;,Decimal &#n;, orHex &#xn;. - Read the output, then select
CopyorDownload.
What HTML entity encoding changes
HTML critical encodes ampersand, less-than, greater-than, double quotation mark, and apostrophe characters. All named checks characters against the built-in named-entity table. All non-ASCII encodes characters with code points above 127.
The format controls the reference written for each selected character. An ampersand produces these outputs:
Input: Rock & Roll
Named: Rock & Roll
Decimal: Rock & Roll
Hex: Rock & Roll
Named output uses the table name when one exists. Without a matching name, Named &name; falls back to a decimal numeric reference; Hex &#xn; keeps the hexadecimal format.
How to decode HTML entities
Select Decode to process numeric and named references. The decoder checks hexadecimal references, then decimal references, then names in the built-in table. Numeric and named references can omit the semicolon when they match the page's parsing patterns. An unrecognized named reference stays unchanged.
Scope and Format become disabled in Decode mode because they apply to encoding. The result panel appears when the converted text has at least one character, and its Copy and Download controls then become available.
HTML entity symbol library tabs
The Symbol Library has HTML, Currency, Math, Arrows, Typography, Greek, and Misc tabs. Open a tab and select a visible symbol to copy its &name; reference. If the clipboard action fails, the page tells you to select and copy the code manually.
Where HTML entity encoding comes up
For an HTML snippet, choose HTML critical and inspect the output before placing the text in markup.
For one punctuation reference, open the Symbol Library and select Typography or Arrows. The library includes entries such as — and →.
For stored entity text, select Decode and copy the readable result for review or editing.
Choose the right text transformation tool
Use HTML Entity Encoder / Decoder for named, decimal, or hexadecimal entity references. Text Transformation Tools covers other text encoders, converters, and repair tools. Binary Converter handles decimal, hexadecimal, binary, or octal character codes. Hex Converter handles hexadecimal text conversion with selectable output styles. For URL text and its documented tracking-parameter cleanup, use URL Encoder / Decoder.
Frequently asked questions
What does an HTML entity encoder do?
An HTML entity encoder replaces selected characters with named, decimal, or hexadecimal references. Select Encode, then choose the scope and format that match the text you are preparing.
How do I decode HTML entities?
Select Decode, paste the entity references into the input, and read the characters in the output. The decoder checks hexadecimal, decimal, and named references in that order.
Which HTML entity format should I choose?
Choose Named &name; for a matching table name, Decimal &#n; for a decimal code point, or Hex &#xn; for a hexadecimal code point.
What does the HTML critical scope encode?
HTML critical encodes ampersand, less-than, greater-than, double quotation mark, and apostrophe characters. It leaves other characters unchanged.