Category: Developer tools

JSON String Escape and Unescape

System ideaMissing a tool?

Convert text to and from a JSON-safe string literal

Turn raw text into a JSON-safe string literal, with quotes, backslashes and control characters escaped, or decode a literal back to text. Runs entirely in your browser.

JSON string literal
"A \"quoted\" line\nwith a tab\there and a backslash \\ too."

Everything on this page is processed in your browser. Nothing is uploaded.

What this tool does

Pasting a multi-line log line or a snippet with quotes straight into a JSON config or API payload breaks the file the moment a stray quote or newline lands in the wrong place. This tool uses the same escaping rules the JSON standard defines to turn any text into a literal that is safe to drop into a JSON document, and the reverse: paste a literal, with or without its surrounding quotes, to get the original text back.

How to use it

  1. Pick a direction first: choose Escape to convert raw text into a JSON string literal, or Unescape to decode a literal back into the text it represents.
  2. Paste or type into the input box; when unescaping, the literal works with or without its surrounding quotes.
  3. Copy the result from the output box and drop it into your JSON config file or API payload.

Privacy

This tool runs entirely in your browser. Your input is never uploaded, stored or shared — closing the tab removes it.

Frequently asked questions

How do I use JSON String Escape?
Choose Escape or Unescape, paste or type into the input box, then copy the result from the output box. Escape applies the escaping rules the JSON standard defines to quotes, backslashes and control characters; Unescape reverses them.
Which inputs and options does JSON String Escape support?
The input is whatever text you paste or type, and the only option is the direction. Escape accepts any raw text, including multi-line logs and snippets with quotes. Unescape accepts a JSON string literal, with or without its surrounding quotes.
How do I view or copy the result?
The converted text appears in the output box, and you copy it straight from there. The conversion happens on your device as you work, so there is nothing to submit and no server response to wait for.
Is my input, file, or result uploaded?
No. Inputs, files, settings, and results stay in the browser and are not uploaded to LocalTools. The conversion runs entirely inside this page, so pasting a production log line or a config snippet with a secret in it keeps that text on your own device.
What does this tool not support?
It does one job: escaping and unescaping JSON string literals. There are no accounts, no cloud history and no server-side processing, no formats, algorithms or batch features beyond what the page shows, and it does not validate or reformat a whole JSON document.