Home / Developer tools / Entity decoder and converter

Entity Decoder and Converter

Convert HTML entities into the format you need: characters, decimal or hex codes, JavaScript escapes, U+ code points, CSS escapes or percent-encoding. Every entity is listed with its code point.

Converted text

Entities found

One character, many formats

The same character can be written in many ways, depending on where it is used. This is the euro sign:

FormatEuro sign €Emoji 😀Used in
Character€😀Any UTF-8 text
Named entity€no nameHTML
Decimal entity€😀HTML, XML
Hex entity€😀HTML, XML
JavaScript escape\u20AC\uD83D\uDE00JavaScript and JSON strings
Code pointU+20ACU+1F600Unicode documentation
CSS escape\20AC\1F600CSS content and selectors
URL encoding%E2%82%AC%F0%9F%98%80URLs and query strings

How the converter works

It finds every entity in your text, named, decimal or hex, and replaces it with the format you choose. Text that is not an entity stays as it is, unless you also tick the option to convert plain non-ASCII characters. That option is the quick way to turn a whole string into JavaScript escapes or URL encoding.

The entity table

Below the result, a table lists each distinct entity from your text: the character, its Unicode code point (or two code points, for the few entities that stand for a pair), a short meaning, and how often it appears. Use it to find out what an unfamiliar entity is.

Details worth knowing

  • Characters above U+FFFF, such as emoji, need two units in a JavaScript escape, called a surrogate pair. The converter writes both.
  • CSS escapes get a trailing space when the next character could be read as part of the code.
  • Named output is used only for characters that have a name in the HTML list. Others fall back to the decimal form.
  • Windows-1252 codes such as – are read the way browsers read them, as an en dash.

For a plain text result, use HTML decode. To write entities, use HTML encode. For bytes and numbers, see the hex to binary converter and the binary to decimal converter. Browse names in the HTML entities list, and learn the rules in the HTML entities guide.

Frequently asked questions

How do I convert an HTML entity to a Unicode code point?

Paste the entity and choose U+ code point as the output format. The table below the result also shows the code point of every entity.

How do I turn an entity into a JavaScript escape?

Choose the JavaScript escape format. For example, € becomes \u20AC, and an emoji becomes a surrogate pair.

Can it convert normal characters too?

Yes. Tick the option to convert plain non-ASCII characters, and é or € in your text is converted as well.

What is the difference between this and HTML decode?

HTML decode gives you plain text. This tool lets you pick the output format and keeps the rest of your text as it is.