Skip to content
Sealpaste

JSON Escape & Unescape

Escape text to put it inside a JSON string, or turn an escaped string like {\"a\":1} back into readable text.

Direction

Text

Escaped

How to use it

  1. 1Choose Escape or Unescape.
  2. 2Paste the text. Unescape accepts it with or without the surrounding quotes.
  3. 3Copy the result. To read escaped JSON, unescape it and open it in the JSON formatter.

Private by design

Everything runs in this browser tab. Your input is never uploaded, logged or saved on a server, and there are no public "recent" pages. Close the tab and it's gone.

How we keep it private

Examples

Escape a Windows path and quotes

Input

He said "hi"
C:\temp

Output

He said \"hi\"\nC:\\temp
Unescape a log field

Common in logs and message queues where JSON is stored as a string inside JSON.

Input

{\"event\":\"signup\",\"ok\":true}

Output

{"event":"signup","ok":true}

What gets escaped

Inside a JSON string, these characters must be written with a backslash:

CharacterEscaped as
" (double quote)\"
\ (backslash)\\
Line break\n
Carriage return\r
Tab\t
Other control characters\u0000 – \u001f

Frequently asked questions

Why is my JSON full of backslashes?

It was stringified twice: a JSON document was stored as a string inside another JSON value (common in logs, SQS/SNS messages and some databases). Unescape it once to get the inner JSON back.

Are single quotes escaped?

No. JSON strings use double quotes, so single quotes are allowed as they are.

Is my text uploaded?

No. Escaping runs in your browser; nothing is sent or stored.