Back to all tools

Java Escape Unescape

Escape or unescape Java string literal special characters.

When to use this tool

Essential when preparing hardcoded string literals in Java source files that contain quotes, backslashes, or control characters. Also useful when reading Java stack traces or log output and converting escaped sequences back into human-readable text.

How to use

Paste your raw Java string content into the input box. Select "Escape" to encode special characters for use in a Java string literal, or "Unescape" to decode already-escaped sequences like \n, \t, and \" back to their actual characters.