Java String Unescape
Turn Java string escapes back into text: \n, \t, \" and \uXXXX. An unknown escape is reported, not guessed.
What unescaping a Java string does
Each escape is replaced by the character it names, and a \u escape is read as one UTF-16 code unit, so a surrogate pair reassembles into the character it encodes. An escape Java does not define is an error with its offset rather than a silent pass-through, because a stack trace that loses a backslash is harder to read than one that says which offset is wrong.
How to use it
Java String Unescape: paste the Java string body into the box above, and press Run to get the text below.
Worked example
Input:
He said \"hi\"\nThen left\t(caf\u00e9)
Output:
He said "hi"
Then left (café)
Why it runs in your browser
The conversion happens on this page with JavaScript. Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere. The page reads Java string body and returns text; reloading the page discards both.
Each escape is replaced by the character it names, and a \u escape is read as one UTF-16 code unit, so a surrogate pair reassembles into the character it encodes. An escape Java does not define is an error with its offset rather than a silent pass-through, because a stack trace that loses a backslash is harder to read than one that says which offset is wrong.
Turn Java string escapes back into text: \n, \t, \" and \uXXXX. An unknown escape is reported, not guessed.
How to use it
Java String Unescape: paste the Java string body into the box above, and press Run to get the text below.
Why it runs in your browser
The conversion happens on this page with JavaScript. Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere. The page reads Java string body and returns text; reloading the page discards both.
What to Expect
Best for
- Converting Java string body to text when the data is already on screen.
What this tool keeps
- Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere.
Sample input
He said \"hi\"\nThen left\t(caf\u00e9)
Sample output
He said "hi" Then left (café)
Frequently asked questions
How do I use the java string unescape?
Java String Unescape: paste the Java string body into the box above, and press Run to get the text below.
Is my input uploaded?
No. The text is parsed on this page with JavaScript and is never posted to a server.
Is there a size limit?
Yes: 5 MB per run. Larger input is refused with a message rather than freezing the tab.
Build custom tools for your store
Join the SDK program to create useful ecommerce utilities for your store.