Skip to content

JSON escape and unescape

Convert text with line breaks, quotes or backslashes into a safe JSON string, or recover the original text.

It works in your browser. We do not store or send anything you type.Free · No sign-up required

Workspace · JSON escape and unescape

Runs in your browser · 100% local
Output
Files are processed in your browser; if you are signed in with history enabled, text results appear in your history.
Instructions

How to use it

01

Choose “Escape” or “Unescape”.

02

Paste the text and check the result.

03

Copy or download the output.

Examples

Examples

Escape

A line with "quotes" and a break becomes an escaped JSON string.

Unescape

\\n and \\t become a line break and a tab again.

Reference guide

What you need to know

Escaping uses JSON.stringify, so the output can be pasted inside a JSON value. Unescaping parses the string with JSON.parse and shows the resulting text, including Unicode escapes.

Frequently asked questions

Frequently Asked Questions

Yes, they are preserved and escaped as Unicode when needed.

Related tools

Other tools that can help with similar tasks.

More at Web development→
JSON escape and unescape online · ByTooly