Online JSON Escape & Unescape Tool

Escape quotes, newlines, and backslashes for string literals, or decode stringified JSON back into readable JSON.

100% Client-Side Processing — your JSON never leaves this browser. Works offline. How it works

0 lines • 0 bytes Ready
Tip: drop a file anywhere on the editor
Input
Paste, type or drop a file
1
Result
Updates as you type
// Output will appear here…
About this tool

How the JSON Escape / Unescape works

Escape and unescape JSON strings online. Safely format JSON for string literals, cURL commands, environment variables, and API payloads.

String Literal Escaping

Converts raw JSON into a properly escaped string with \", \n, \t, and \\ for cURL, code, and env vars.

Unescape Stringified JSON

Decodes double-escaped strings (like stringified logs or API responses) back into readable JSON.

One-Click Format on Unescape

Automatically beautifies unescaped JSON so you can inspect it immediately.

Real-Time Toggle

Switch seamlessly between Escape mode and Unescape mode with one click.

FAQ

Common questions

When should I escape JSON?

Escape JSON when embedding a payload inside another JSON string, an environment variable, a cURL command line, or a programming language string literal.

What does Unescape do?

Unescape takes a string containing escaped characters like \" and \n and restores them to their raw unescaped values.

What characters are escaped?

Double quotes (\"), backslashes (\\), newlines (\n), carriage returns (\r), and tabs (\t).

Is this conversion safe for sensitive API tokens?

Yes! Everything executes in your local browser, so no sensitive payloads are ever sent over the network.