String Escape/Unescape

Free online tool to escape and unescape strings for 7 languages: JavaScript, Python, Java, Go, PHP, SQL, and HTML. Convert special characters into \n, \t and similar, or restore them.

Embed

Embed this tool on your site

Powered by Patrache Studio DevTools
Last updated: 2026 · Free online tool

What is String Escape/Unescape?

Free online tool to escape and unescape strings for 7 languages: JavaScript, Python, Java, Go, PHP, SQL, and HTML. Convert special characters into \n, \t and similar, or restore them.

How to Use

  1. 1
    Select language and direction— Choose the language and direction (escape/unescape).
  2. 2
    Enter string— Enter the string to convert.
  3. 3
    Copy result— Copy the converted result.

Related Tools

Frequently Asked Questions

Seven languages: JavaScript, Python, Java, Go, PHP, SQL, and HTML.

Escape converts special characters to safe representations (\n, \t, etc.), while unescape restores them to the original characters.

Yes, using JavaScript mode provides JSON-compatible escaping.

Use it for reference only. For actual security, use Prepared Statements.

No.

This site uses cookies for better experience and advertising. Learn more

Please allow ads on this site

To use these tools, allow ads on this site. Advertising keeps this service free.

Open your ad blocker, turn off blocking for this site, then check again.