JSON String Escape and Unescape

Escape text for a JSON string, or read an escaped one.

Runs in your browser Developer Tools Free · No account

Input

Processed locally

This tool runs entirely in your browser. The data you paste or load is never uploaded.

Result

Enter your input, then run the tool.

About this tool

Escapes quotes, backslashes, line breaks and control characters so text can be pasted inside a JSON or JavaScript string, and turns an escaped string such as "line\nnext" back into readable text. Non-ASCII characters can be kept or written as \u escapes.

How to use it

  1. Choose escape or unescape.
  2. Paste the text or the escaped string.
  3. Copy the result.

Frequently asked questions

Do I need to include the surrounding quotes?
No. When unescaping, quotes around the string are optional; when escaping, enable “Wrap in quotes” to add them.
When should I use \u escapes?
Only for systems that accept ASCII alone. Modern JSON is UTF-8, so accented letters and emoji can stay as they are.

Keep going

More in this category