Text to Unicode — Guide

Parse and convert text to unicode and vice-versa — HTML entities or plain decimal code points.

What it is and when to use it

Turn text into numeric character references and back. Each character becomes &#NN; holding its UTF-16 code-unit value, so “Hello” turns into Hello, and the reverse field takes a run of those references and gives the text back. This is the form that survives systems which mangle non-ASCII bytes: paste it into HTML and the browser renders the original characters regardless of the file's encoding. Note what it is not — the numbers are code units rather than code points, and the only syntax either direction understands is decimal &#NN;.

Converts text to and from Unicode code points — useful for tracking down mojibake or writing escape sequences.

How to use it

  1. Enter the text or the code point sequence
  2. The other side shows the converted result
  3. Copy and use it

A worked example

Fill in sample text

Hello 你好

Copy this into the tool, or open Text to Unicode

Things that trip people up

  • The numbers are UTF-16 code units, not Unicode code points: characters outside the Basic Multilingual Plane (most emoji) come out as a pair of surrogate references.
  • ASCII is escaped too — every character gets a reference, so the output is far longer than the input.
  • This tool neither emits nor parses \uXXXX escapes or &#xNN; hexadecimal forms; only decimal &#NN; is understood.

Questions people ask

Why does my "duplicate" username fail a comparison?
It very likely contains invisible characters — zero-width spaces, joiners or look-alike homoglyphs. Inspecting the code points exposes them; a character that should not be there will stand out immediately.
What is the difference between U+ notation and \u escapes?
They are two spellings of the same code point: U+1F600 and \uD83D\uDE00 (its surrogate pair in JS/JSON) both denote the same emoji. This tool converts between the views so you can paste whichever your context needs.
What are combining characters?
Accents and marks that attach to the previous character instead of standing alone. "é" can be one code point or "e" plus a combining accent — both display the same but compare differently, and this tool shows which one you have.
Why does my emoji turn into two numbers?
Because it sits outside the Basic Multilingual Plane, so JavaScript stores it as a surrogate pair — two UTF-16 code units. The tool reports both, and reading them back reassembles the emoji correctly. A tool that claims to emit code points would show one larger number instead.
Can it read \u0048 or H style escapes?
No. The reverse pass matches decimal references only. Hexadecimal references mean the same character in HTML and \uXXXX belongs to JavaScript string syntax rather than HTML, but neither is parsed here.

Next steps

Open the Text to Unicode tool

Spotted something wrong on this page? Tell us via Contact Us