String Escaper & Unescaper
Escape strings for JSON, JavaScript, CSV, SQL, XML or shell — and unescape them again.
To escape a string, paste it above and choose the target format. The tool handles JSON and JavaScript string literals, CSV fields, SQL single-quoted values, XML and HTML entities, POSIX shell quoting and regular-expression metacharacters, and can unescape JSON back to plain text.
Runs in your browser- Privacy
- Runs entirely in your browser — nothing is uploaded
- Cost
- Free, unlimited, no sign-up
Frequently asked questions
Why does escaping differ between languages?
Is escaping enough to prevent injection?
How to use the string escaper & unescaper
- 1Enter or paste your text.
- 2Choose the format.
- 3The result appears immediately — copy or download it.
Embed this tool
Put the working string escaper & unescaper on your own site. It runs in your visitors' browsers exactly as it does here — free, no account, nothing uploaded.
Share this tool
Related tools
JSON FlattenerFlatten deeply nested JSON into dot-notation keys, or expand flat keys back into nested objects.JSON Formatter & ValidatorFormat, validate, repair and analyse JSON — with errors that point at the exact line.JSON to TypeScript ConverterGenerate TypeScript interfaces, Zod schemas, Go structs, Python dataclasses or Rust structs from JSON.JSONPath TesterRun JSONPath expressions against a document and see the matches instantly.Wrap Lines in Quotes or BracketsAdd a prefix and suffix to every line and join them — build SQL IN lists, arrays and CSV rows.Text ReverserReverse text by character, word or line — useful for puzzles, testing and mirrored strings.
Last updated
More text tools