Skip to main content

Text to Unicode Converter

Convert text into Unicode code points (U+XXXX) and escape notation — JavaScript-style \uXXXX escapes, HTML numeric character entities (&#NNN;), and CSS \XXXX escapes — all at once, entirely in your browser.

Input

Output

Unicode Code Points (U+XXXX)
JS / JSON Escaped (\uXXXX)
HTML Entities (&#NNN;)
CSS Escaped (\XXXX)
Was this helpful?

More ways to use this tool

REST API

curl -X POST https://api.iotools.cloud/v1/tool/text-to-unicode-converter \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Hello, World!"
  }'

Swap in your own key from your account. The tool's fields are the body — no wrapper.

Ask an AI agent

Use the IOTools `text-to-unicode-converter` tool (Text to Unicode Converter) on this input:

YOUR_INPUT_HERE

Paste this at any agent connected to the IOTools MCP server, then add your input.

Embed widget

<iframe
  src="https://iotools.cloud/embed/text-to-unicode-converter/"
  width="100%" height="520" frameborder="0" scrolling="no" loading="lazy"
  title="Text to Unicode Converter — iotools.cloud"
  sandbox="allow-scripts allow-forms allow-same-origin allow-downloads allow-popups allow-popups-to-escape-sandbox"
  allow="clipboard-write"
  style="width:100%;border:1px solid #e5e7eb;border-radius:12px;overflow:hidden"></iframe>
<script src="https://iotools.cloud/embed.js" async></script>

Drop this into your own page — free, no key required, just a link back.

Cost per API/MCP callFrom 5 credits
Need more credits?View pricing

Also available with

Guides

Convert plain text into its Unicode code points plus three escape notations, all at once: the generic U+XXXX code point form, JavaScript-style \uXXXX escapes, HTML numeric character entities (&#NNN;), and CSS \XXXX escapes. Useful for looking up a character's code point, or for embedding non-ASCII characters (accents, emoji, symbols) in source code, HTML, or CSS where the literal character might not be safe to paste directly.

How to use it

  1. Type or paste your text into the input box.
  2. All four output forms update automatically as you type.
  3. Copy or download whichever format you need.

Output formats

  • Unicode Code Points (U+XXXX) — the standard, language-agnostic way to name a character by its position in the Unicode standard (H is U+0048). This is what most people mean by "the Unicode of a character" — use it for lookup or reference rather than for pasting into code.
  • JS / JSON Escaped (\uXXXX) — the form JavaScript, JSON, and many other languages use for a character literal in source (H becomes the four-character escape u0048 prefixed with a backslash).
  • HTML Entities (&#NNN;) — a decimal numeric character reference that any HTML parser understands (H becomes &#72;).
  • CSS Escaped (\XXXX)\XXXX (with a trailing space to separate it from the next character), the escape form CSS accepts inside identifiers and string values (H becomes 0048 prefixed with a backslash, then a trailing space).

Each character is converted individually, matching how each target actually represents it. The JS / JSON Escaped output works one UTF-16 code unit at a time, the same unit JavaScript source itself uses for a \u escape — a character outside the Basic Multilingual Plane (most emoji, for example) is a UTF-16 surrogate pair, so it becomes two \uXXXX escapes, exactly as it would if you wrote the literal by hand in JS source. Unicode Code Points, HTML Entities, and CSS Escaped all work one Unicode code point at a time instead, since that's what a code point reference, a numeric character reference, or a CSS \ escape names — an astral character becomes a single escape (😀 is U+1F600, &#128512;, or \1f600), not a surrogate pair.

Why would I need this instead of just pasting the character?

Some contexts don't reliably accept raw non-ASCII bytes — an old codebase without UTF-8 source encoding, a CSV import with a strict charset, or a CSS identifier that needs to stay ASCII-only for a linter. Escaping sidesteps all of that: the escaped form is plain ASCII and unambiguous everywhere it's pasted.

Privacy

Everything runs entirely in your browser. Your text is never uploaded to a server.

unicodeescapehtml entitiescss escapeencodeconverter

Love the tools? Lose the ads.

One payment clears every ad from your account, for good. No subscription, no tracking.