JSON Formatter & Validator
Format, validate and minify JSON without uploading it — your data stays in your browser.
How to use
- Paste your JSON into the input box.
- Click Format to pretty-print it (choose 2 spaces, 4 spaces or tabs), Minify to compress it, or Validate to check it.
- If the JSON is invalid, the error is shown with its line and column so you can fix it quickly.
Examples
Debug an API response
Paste a one-line API response and click Format — nested objects and arrays become readable with proper indentation.
Shrink a config file
Click Minify to remove all whitespace: {"a": 1, "b": 2} becomes {"a":1,"b":2}, ready to embed or transmit.
FAQ
Is my JSON uploaded to a server?
No. Parsing, formatting and validation run entirely in your browser using the built-in JSON engine. Your data never leaves your device.
What JSON errors can it detect?
Anything the strict JSON specification rejects: trailing commas, single quotes, unquoted keys, comments, and truncated documents. The error message includes the line and column where parsing failed.
Does formatting change my data?
Formatting only changes whitespace and key ordering is preserved as-is. Note that like all standard JSON tools, duplicate keys are collapsed to the last value and very large numbers are limited by JavaScript number precision.
Why is JSON with comments rejected?
Comments are not part of the JSON standard. Formats like JSONC (used by some editors and config files) allow them, but a strict validator must reject them.
How large can the JSON be?
The practical limit is your browser’s memory — documents of several megabytes format fine on a typical device.