Text to Unicode

Parse and convert text to unicode and vice-versa

Enable JavaScript to use the interactive tool. The guide below explains how it works.

Text to Unicode

What it does

This tool converts text into decimal HTML character references (such as H for "H") and converts those references back into text. It gives you the numeric code behind every character, in a form that can be pasted directly into HTML.

Why someone uses it

Step-by-step instructions

  1. Text to Unicode: type or paste text in the first card; the entity string appears below. Copy it with the button.
  2. Unicode to text: paste a string of decimal references such as Hi into the second card to see the readable text.
  3. Both cards work independently, so you can test a round trip.

Examples

Understanding the results

Each number is the character's code point in the Unicode table, written in decimal between &# and ;. Codes 0–127 match ASCII, so English letters give small numbers (A is 65, a is 97). Higher numbers cover accented letters, symbols and other scripts. Note that the converter works on JavaScript's 16-bit units, so characters outside the Basic Multilingual Plane, including most emoji, are output as two separate surrogate-pair references rather than one. Browsers may not display such a pair correctly if you paste it into HTML on its own; for emoji, the single-code-point form (for example 🙂) is safer.

FAQs

Common mistakes

Use cases

Related tools

All tools

Guides and articles