↕
Escape / StringifyEscape · Unescape · Stringify · Parse
All tools run in your browser · Free to use

JSON Escape, Unescape & Stringify

Putting text inside a JSON string — or a JSON document inside another JSON string — requires escaping special characters. Quotes must become \", newlines must become \n, and backslashes must be doubled. Doing this by hand is error-prone; this tool does it instantly in both directions.

It is useful when writing test fixtures, building request bodies by hand, storing JSON in a database text column, or reading log output where JSON has been double-encoded.

How to use

  1. Choose a mode: Escape, Unescape, Stringify or Unstringify.
  2. Paste your text into the input panel, or click Sample.
  3. The converted result appears on the right; copy it with Copy.

What each mode does

  • Escape — adds JSON escape sequences: " → \", newline → \n, tab → \t, \ → \\.
  • Unescape — removes those escape sequences and restores the original text.
  • Stringify — turns a JSON value into a quoted string literal, ready to embed inside another JSON document or source file.
  • Unstringify — parses a double-encoded JSON string back into formatted JSON.

Example

Stringifying {"msg":"hi"} produces:

"{\"msg\":\"hi\"}"

Frequently asked questions

Why does my log show JSON full of backslashes?
The JSON was stringified twice — a JSON document was stored as a string inside another JSON document. Use Unstringify to recover the original object.
Are Unicode characters escaped?
No. Non-ASCII characters such as emoji or accented letters are valid inside JSON strings and are left as-is.

Privacy

This tool runs entirely in your browser. The data you paste or open is processed locally and is never uploaded to or stored on our servers.

Related tools