Developer tools TOOL
Unicode escapes
Convert between text and Unicode escapes.
Enter your text
On-device processingUnicode escapes · How to use
Convert between text and Unicode escapes.
Example
A → \u0041
Things to know
Converts Unicode escapes and literal characters. This format differs from URL encoding and Base64.
Output options
Your files and results are never sent to a server. Everything is processed in this browser.
How to turn \uXXXX escapes into readable text
Use this when an API response or log shows text as \u00e9 or \ud83d\ude00 instead of the characters themselves, or when a source file must contain only ASCII to avoid encoding problems.
When to use this tool
- Read characters logged as \uXXXX escapes
- Write source code or properties strings in pure ASCII
- See which surrogate pair represents an emoji
- Decode \u{1F44B}-style escapes
Step-by-step instructions
- Enter the text or escaped string you want to convert.
- Under Operation, choose Encode (characters to \uXXXX) or Decode (\uXXXX to characters).
- Choose Convert.
- Copy the result or save it as unicode-codec.txt.
Frequently asked questions
Does encoding also convert letters and spaces?
Yes. Every character becomes \u followed by four hex digits, so A becomes \u0041 and a space becomes \u0020. Characters that do not fit in four digits, such as 👋, become two escapes (a surrogate pair): \ud83d\udc4b.
Why does decoding fail when the text contains \n or \t?
Any backslash sequence other than \uXXXX or \u{…} causes an error. If the string also contains escapes such as \n or \", wrap it in double quotes and decode it with the JSON string encoding tool.
How is this different from URL encoding or HTML entities?
Unicode escapes are the notation used in JavaScript, JSON, and Java source. For %C3%A9-style values in addresses, use the URL encode and decode tool; for é-style references in web pages, use the HTML entities tool.