Toolzy

Unicode Escape Converter

Convert text to \uXXXX unicode escape sequences and back, with full surrogate pair support.

Input
Output

Turn any string into JavaScript/JSON-style \uXXXX escapes, or decode escapes back into readable text. Emoji and other characters outside the Basic Multilingual Plane are handled correctly via surrogate pairs. Runs entirely in your browser.

How to use

  1. Choose Encode to convert text to \uXXXX escapes, or Decode to reverse it.
  2. Paste your text or escaped string into the input box.
  3. Copy the result from the output box.

Frequently asked questions

What are surrogate pairs?
Characters outside the Basic Multilingual Plane (like many emoji) are represented in JavaScript strings as two 16-bit code units; this tool encodes and decodes each unit correctly so round-trips are lossless.
Can I decode escapes mixed with normal text?
Yes, only the \uXXXX sequences are converted; any surrounding plain text is left untouched.
Does this match JSON string escaping?
Yes, the \uXXXX format produced here is valid inside JSON and JavaScript string literals.

Related tools