String Escape & Unescape
Escape and unescape strings for JSON, HTML, XML, URL, CSS, regex, shell, SQL, C/Java, and LaTeX contexts.
Escape and unescape strings for JSON, HTML, XML, URL, CSS, regex, shell, SQL, C/Java, and LaTeX contexts.
Every language has its own special characters. A quote needs \" in JSON, '' in SQL, and " in HTML, while shell commands need careful single-quoting. Getting it wrong causes syntax errors, broken output, or security bugs like injection. This tool applies the correct rules for each context, so you can safely drop a multi-line string into a JSON value, a regex, or a shell command.
No. Escaping is useful for writing one-off queries and test data, but application code should always use parameterized queries and the escaping built into your framework.
No. Conversion runs in your browser.
URL escaping is included here. For Base64, hex, Punycode, and other encodings, use the Encoding Converter. To test a pattern after escaping it, use the Regex Tester.
More in Text & Code Tools · All 73 tools