Unicode Escape / Unescape — \uXXXX Converter Convert characters to \uXXXX sequences and back.
100% offline
Input8 chars · 1 lines
Output48 chars
Escaped · 48 chars
\u0048\u00E9\u006C\u006C\u006F\u0020\u4E16\u754C

About Unicode Escape / Unescape — \uXXXX Converter

A Unicode escape sequence represents a character by its code point instead of its glyph — `\u00E9` for "é", or `\u{1F600}` for the 😀 emoji. Escaping is handy when you need to embed non-ASCII text in source files, JSON, or config that must stay pure ASCII, and when you're debugging "mojibake", invisible characters, or surrogate-pair surprises.

This free Unicode escape and unescape tool converts text to `\uXXXX` sequences (using the `\u{...}` form for code points above U+FFFF) and turns those escapes back into readable text. A "non-ASCII only" mode leaves printable ASCII untouched so the output stays legible.

Everything runs locally in your browser — nothing you paste is ever uploaded, so it's safe for secrets, tokens, and private strings.

Features

  • Escape any text to \uXXXX, or only the non-ASCII characters
  • Astral / emoji code points use the \u{XXXXX} form correctly
  • Unescape \uXXXX, \u{...}, and \xXX sequences back to text
  • Clear errors on malformed or out-of-range escapes; fully offline

How to use

  1. Paste your text or a \u-escaped string into the input pane.
  2. Choose Escape to convert text → escape sequences, or Unescape for the reverse.
  3. Toggle "Non-ASCII only" if you want printable ASCII to pass through unchanged.
  4. Copy the result from the output pane — or clear and start again.

Frequently asked questions

What is a Unicode escape sequence?

It is a way to write a character using its code point in hexadecimal. \u00E9 means U+00E9 ("é"), and \u{1F600} means U+1F600 ("😀"). Many languages — JavaScript, JSON, Java, Python — accept these in string literals.

When should I use \u{...} instead of \uXXXX?

The 4-digit \uXXXX form only covers code points up to U+FFFF. Characters above that — emoji and many CJK extensions — need either a surrogate pair or the \u{XXXXX} form. This tool emits \u{...} for those automatically.

What does "Non-ASCII only" do?

It escapes characters outside printable ASCII (U+0020–U+007E) while leaving ordinary letters, digits, and punctuation as-is. The output stays readable, which is ideal for spotting just the accented or non-Latin characters in a string.

How do I unescape \u sequences in JavaScript or Python?

In JavaScript, a string literal like "\u00E9" is decoded automatically, or use JSON.parse for dynamic strings. In Python, decode with bytes(text, "utf-8").decode("unicode_escape") or json.loads. This tool does the same conversion without writing any code — paste the escaped string and choose Unescape.

Does my text get sent anywhere?

No. All escaping and unescaping happens locally in your browser using built-in JavaScript APIs. Your input never leaves your device.

Everything runs locally in your browser — your input is never uploaded.