Got My Tools

JSON Formatter & Validator

Pretty-print, minify, and validate JSON — with clear error locations when something's wrong.

Everything runs in your browser — nothing you paste here is sent anywhere.

What "valid JSON" actually means

JSON (JavaScript Object Notation) is a strict, minimal data format — much stricter than JavaScript object literals. Every key must be wrapped in double quotes (never single quotes), strings can't have trailing commas after the last item, and comments aren't allowed at all. Most "invalid JSON" errors come from one of these three habits carried over from writing regular JavaScript.

Reading the error location

When your JSON doesn't parse, the error message includes a line and column number pointing to where the parser gave up — which is usually right at, or just after, the actual mistake. A common gotcha: if you're missing a closing brace or bracket, the error often points to the very end of the file rather than where the unclosed one started, since that's where the parser finally ran out of input.

Format vs. minify — when to use each

  • Format (pretty-print) — for reading, debugging, or committing to a repo where humans review diffs.
  • Minify — for pasting into a config field, environment variable, or API payload where every byte counts and no one needs to read it directly.

Example

Invalid (trailing comma, single-quoted key):

{ 'name': "Alex", "age": 30, }

Valid, formatted:

{ "name": "Alex", "age": 30 }

Frequently asked questions

Does this validate JSON, or just format it?+

Both — if the JSON is invalid, you'll see the specific error along with the line and column it occurred on, instead of just a generic parse failure.

What's the difference between Format and Minify?+

Format re-indents the JSON for readability (pick 2, 4, or 8 spaces). Minify strips all whitespace to produce the smallest possible output — useful before pasting into a config file or API payload.

Is my data uploaded anywhere?+

No — parsing and formatting both happen in your browser using the native JSON.parse/stringify APIs.