About Unicode Escape
Unicode escape converts characters outside the ASCII range into \uXXXX sequences — the notation that JavaScript, JSON and Java source files use to represent a character when the surrounding file cannot safely contain it. The letter a stays as a; a Chinese character becomes a six-character escape.
Worth noting up front: ASCII characters are left untouched. This is not a full escape of every character, and that is usually what you want — converting an entire English sentence into escapes makes it unreadable while adding nothing, since those characters were never at risk.
The typical use is moving text into a context with a restricted character set: a resource bundle, a source file that has to remain pure ASCII, or a configuration value where non-ASCII characters tend to be mangled by whichever tool edits it next. Escaping sidesteps all of those encoding assumptions.
How to use Unicode Escape
- 1 Paste the text containing non-ASCII characters.
- 2 Characters outside the ASCII range are shown as \uXXXX escapes; ASCII characters are left unchanged.
- 3 Copy the escaped result into your source file, resource bundle or configuration.
Frequently asked questions
Why were my English letters not converted?
Because only non-ASCII characters are escaped. Letters, digits and standard punctuation are valid in ASCII and need no escape, so converting them would bloat the output without changing its meaning. If you need every character escaped, that is a different operation.
What do the four hex digits mean?
They are the code point of the character in the Basic Multilingual Plane. It is the same numbering as Unicode, so \u4e16 is the character whose code point is U+4E16. Characters above U+FFFF cannot be represented in four digits and require a surrogate pair.
Is this the same as URL encoding?
No. URL encoding produces %XX byte triplets of the UTF-8 representation; Unicode escaping produces \uXXXX code-point escapes of the character itself. The two are used in different contexts and are not interchangeable.
Does escaping change the meaning of the text?
No — it is fully reversible and the decoded string is identical to the original. The escape sequence is simply a way of writing the same character using only ASCII characters.
Free, online, and private
Free to use
Unicode Escape is completely free. There is no account to create, no login, and no hidden charge or usage limit.
Runs online in your browser
It is a free online tool that runs entirely in your browser. Nothing to download or install — open the page and start using it right away.
Your data stays private
All processing happens locally on your device. Your input is never uploaded, stored, or tracked, so it never leaves your browser.
How Unicode Escape behaves in detail
These are the specifics of this implementation — the exact ranges, defaults and fixed settings you are working with.
| Parameter | Value |
|---|---|
| Escape threshold | code points above 127 — plain ASCII is left alone |
| Escape shape | backslash-u followed by at least four lowercase hex digits |
| BMP example | a CJK character becomes \u4f60, one escape of exactly four digits |
| Iteration unit | by code point (Array.from), so a surrogate pair is one unit |
| ASCII passthrough | backslashes, quotes and control characters are not escaped |
Compiled from the implementation of this tool and checked against it by itoolnet.
What Unicode Escape does not do
Knowing the edges of a tool saves more time than another list of its features. These are the cases where it will not do what you might expect.
- The escape is built as backslash-u plus however many hex digits the code point needs, and a supplementary character needs five. An emoji comes out as \u1f600, which is not a legal four-digit escape and does not survive a round trip through an unescaper.
- ASCII passes through untouched, backslash included. A string that already contains a literal backslash-u sequence is emitted as-is, so the result mixes escapes this tool wrote with escapes that were already there and unescaping it later changes both.
- Control characters below 128 — tabs, newlines and newlines hidden inside pasted text — sit under the threshold and stay literal, so escaping does not make the output safe to drop onto a single line of another format.
Tested and documented by itoolnet, the team that builds and maintains this site.