Unicode Escape and Unescape
Turn text into \uXXXX or \u{1F44D} style escape codes and turn escape codes back into readable text, emoji and accents included. Free and private.
What is a Unicode escape?
Every character you can type, from the letter “a” to the Vietnamese “ệ” to a thumbs up emoji, has a number in Unicode, the shared list of characters used by computers everywhere. A Unicode escape writes that number in hexadecimal behind a backslash and the letter u. The letter “é” becomes \u00e9, and “Việt” becomes \u0056\u0069\u1ec7\u0074.
Escapes let you put any character into a place that only accepts plain English letters and digits. Programmers use them in JavaScript, Java, JSON and many other languages when a source file must stay plain ASCII, when a character is invisible or easy to confuse with another, or when a text editor shows the wrong symbols. You also see escapes when you open a JSON file or an API response and find \u sequences where you expected readable words. Unescaping turns them back into text you can read.
The tool offers two styles of escape.
The first is the classic four-digit form, \uXXXX. It writes each 16-bit unit of the text, which is how JavaScript and Java store strings. Most characters fit in one unit. Emoji and some rare characters need two, called a surrogate pair, so a thumbs up emoji becomes \ud83d\udc4d, two escapes in a row.
The second is the code point form with curly brackets, \u{1f44d}. It writes each character as one number, however large. Modern JavaScript and several other languages understand it, and it is easier for people to read.
You can also choose upper case hexadecimal digits if your project prefers \u00E9 to \u00e9.
When unescaping, both styles are recognised in the same text, surrogate pairs are joined back into one character, and anything that is not an escape is left as it is. A code that is too large to be a real character stays exactly as written, so nothing is lost.
Everything runs in your browser. Your text is not sent anywhere and is gone when you close the page.
How to use the Unicode escape tool
- Choose whether you want to escape text or unescape codes.
- Paste or type into the input box. A short sample is already there.
- When escaping, pick the four-digit style or the curly bracket style, and decide whether the hexadecimal letters should be upper case.
- Read the converted text in the Result box. It updates as you type, so there is no button to press.
- Use the copy button under the result to put it on your clipboard.
FAQ
Which style should I use?
Use the four-digit style for JSON, Java, C# and older JavaScript, because they only understand that form. Use the curly bracket style for modern JavaScript, Rust, Swift or PHP when you want one escape per character.
Why does one emoji become two escapes?
In the four-digit style each escape holds at most four hexadecimal digits, which is not enough for most emoji. Unicode solves this with a surrogate pair, two special codes that together stand for one character. The curly bracket style does not need pairs.
Does every letter get escaped, even plain ones?
Yes. Escaping turns every character into a code, so the output is fully plain ASCII. When unescaping, plain letters mixed in with codes are simply kept.
Why did part of my text stay as a code after unescaping?
The tool only changes sequences that form a valid character. A backslash and u followed by too few digits, or a curly bracket code above the largest Unicode number, is left untouched so you can spot and fix it.
Is my text stored or sent anywhere?
No. The conversion happens inside the page on your own device. Nothing is uploaded and nothing is saved after you close the tab.