JSON Beautifier and Unescape

Format JSON, escaped JSON strings and log lines with \" escape sequences.

What you can paste

  • JSON: pretty-printed as is.
  • A JSON string literal such as "{\"a\":1}": unwrapped until it is an object or array, up to 5 levels of escaping.
  • Text with escape sequences such as {\"a\":1} copied from a log: unescaped, then formatted.

The tool tells you which of these it detected, for example "Unescaped 2 levels".

Exact output

Unlike JSON.parse, numbers such as 12345678901234567890, string escapes and key order are kept exactly as written.

Errors

Invalid input shows a clear message with line and column, and the location is highlighted in the editor.

Options

Indent with 2 or 4 spaces or tabs, sort keys, or minify. Escape goes the other way and turns JSON back into an escaped string.

Privacy

Everything runs in your browser. The JSON you paste is never uploaded to a server.