ToolWren logo ToolWren
ToolWrenEncoding › Unicode

Unicode Escape Converter

Convert non-ASCII text to \uXXXX escape sequences (the kind used in JSON and most programming languages), or decode escapes back to characters.

100% client-side · nothing is uploaded

Loading tool…

Quick answer

Unicode is a free, private online tool that lets you convert text to \uXXXX Unicode escape sequences used in JSON and source code, or decode them back. It runs entirely in your browser, so nothing you enter is uploaded to a server.

How to use the Unicode

  1. Choose the mode you need with the Encode / Decode toggle at the top of the tool.
  2. Type or paste your text into the Input box — the result appears instantly as you type.
  3. Use Swap (⇅) to move the output back into the input and flip the mode, which is handy for round-trips.
  4. Click Copy to copy the result, or Clear to start over.

Privacy: this tool runs entirely in your browser. Your input is never sent to, received by, or stored on any server — there are no uploads and no tracking of what you enter.

About Unicode

What are Unicode escapes?

A Unicode escape represents a character by its code point in a source-safe form, e.g. \u00e9 for é. Many languages and JSON use this so files can stay pure ASCII while still carrying any character.

Encoding and decoding

Encoding replaces every character outside the printable ASCII range with \uXXXX. Decoding converts \uXXXX (and \xXX) sequences back to their characters.

Where you'll see it

JSON strings, JavaScript/Java/Python source, config files, and log output that has been ASCII-escaped for safe transport.

Frequently asked questions

Does it handle emoji and astral characters?
Characters above U+FFFF are made of surrogate pairs, so they're emitted as two \uXXXX escapes, which is exactly how JSON represents them.
Does it also decode \xXX escapes?
Yes, the decoder understands both \uXXXX and two-digit \xXX escapes.
Will ASCII text be changed?
No. Printable ASCII passes through unchanged; only characters outside that range are escaped.

Understanding Unicode in depth

What a Unicode escape is

A Unicode escape represents a character by its code point in a plain-ASCII, source-code-safe form. The most common style is \uXXXX — a backslash, the letter u, and four hexadecimal digits — so 'é' becomes \u00e9. This lets files that must remain pure ASCII still carry any character in the world, which is why JSON and most programming languages support it.

Why escapes exist

Not every system handles raw non-ASCII bytes reliably. Older toolchains, certain config formats, log pipelines and copy-paste paths can mangle multibyte characters. Encoding them as \uXXXX sidesteps the problem entirely: the escaped text is plain ASCII that survives anywhere, and the receiving program decodes it back to the real character. It is also handy for making invisible or look-alike characters visible.

How the conversion works

Encoding scans your text and replaces every character outside the printable ASCII range (and control characters) with its \uXXXX escape, leaving normal ASCII untouched. Decoding finds \uXXXX sequences (and two-digit \xXX escapes) and converts them back to characters. This makes it easy to both prepare strings for source code and read escaped strings pulled from JSON or logs.

Surrogate pairs and emoji

Characters above U+FFFF — including most emoji — do not fit in a single four-digit escape. They are represented as a surrogate pair: two \uXXXX escapes that together encode one character. This is exactly how JSON represents them, so the escaped output is valid for pasting into JSON strings and JavaScript source, and it round-trips back to the original emoji when decoded.

Where you'll use it

Typical uses include embedding non-Latin text or symbols in source code, debugging why a JSON string shows \u00e9 instead of 'é', sanitising data for ASCII-only systems, and revealing hidden or confusable characters. Like every tool here, it runs locally in your browser with nothing uploaded.

Related & complementary tools

More Encoding tools