String Escape / Unescape

Escape and unescape strings for JSON, SQL, HTML, and regex. Safe for embedding in code and queries.

Output:

 

What is String Escaping?

Escaping converts special characters into safe sequences so they can be stored or transmitted without breaking syntax. For example, a quote inside a string becomes \" in JSON.

What is it used for?

  • JSON: Escape quotes, backslashes, newlines in string values
  • SQL: Escape single quotes to prevent injection
  • HTML: Escape special chars for safe display
  • Regex: Escape metacharacters like .*+?^$()

How it works

Select the format (JSON, HTML, SQL, Regex), then click Escape or Unescape. The tool handles the conversion for that format. Unescape reverses the process.