Java unescape: from source literal to text
The Java unescape tool reads escape sequences the way javac does and returns the actual characters. Use it to read strings copied from source code, stack traces, toString() output or .properties files, where accented letters often appear as \u00E9.
Supported Java escapes
| Sequence | Meaning |
|---|---|
\n \r \t \b \f | Line feed, carriage return, tab, backspace, form feed |
\\ \" \' | Backslash, double quote, single quote |
\uXXXX | UTF-16 code unit; pairs combine into emoji and other supplementary characters |
\uuuu0041 | Same as \u0041 — Java allows any number of u’s |
\0 to \377 | Octal escape for U+0000 to U+00FF (legacy C style) |
Octal escapes follow the Java grammar: up to three digits when the first is 0–3 (\101 is “A”), otherwise up to two. Unrecognised sequences are kept verbatim so you can see them rather than silently losing data; a \u not followed by four hex digits is reported as an error.
Example
Input:
Jos\u00E9 said \"hi\"\n\tTab \101 \uuuu0042Output:
José said "hi"
Tab A B
Where the multiple-u form comes from
The Java Language Specification lets a Unicode escape have several u characters so that tools which convert non-ASCII source to ASCII (the old native2ascii utility) can mark escapes they added themselves. You will rarely write \uuu0041 by hand, but it does turn up in generated code, and this tool decodes it correctly.
Properties files and resource bundles
Before Java 9, .properties resource bundles were read as ISO-8859-1, so any other character had to be written as a Unicode escape — which is why so many translation files are full of \u00FC and \u4E2D. Java 9 switched resource bundles to UTF-8 (JEP 226) and removed the native2ascii tool, but the escaped files live on in older projects. Pasting their values here is the fastest way to check what a translator actually wrote.
Remember to paste only the value, not the whole line: the key and separator pass through unchanged, and a trailing backslash used for line continuation in properties files is not interpreted.
Need to go back? Java Escape produces a safe literal from plain text. For Kotlin or JavaScript sources, try JavaScript Unescape, whose rules include \x and \u{…}. All processing happens locally in your browser.