Java String Escape
Escape text for a Java string literal: backslashes, quotes, \n, \t and control characters, optionally as \uXXXX ASCII.
Runs in your browserText → Java string
Loading tool…
Example
Path: C:\temp "quoted"
Path: C:\\temp\n\"quoted\"
How to use the Java String Escape
- Paste or type your Text into the input area, or open a file from your device.
- Adjust the options above the editor if the tool offers any.
- Review the Java string result, then copy it or download it as a file.
Privacy and limitations
- Your data is processed on your device and is not uploaded to any server.
Related converters
C# String EscapeEscape text for C# regular ("…") or verbatim (@"…") string literals, including \0, \a, \v and \uXXXX.Java String UnescapeDecode Java string escapes (\n, \t, \s, \uXXXX, octal) into plain text, flagging escapes Java would reject.SQL String UnescapeTurn an SQL string literal back into plain text: strip quotes and collapse '' (or MySQL backslash escapes).SQL String EscapeEscape text for an SQL string literal by doubling single quotes, or with MySQL backslash escapes.C# String UnescapeDecode C# string escapes (\n, \x41, \u00e9, \U0001F600) or verbatim @"…" strings back to plain text.CSV UnescapeRemove CSV quoting from a field: strip surrounding quotes and turn doubled quotes ("") back into single quotes.Regex EscapeEscape regular-expression metacharacters (. * + ? ^ $ ( ) [ ] { } | \ /) so text matches literally.CSV EscapeQuote a value for CSV per RFC 4180: wrap fields containing delimiters, quotes or line breaks and double inner quotes.