CalcCafe

Java Unescape

Paste Java-escaped string content and instantly turn escape sequences back into the real characters they represent.

Example

Java-escaped input becomes plain text:

Input: Hello,\tWorld!\ncafé — \101\102\103
Output: Hello,	World!
    café — ABC

How it works

It scans the input for backslash escape sequences and replaces each with its decoded character, including Unicode \uXXXX and octal escapes. Decoding runs live as you type and never makes a network request.

Good to know

Java Unescape takes a string written with Java-style backslash escape sequences and converts it back into the literal characters those sequences stand for. Paste something like café \101\102\103 and it returns café ABC, resolving newline (\n), tab (\t), carriage return (\r), backspace (\b), form feed (\f), space (\s), escaped quotes, doubled backslashes, Unicode \uXXXX (including padded \uuXXXX forms), and octal codes like \101 and \377. It is aimed at Java and Kotlin developers who need to read or reuse string content that was captured in an escaped form.

The most common reason to reach for it is reversing a string you copied out of a place where escapes were preserved as text rather than interpreted: a log line, a JSON or .properties value, a stack trace, a debugger watch window, or source code where a multi-line message was flattened onto one line. Instead of mentally decoding \n and , you get the real text you can read, diff, or paste elsewhere.

Read the result by checking the status line under the output. A green message such as "Decoded N character(s)" means every escape was recognized; a warning like "Decoded with N unrecognized escape(s) kept literally" means that many backslash sequences were left exactly as written rather than guessed at, so nothing is silently dropped. If you see that warning, scan the output for stray backslashes to find the input that did not match a known escape.

A practical caveat: octal escapes are greedy up to their valid length (three digits when the value is 0 through 3, otherwise two), and Unicode \uXXXX requires exactly four hex digits, so a truncated \u00 is preserved literally instead of being decoded. Watch your real backslashes too — a Windows path must arrive as C:\\temp to come out as C:\temp, since a single backslash before an unknown character is kept verbatim.

Frequently asked questions

Which escape sequences are supported?
It decodes \n, \t, \r, \b, \f, \s, \", \', \\, Unicode \uXXXX (including multi-u forms like \uuXXXX), and octal escapes such as \101 and \377.
What happens to an unrecognized or malformed escape?
It is left in the output exactly as written (backslash plus the character), and the status line reports how many such sequences were kept literally so nothing is silently lost.
Is my data uploaded anywhere?
No — this tool runs entirely in your browser. Your input never leaves your device and it works offline once loaded.
Is it free?
Yes, completely free with no sign-up and no limits.

People also ask

What is the difference between escaping and unescaping a Java string?
Escaping converts real characters such as a newline or a double quote into safe backslash sequences (\n, \") so a string can sit inside source code or a data format. Unescaping is the reverse: it turns those sequences back into the actual characters they represent.
How do I convert \uXXXX Unicode escapes back to normal characters?
Paste the text containing the \uXXXX sequences and the tool reads the four hex digits after \u and outputs the matching character, so é becomes é and — becomes an em dash. Padded forms like \uu00e9 are also accepted.
Why is a backslash still showing up in my decoded output?
A single backslash followed by a character that is not a recognized escape is kept exactly as written so no information is lost, and the status line counts those cases. It often means the input had a literal backslash that should have been doubled, or a malformed escape such as a Unicode sequence with fewer than four hex digits.
What does an octal escape like \101 mean in Java?
Octal escapes represent a character by its code point written in base 8, so \101 is 65 in decimal, which is the letter A. Java allows one to three octal digits, and values starting with 0 through 3 may use all three digits.
Can this decode escaped text copied from a JSON or .properties file?
It decodes the common backslash escapes those formats share with Java, including \n, \t, \", \\ and \uXXXX, so most escaped values will convert cleanly. Format-specific rules outside that set are not interpreted, so verify the output if your source uses non-standard sequences.
Does unescaping a string change its length or byte size?
Usually yes, because a multi-character sequence such as \n or é collapses into a single character, so the decoded text is typically shorter than the escaped input. The tool reports the decoded character count in its status line.
Is it safe to unescape strings that contain passwords or private data?
The decoding runs entirely in your browser and the input is never sent to a server, and it continues to work offline once the page has loaded. As with any tool, treat the decoded result with the same care you would give the original sensitive data.

Related tools