Unicode Escape Converter

Convert text to \uXXXX, \u{...}, U+XXXX or HTML escapes, and back.

Result

Caf\u00E9 \u20AC \uD83D\uDE00
1 lines · 29 bytes
  • 8 characters, 1 outside the Basic Multilingual Plane (written as two \u values in the JavaScript style).

What is a Unicode escape?

Unicode gives every character a number, called a code point. An escape sequence writes that number in plain ASCII so it can sit safely inside source code, JSON, HTML or CSS. The letter é is code point U+00E9, written \u00E9 in JavaScript and JSON.

Different languages use different styles. JavaScript uses \uXXXX, or \u{1F600} for characters above U+FFFF. HTML uses 😀, CSS uses \1f600 and Python uses \U0001F600. In the JavaScript style, an emoji becomes two \u values (a surrogate pair), exactly as JSON.stringify writes it. This tool converts in both directions.

How to use the Unicode Escape Converter

  1. Paste your text or your escape sequences.
  2. Choose the direction.
  3. Pick the style you need, such as JavaScript, ES6, U+ code points, HTML or CSS.
  4. Copy the result.

Real situations

When people use the Unicode Escape Converter

  • 1

    Put non-English text in source code

    When a file must stay ASCII, escape names and labels such as Café or the euro sign so they survive any editor or build step.

  • 2

    Read escaped strings in logs and JSON

    Paste text full of \u00e9 and \ud83d\ude00 to see the real characters instead of guessing.

  • 3

    Switch between escape styles

    Convert a JavaScript escape to the CSS or HTML form when you move a symbol from a script into a stylesheet or a page.

  • 4

    Find a code point

    Use the U+ style to see the Unicode number of a character you want to look up in a chart.

FAQ

Unicode Escape Converter: questions answered

How is an emoji written as a \u escape?

In the JavaScript and JSON style, an emoji above U+FFFF is split into two 16-bit values called a surrogate pair. The grinning face (U+1F600) becomes \uD83D\uDE00. The ES6 style \u{1F600} writes it as one value instead.

What does Café € 😀 look like escaped?

In the JavaScript style with "Only non-ASCII" selected, it becomes Caf\u00E9 \u20AC \uD83D\uDE00. The plain ASCII letters stay as they are, and only é, the euro sign and the emoji are escaped.

What escape formats can it read back?

The decoder understands \uXXXX, \u{...}, \UXXXXXXXX, U+XXXX, &#xXXXX;, &#NNNN; and CSS hex escapes. You can mix them in one text.

What does the "Every character" option do?

It escapes all characters, including plain letters. The letter A becomes \u0041. This is rarely needed, but it can help when you want to hide nothing and make every character explicit.

Are Unicode escapes the same as HTML entities?

They are related but not the same. HTML entities like é work only in HTML. \u escapes work in JavaScript, JSON, Java and similar languages. Both point at the same Unicode number, so you can convert between them.

Is an escaped string encrypted?

No. It is only another way to write the same characters. Anyone can decode it, so it gives no privacy.

Is this Unicode Escape Converter free and private?

Yes. It is free with no sign-in, and every calculation runs inside your browser. Nothing you type is sent to a server or stored, and the page keeps working offline once it has loaded.

Private by design. No accounts, no cookies, no tracking. Everything you type stays on your device.

How we keep it that way