Java Escape/Unescape


With the free Online Java Escape/Unescape tool, replace the reserved characters in Java with their corresponding escaped characters to prevent compiling. You can also convert them back to their original ones.

Java Escape

The following characters are reserved in the Java string and must be escaped before using them in the Java string.

In Java Escape,

  • Backspace will be converted to b
  • Form feed will be converted to f
  • Newline will be converted to n
  • The carriage return will be converted to r
  • The double quote will be converted to "
  • The backslash will be converted to \
  • The tab will be converted to t

Java Unescape

The following characters in the Java string must be appropriately unescaped and bring them back to the original ones.

In Java Unescape,

  • will be converted to backspace.
  • f will be converted to form feed.
  • n will be converted to a newline.
  • will be converted to carriage return.
  • will be converted to a double quote.
  • will be converted to backslash.
  • will be converted to tab.

How to use the Java Escape/Unescape Tool Online tool?

For this, do the following steps.

  • Open the Java Escape/Unescape Online tool.
  • You can either copy-paste the Java code, load it from the URL, or use the "browse" button to upload the file.
  • Click on the "Escape" button.
  • The tool replaces the reserved characters in Java with their corresponding escaped characters.
  • The tool will provide the result in the "Result" section.
  • Please copy and paste the code into the desired location.
  • You can unescape the Java escaped string by clicking on the "Un Escape" button.

How to use the load sample data option in Java Escape/Unescape Online Tool?

Coding is crucial. A little mistake sometimes gives devastating results. It is always better to have a backup of the code file before going into the escape/unescape process.

The load sample data option is quite helpful in this way. So that you can check the results that escape/unescape can give. 

For that, 

  • Click on the "load sample data" button.
  • The tool will show the sample data in the upper portion.
  • Click on the "Escape" button to escape the Java string. The result will be displayed in the "Result" section.
  • Click on the "Un Escape" button to unescape the Java string. The result will be displayed in the "Result" section.

Do we keep a copy of your source code?

Protecting user trust is our top priority. We do not keep a copy of the source code that the user pastes for the Java Escape/Unescape process.

Note: We do not keep a copy of the resulted code. Therefore, please copy the resulted code and paste it to the desired location for future use if you are happy and satisfied with the free online Java Escape/Unescape tool.