Home / Tools / Data and formats
String Escape & Unescape
Escape text for JSON, JavaScript, regex, SQL or Unicode.
Runs in your browserFree, no sign-up
Loading tool…
How to use it
- Pick the style.
- Choose Escape or Unescape.
- Paste text and copy the result.
About this tool
Escapes quotes, backslashes, new lines and special characters so text can go inside a JSON or JavaScript string, a regular expression or a SQL literal. Unescape turns \n, \t and \u00e9 sequences back into real characters.
Your input is processed on your device. Nothing is sent to a server or stored.
Questions
What does Unicode escape do?
It writes every non-ASCII character as \u followed by its code, so the text is safe in ASCII-only files.
Data and formats
All data and formatsMore tools like this
Data and formatsJSON Formatter & ValidatorFormat, validate, minify, stringify and parse JSON.Opens filesOpen →Data and formatsXML to JSON ConverterConvert XML to JSON and JSON back to XML.Opens filesOpen →Data and formatsCSV to JSON ConverterTurn CSV or TSV into JSON and JSON arrays into CSV.Opens filesOpen →Data and formatsYAML to JSON ConverterConvert YAML to JSON and JSON to YAML.Opens filesOpen →Data and formatsJSON to TypeScriptGenerate TypeScript interfaces from a JSON sample.Opens filesOpen →Data and formatsSQL FormatterFormat messy SQL into readable, indented queries.Opens filesOpen →Data and formatsHTML Beautifier & MinifierIndent minified HTML or minify it for production.Opens filesOpen →Data and formatsMarkdown Table GeneratorTurn CSV or spreadsheet cells into a Markdown table.Opens filesOpen →