Skip to main content

Text to Unicode Converter

Convert text into Unicode 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 Escaped
HTML Entities
CSS Unicode
Was this helpful?

Guides

Convert plain text into three Unicode escape notations at once: JavaScript-style \uXXXX escapes, HTML numeric character entities (&#NNN;), and CSS \XXXX escapes. Useful 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 three escaped forms update automatically as you type.
  3. Copy or download whichever format you need.

Output formats

  • Unicode Escaped\uXXXX, the form JavaScript, JSON, and many other languages use for a character literal (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 H).
  • CSS Unicode\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 Unicode 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. HTML Entities and CSS Unicode work one Unicode code point at a time instead, since that's what a numeric character reference or a CSS \ escape names — an astral character becomes a single escape (😀 is 😀 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.