JSON Minifier
Strip whitespace from JSON to produce the smallest valid payload for APIs and storage.
About this tool
The JSON Minifier removes all non-essential whitespace — spaces, newlines, and indentation — from a JSON document, producing the most compact valid representation. This is the operation compilers and bundlers perform before shipping JSON to production: smaller payloads mean faster network transfers, lower storage costs, and less bandwidth consumed by mobile clients.
Minification is purely structural: every key, value, and nested object or array is preserved exactly. Only cosmetic whitespace is removed. The output is valid JSON and can be passed directly to any JSON parser. The original input is never modified.
All processing happens in your browser using a built-in JavaScript JSON parse/stringify cycle. Nothing leaves your tab. Use the Paste Sample button to see a before-and-after example, and the Copy button to grab the output for pasting into your code or terminal. Byte counts before and after are shown so you can see the savings at a glance.
Frequently asked questions
Is minified JSON still valid?
Does this tool validate the JSON before minifying?
How much smaller will my JSON be?
Can I pipe the output back into the formatter?
Related tools
JSON Formatter / Validator
Beautify, validate, and explore JSON with error line numbers and collapsible nodes.
JSON → CSV Converter
Convert a JSON array of objects to CSV with automatic header detection — client-side.
JSON → YAML Converter
Convert JSON to YAML format instantly — using js-yaml, entirely in your browser.