JSON Beautifier & Validator

Paste JSON to format, validate or minify it — with the exact line and column of any mistake, and nothing rounded or reordered unless you ask.

Output
Indent
Beautified

Runs in your browser — nothing you paste is sent to us or stored.

How to use it

  1. 1

    Paste your JSON

    An API response, a request body from a debug log, a Named Credential payload — anything up to 10 million characters.

  2. 2

    Pick the output

    Beautify with 2 or 4 spaces or tabs, or minify to one line. Sort keys A–Z to compare two payloads.

  3. 3

    Fix, copy or download

    If it’s invalid, “Show me” puts the cursor on the mistake. Copy the result, download it, or copy it as an Apex string for a test mock.

Questions

Why does my JSON say it’s invalid?

The usual causes are a trailing comma after the last item, single quotes instead of double quotes, keys without quotes, comments, or True/None copied from Python. The message names the line, the column and the problem, and “Show me” jumps there.

How do I format JSON from a Salesforce debug log?

Debug logs often show JSON escaped inside a string, like {\"Id\":\"001…\"}. Paste it as it is — the tool notices the escaping and offers “Unescape it”, which turns it back into plain JSON you can format.

What is “Copy as Apex string” for?

It copies the minified JSON as an Apex string literal, with single quotes and backslashes escaped — ready for res.setBody('…') in an HttpCalloutMock or for JSON.deserialize test data.

Will formatting change my data?

No. Numbers and strings are copied exactly as written — 12345678901234567890 stays as it is, where tools built on JSON.parse would round it — and keys stay in their order unless you tick “Sort keys”.

What are duplicate keys and why does it warn about them?

JSON allows the same key twice in one object, but parsers disagree about what to do with it — most keep only the last value. The warning names where it happens so data doesn’t silently go missing.

Is my JSON sent anywhere?

No. It’s parsed and formatted in your browser; nothing is uploaded or stored.

Further reading

Want to go beyond the tools?

Learn Salesforce development — live classes with people who build on Salesforce every day.

See the learning path →