My Tools Garage

Unicode Escape Converter

Convert text to \uXXXX escapes and back.

in-browser

How to use

  1. 1 Choose whether to encode text to escapes or decode escapes to text.
  2. 2 When encoding, optionally tick "escape non-ASCII only".
  3. 3 Type or paste your input on the left.
  4. 4 Copy the converted result from the output panel.

About Unicode Escape Converter

The Unicode Escape Converter turns plain text into JavaScript and JSON-style Unicode escape sequences and converts those escapes back into readable characters.

Encoding rewrites each character as a \uXXXX sequence โ€” for example "A" becomes \u0041 and "รฉ" becomes \u00e9 โ€” which is the safest way to embed non-ASCII text inside source code, JSON strings or config files that may pass through systems with shaky encoding support.

An option lets you escape only the non-ASCII characters, keeping ordinary letters readable while still protecting accented letters, symbols and emoji.

Astral characters such as emoji are handled correctly: a grinning face is emitted as the surrogate pair \ud83d\ude00, exactly the way JSON.stringify would produce it, and decoding recombines those pairs back into the original code point.

The decoder is flexible too โ€” it understands the classic \uXXXX form, the ES6 \u{...} braces and the shorter \xXX hex escape โ€” so it can clean up escapes from almost any source.

Encode and decode are a single round-trip apart, so you can verify your data survives the journey unchanged.

Everything runs locally in your browser; your text is never uploaded, logged or stored, and the tool works offline once the page has loaded.

FAQ

How are emoji and other astral characters handled?

They are encoded as UTF-16 surrogate pairs, e.g. ๐Ÿ˜€ becomes \ud83d\ude00, matching JSON.stringify. The decoder recombines surrogate pairs and also accepts the \u{1F600} form, restoring the original character.

Which escape formats can the decoder read?

It decodes the classic \uXXXX form, the ES6 \u{...} braced form and the two-digit \xXX form. Text between escapes is left untouched.