String Escaper
Escape and unescape strings for JSON, JS, HTML, XML, SQL, RegExp, and shell.
Input
Escaped
Unescaped (treating input as escaped)
Unexpected token 'H', "Hello "wor"... is not valid JSON
About the String Escaper
Escape or unescape text for use in JSON strings, JavaScript source, HTML/XML markup, SQL literals, regular expressions, or shell commands — all in one place.
Examples
HTML escape
<a href="x">Output
<a href="x">Related tools
.htaccess Redirect Generator
Dev Utilities
Generate Apache .htaccess redirect and rewrite rules.
Chmod Calculator
Dev Utilities
Unix permission calculator: checkboxes, octal, and symbolic.
Code Comment Stripper
Dev Utilities
Remove comments from JS, HTML, Python, or SQL source.
Code Diff Merger
Dev Utilities
Side-by-side line diff of two code snippets with stats.
Cron Expression Builder
Dev Utilities
Build cron expressions visually with a human-readable description.
cURL to Fetch Converter
Dev Utilities
Convert a curl command into JavaScript fetch() code.
Frequently asked questions
Read more
- Regex patterns every developer should know
A working set of regular expressions for emails, URLs, whitespace and validation — plus how to test them safely.
Version 1.0.0 · Updated 2026-08-06 · Runs entirely in your browser