JSON Minifier
Strip whitespace from JSON and see exactly how many bytes you saved.
Paste messy JSON, pick 2 spaces, 4 spaces or tabs, and copy clean output. Invalid JSON shows the line and column of the problem.
Paste or type to begin. Everything runs in your browser.
How it works
Paste JSON, drop a .json file onto the input, or load the sample.
Pick 2 spaces, 4 spaces or tabs. Sort keys alphabetically if you want a stable order.
Copy the formatted result or download it.
FAQ
Usually a trailing comma, single quotes, an unquoted key, a comment, or a value like undefined or NaN. None of those are allowed in standard JSON.
No. It points at the line and column and leaves the data alone, so it never guesses what you meant. Fix that spot and the output appears.
Missing something?
Describe the job and the file types involved. The most requested tools get built first.