String Escaper
Escape or unescape strings for JSON, JavaScript, HTML, SQL and CSV contexts.
How to use the String Escaper
-
Pick a format and direction.
-
Paste your string.
-
Copy the escaped result.
What is string escaping?
Escaping adds backslashes or entities so special characters (quotes, newlines, angle brackets) don't break the surrounding format. This tool escapes and unescapes text for JSON, JavaScript, HTML, SQL and CSV — useful when embedding strings into code or data safely.
Key features
- Escape & unescape in five formats
- JSON, JS, HTML, SQL and CSV
- Handles quotes, newlines & specials
- Instant, private conversion
Frequently asked questions
What does JSON escaping do?
It backslash-escapes quotes, newlines, tabs and control characters so the string is valid inside JSON.
Why escape for SQL?
Escaping single quotes helps build literals safely — though parameterised queries remain the best defence against injection.
Can it reverse the process?
Yes — switch to Unescape to decode back to plain text.