String Escape & Unescape

Escape or unescape text for JSON, JavaScript, HTML, XML, SQL, CSV, regex, shell and Unicode.

Runs instantly in your browser — results update as you type.

How do I escape a string for JSON?

Escaping adds backslashes or entities so special characters are treated as text: in JSON a double quote becomes \" and a new line becomes \n; in HTML < becomes &lt;; in SQL a single quote is doubled (''). Pick the format and the mode to convert instantly.

How to use the String Escape & Unescape

    Frequently asked questions

    Is escaping the same as encoding?

    Related: URL encoding uses %XX codes — use the URL Encoder for that.

    Does SQL escaping prevent injection?

    It helps, but parameterised queries are the correct protection.

    Is my text uploaded?

    No.