Skip to content
100% local

Unicode escape

Convert characters to \uXXXX escape sequences and decode them back to text.

Input

Unicode escape

The Unicode escape tool turns any character into a \uXXXX escape sequence and decodes those sequences back into readable text. Paste an accented name, an emoji or a whole paragraph and every character becomes its four-digit hexadecimal Unicode escape — é becomes \u00e9, and a character above U+FFFF such as an emoji becomes a surrogate pair like \ud83d\ude00, exactly the form a string literal expects in JavaScript, Java or JSON. It is a reliable way to put accented text into source code, config files, HTTP headers or any channel that only survives plain ASCII.

By default the tool escapes only characters above U+007F, so ordinary letters, digits and punctuation stay readable and only accented or non-Latin characters are converted. Turn off "Only non-ASCII characters" and every single character is escaped, which is handy when you need a fully masked or transport-safe form. The output uses lowercase hexadecimal, the convention in most languages.

Decode mode does the reverse. It understands both the fixed \uXXXX form and the ES6 \u{...} form — so \u{1f600} decodes to a grinning emoji just like \ud83d\ude00 — and leaves the surrounding text untouched, so you can paste a whole line of code and only the escapes are converted. If nothing looks like an escape, the text simply comes back unchanged; there is nothing to fix.

Everything runs locally in your browser. Nothing you paste is uploaded, sent to a server or stored — the conversion happens entirely on your device, so even private strings and keys stay with you.

FAQ

What is a Unicode escape?
A Unicode escape writes a character as \u followed by a four-digit hexadecimal code, for example \u00e9 for é. It lets you put any character into source code or a data format that only accepts plain ASCII. Characters above U+FFFF are written as a surrogate pair of two \uXXXX sequences.
How are emoji handled?
Emoji are above U+FFFF, so encoding turns each one into a surrogate pair — 😀 becomes \ud83d\ude00. Decoding accepts that pair as well as the ES6 \u{1f600} form and restores the original emoji.
What does "Only non-ASCII characters" do?
When it is on (the default), ordinary ASCII letters, digits and punctuation are left unchanged and only characters above U+007F are escaped, so the output stays readable. Turn it off and every character is escaped, producing a string made entirely of ASCII.
What happens if I decode text with no escapes?
Nothing is treated as an error. Any \uXXXX or \u{...} sequences are decoded and everything else is kept exactly as it was, so text with no escapes comes back unchanged.
Is my text uploaded anywhere?
No. Both encoding and decoding run entirely in your browser — nothing you paste is uploaded, sent to a server or stored, so your text never leaves your device.