Encoding & Security Tools Runs in your browser Free · no account

Unicode Escape and Unescape

The Unicode escape tool converts characters into escape sequences for JavaScript, CSS, HTML or the U+ notation used in specifications, and converts all of those back to plain text. Emoji and other characters outside the Basic Multilingual Plane are handled as single characters rather than split into surrogate halves.

Options
Text 0 characters
Result

Your result will appear here.

Not sure where to start? Use Load example.

Results update automatically and are calculated on your device. Nothing you type is sent to a server.

Runs in your browser. Processing happens entirely in your browser. Nothing you enter is sent to Delimiter.live.

How to use the Unicode Escape and Unescape

  1. Paste the text you want to escape, or an escaped string to decode.
  2. Choose the direction and, when escaping, the format your target language expects.
  3. Leave the scope on ASCII-only to keep ordinary letters readable in the output.
  4. Copy the result.

Example

Input
Café
Output
Caf\u00E9

Common use cases

  • Making a source file ASCII-safe for a toolchain that mangles UTF-8.
  • Writing an accented character into a CSS content property.
  • Decoding a log line where non-ASCII text was escaped before being written.
  • Finding the code point of a character to look it up in a specification.

Limitations and things to watch for

  • JavaScript escapes use UTF-16, so a character outside the Basic Multilingual Plane becomes a surrogate pair — two \u escapes for one character. That is correct for JavaScript and looks surprising if you expected one.
  • CSS escapes end with a trailing space to terminate the hexadecimal sequence. Removing it will change how the following character is interpreted.
  • Unescaping recognises the common formats but cannot detect which one you meant, so a string mixing several notations is decoded by applying each pattern in turn.

Frequently asked questions

Why does one emoji produce two escapes?
JavaScript strings are UTF-16, and characters above U+FFFF are stored as a surrogate pair. The two \u escapes together represent one character, and pasting them into JavaScript produces the correct emoji.
Why do CSS escapes have a trailing space?
CSS hexadecimal escapes are variable length, so a space terminates the sequence. Without it, a following hexadecimal character would be read as part of the escape. The space is consumed as the terminator, not rendered.
What is the U+ format for?
It is the notation used in the Unicode standard and in specifications and bug reports. It is for reading and citing rather than pasting into code — no language accepts U+00E9 as a literal.
Is my text transmitted?
No. Conversion runs entirely in your browser.

Share this tool