PrivateCSV

Unescape or escape a JSON string

Turn \"escaped\" JSON strings back into text, or escape text for JSON.

The result updates as you type. Nothing leaves your browser.

Options

  • Nothing is uploaded
  • Free · no account
  • Tested on 400k-row files

Reference

JSON Unescape: how it works

The tool is above. Below: a short overview, optional step-by-step detail, honest browser limits, and answers to common questions.

Last updated 3 min read

About this tool

PrivateCSV unescapes JSON strings: paste text such as {\"name\":\"Ana\"} or Line 1\nLine 2 and get the original back, with \" \\ \n \t and \u00e9 decoded. Text escaped twice or more, common in logs and message queues, is unescaped level by level, and when the result is JSON it is pretty-printed. The other direction escapes any text so you can paste it inside a JSON string. Everything runs in your browser.

How to check that your file is never uploaded

Read the step-by-step guideHow-to, example and use cases (~3 min)

How to unescape a JSON string

  1. Paste the escaped text in the left box, with or without the surrounding double quotes.
  2. The unescaped text appears on the right. If it is JSON, it is pretty-printed.
  3. Keep Unescape repeatedly ticked for text that was escaped two or more times.
  4. To go the other way, click Escape text for JSON and paste plain text.

Example

A JSON payload stored as an escaped string in a log line.

escaped
"{\"name\":\"Ana\",\"city\":\"M\u00e1laga\"}"
unescaped
{
  "name": "Ana",
  "city": "Málaga"
}

When you need it

JSON inside logs and events
Logging libraries, CloudWatch, Kafka messages and webhook payloads often store a JSON document as a string, full of backslashes. Unescaping turns it back into readable, formatted JSON.
Strings from code and databases
Copy a string literal from source code, a database column or an API field and see the real text, with line breaks, tabs and accented characters restored.
Embedding text in JSON
Escape a multi-line message, a Windows path or an HTML snippet before putting it in a JSON file, so quotes and backslashes do not break the document.

Which escapes are decoded

  • \" becomes " and \\ becomes \
  • \n, \r and \t become a line break, a carriage return and a tab; \b, \f and \/ are decoded too
  • \uXXXX becomes the Unicode character, including emoji written as two surrogates
  • Unknown sequences, such as \x, are left as they are

Escaping text

Escaping writes the text as the content of a JSON string: quotes, backslashes and control characters are escaped exactly as JSON.stringify does. Tick Add surrounding quotes for a complete string literal, or Escape non-ASCII characters to write é as \u00e9 for systems that only accept ASCII.

Browser and file limits (not a trial)

These are technical limits of running in your browser—device memory, encoding and what this tool does not do. They are not a free trial, account quota or paid plan. There is no subscription.

  • The text box holds up to 20 MB.
  • Repeated unescaping stops after 10 levels or when no escape sequence is left.
  • Single-quoted strings from JavaScript or Python are treated as plain text with their \' decoded; only the surrounding double quotes are removed automatically.

Frequently asked questions

How do I unescape a JSON string?

Paste it in the box above, with or without the surrounding quotes. The escape sequences are decoded at once, and if the result is JSON it is formatted for reading.

Why does my JSON have backslashes before every quote?

Because it was stored as a string inside other JSON, or written by a logger that serializes messages. Each level of serialization adds a backslash before quotes. Unescaping removes them; tick Unescape repeatedly if there are several levels.

How do I escape a string for JSON?

Choose Escape text for JSON and paste the text. Quotes become \", backslashes \\, line breaks \n and tabs \t, so the result can be placed between double quotes in a JSON file.

What does \u00e9 mean in JSON?

It is a Unicode escape: \u followed by four hexadecimal digits, here the code of é. JSON allows any character to be written this way, and some tools escape everything that is not ASCII. The unescape tool turns these codes back into characters.

Related tools

Go further

Your files never leave your device

PrivateCSV runs this tool in your browser. No upload, no account, no trial and nothing to install.