json-formatter

Paste any JSON to validate, pretty-print, or minify it. Errors point to the exact line and column, and duplicate keys get flagged even though technically-valid JSON allows them.

client-side only any JSON no signup
input.json
Paste JSON on the left and click Format, Minify, or just start typing to validate.

// what gets checked

│

Syntax errors — trailing commas, unquoted keys, missing commas, mismatched brackets — reported with the line and column where parsing failed. Modern V8 often includes a position itself now, but not consistently — some failures (an empty string, for one) come back with no location at all, and older runtimes and other engines vary.

│

Duplicate keys within the same object — valid JSON technically allows this and silently keeps only the last one, which makes it a quiet source of bugs: the file parses fine, but a value you think is set isn't, because an earlier key with the same name got overwritten later in the same object.

// format vs. minify

│

Formatting is for humans — reviewing a config file, debugging an API response, or preparing something to paste into a PR. Minifying is for machines — stripping whitespace before storing JSON in a database column, embedding it in a URL query param, or shipping it over the wire where every byte counts. Both produce identical data; only the whitespace changes.

// "unexpected token" pointing at blank space

│

JSON copied from Jira, Confluence, or Word often fails to parse at what looks like an ordinary space — because it isn't one. See JSON Is Invalid But Looks Correct for the 21 invisible Unicode characters responsible for this, or just check "Show invisible characters" above to see them directly in your own input.

// got this JSON from an API response?

│

If you pulled this out of a browser DevTools request or a saved curl command, the cURL Converter turns that same request into working C#, Python, JavaScript, Go, Java, or PowerShell code — so the next call doesn't have to start from a blank editor.