Skip to content
All tools›String Escaper & Utilities›Java and .Net Escape

Java and .Net Escape

Escapes or unescapes a Java or .Net string, replacing characters that could prevent compiling with their escape sequences.

Loading tool...

Java and .Net string escaping explained

Why escape?

A string literal in Java, C#, VB.Net or Kotlin is delimited by double quotes. A literal double quote, backslash or line break inside the value must be written as escape sequences.

Rules applied

Character Escaped as
Backspace \b
Newline \n
Tab \t
Carriage return \r
Form feed \f
Double quote \"
Backslash \\
Other control chars \u0000 ... \u001F
Non-ASCII (with option) \uXXXX (surrogate pairs for emoji)
---