developer
JSON Formatter & Validator
Paste messy JSON and instantly format, minify, or validate it. Runs entirely in your browser — nothing is uploaded.
Tip: press ⌘/Ctrl + Enter in the input to format.
How to format and validate JSON
JSON (JavaScript Object Notation) is a common format for APIs, config files, and browser storage. Invalid commas, quotes, or brackets break parsers. This formatter checks syntax locally and rewrites the document with consistent indentation so you can read and share it safely.
Steps
- Paste your JSON into the input area, or load the sample to try the workflow.
- Click Format to pretty-print with indentation, or Minify to compress to one line for payloads.
- If the JSON is invalid, read the error message, fix the syntax, and format again.
- Copy the output when you are ready to paste it into an editor, API client, or ticket.
Tips
- Property names and string values must use double quotes in standard JSON.
- Trailing commas after the last item in an object or array are invalid in JSON.
- Minified JSON is ideal for network payloads; formatted JSON is better for reviews and diffs.
Frequently asked questions
Is my JSON uploaded to a server?
No. Formatting and validation happen locally in your browser. Your data never leaves your device.
Can I minify JSON as well?
Yes. Use Format for readable indentation or Minify to compress JSON into a single line.
Why does valid-looking JSON still fail?
Common causes include single quotes, comments, trailing commas, or NaN/undefined values that are not part of the JSON standard.