Unicode Escape Converter
Convert text to \uXXXX Unicode escape sequences or decode them back to readable characters. Runs entirely in your browser, nothing is uploaded.
Worked examples
- Plain ASCII text is left untouched
Printable ASCII characters never need escaping, so a plain-English string round-trips character for character.
- Accented letters and an emoji get escaped
Every character outside printable ASCII — an accented letter or a symbol like a coffee cup — becomes a \uXXXX escape for its UTF-16 code unit.
- Decoding escaped currency and punctuation
Multiple \uXXXX escapes in the same string, such as a pasted JSON value with currency symbols, are all resolved back to their original characters.
What this tool does
This tool converts text to \uXXXX Unicode escape sequences, or decodes escaped text back to readable characters. Every character outside printable ASCII becomes a 4-digit escape for its UTF-16 code unit; decoding reverses the process, turning é back into é. A direction toggle switches between encoding and decoding.
When you need it
- Debugging a string that arrived with literal
\uXXXXsequences instead of readable characters — a common symptom of a JSON payload, log line or config value that went through an extra layer of escaping somewhere. - Producing an ASCII-safe version of text containing accented letters, symbols or emoji, for a system or format that doesn't reliably handle raw non-ASCII bytes.
- Reading a pasted JSON string, JavaScript source snippet, or Java/
.propertiesfile that uses escape sequences instead of literal characters, without loading it into an actual parser. - Understanding exactly which characters in a piece of text fall outside plain ASCII, since every one of them gets escaped and becomes visible in the output.
Which characters get escaped
Anything outside the printable ASCII range — space through tilde, character codes 0x20 through 0x7E — is escaped, including accented letters, currency symbols, typographic punctuation like curly quotes and em dashes, emoji, and non-printing control characters. Plain ASCII text passes through completely unchanged in both directions, since it never needed escaping in the first place.
Characters outside the Basic Multilingual Plane
JavaScript strings are UTF-16 internally, and most Unicode escaping tools — including this one — operate on UTF-16 code units, not full Unicode code points. Characters within the Basic Multilingual Plane (which covers the vast majority of scripts and symbols in everyday use) map to a single code unit and a single \uXXXX escape. Characters outside it — many emoji, for instance — are represented in UTF-16 as a surrogate pair of two code units, and so they encode as two consecutive \uXXXX escapes rather than one. This is the same surrogate-pair form that JavaScript and JSON string escapes use for such characters (note that JSON.stringify itself leaves non-ASCII characters unescaped, whereas this tool escapes them all), so decoded output round-trips correctly even for characters that need a pair.
Where these escapes show up
\uXXXX sequences are valid inside JSON strings, JavaScript and Java string literals, and a number of config and log formats. They tend to surface unexpectedly when data crosses between systems with different assumptions about text encoding — a value that was properly escaped for one format can look broken when displayed somewhere that expects literal characters, and this tool exists to convert between those two representations without needing to trace through the code that produced the mismatch.
Limits
Input is capped at 2 MB of text. Decoding only recognizes the standard 4-hex-digit \uXXXX form; it doesn't decode other escape styles such as HTML numeric character references (é) or Python's \N{...} named escapes.
Frequently asked questions
- Is my text uploaded anywhere?
- No. Both encoding and decoding run entirely in your browser; nothing is sent to a server.
- Which characters get escaped?
- Anything outside printable ASCII (space through tilde, codes 0x20–0x7E) is written as a 4-digit lowercase \uXXXX escape — including accented letters, currency symbols, emoji and control characters.
- How are characters outside the Basic Multilingual Plane handled, like some emoji?
- JavaScript strings are UTF-16 internally, so a character like an emoji outside the Basic Multilingual Plane is stored as a surrogate pair and escaped as two \uXXXX sequences, one per code unit — the same surrogate-pair form JavaScript and JSON string escapes use.
- Where are \uXXXX escapes used?
- They're valid inside JSON strings, JavaScript string literals, and many config formats and log outputs, which is why they show up when copying data between systems with different encoding assumptions.