JSON Minifier
About this tool
About JSON Minifier
Shrink JSON before you send it over the network, store it in a database column or embed it in a config. The minifier removes every space, tab and line break that JSON doesn't need, keeping the data exactly the same, and tells you how many bytes you saved. It validates the input at the same time: if anything is wrong, you get the line and column of the problem instead of silently broken output. You can also sort keys alphabetically, open a .json file and download the result. Switch to 2 spaces, 4 spaces or Tabs at any time to pretty-print it again. Minified JSON is what you want for environment variables, single-line log entries, query parameters and test fixtures that must match a response byte for byte. Everything runs in your browser, so payloads, tokens and customer data are never uploaded.
- 2 spaces, 4 spaces, tabs or minified output
- Errors with line, column and reason
- Lossless: big numbers, number formatting, escapes and key order are kept exactly
- Repeated keys are kept and reported, not silently dropped
- Optional Sort keys A–Z at every level
- Runs in your browser; nothing is uploaded
Built and maintained by Abhi JainUpdated
Recent changes
- Remove guides and add lossless JSON formatter tool
- Add privacy and security blog posts and JSON formatter features
How to Minify JSON
- 1
Paste JSON
Paste JSON into the left pane or open a .json file.
- 2
Check the result
The minified JSON appears on the right with the bytes saved. Fix any error shown with its line and column.
- 3
Copy or download
Copy the minified JSON or download it as a file.
JSON Minifier: questions and answers
Does minifying JSON change the data?
No. Only whitespace that JSON ignores is removed. Keys, values and array order are unchanged, and any parser reads it exactly the same.
How much smaller does JSON get?
Pretty-printed JSON typically shrinks by 10–30% when minified, more for deeply nested data with long indentation. The tool shows the exact saving.
Is minified JSON the same as compressed JSON?
Not quite. Minifying removes whitespace. Compression such as gzip or Brotli, which web servers apply automatically, shrinks it much further. Minify first for the best result.
Is my JSON uploaded?
No. It is processed entirely in your browser and never leaves your device.
Other JSON tools
Related tools
- JSON ValidatorCheck JSON for errors with line and column, plain-language causes and one-click repair.
- JSON ViewerExplore JSON as a collapsible tree with search and one-click path copying.
- JSON DiffCompare two JSON documents by meaning and list every added, removed and changed path.
- JSON to CSVConvert a JSON array to CSV, flattening nested objects and choosing the columns you want.
- JSON Sort KeysSort the keys of every JSON object alphabetically, at every level.
- JSON to TypeScriptGenerate TypeScript interfaces or a Zod schema from JSON, with optional fields inferred.