JSON Minifier β Compress JSON Online
Minify JSON by removing whitespace outside strings. Keep large integer IDs, number notation, duplicate keys and string content unchanged.
Up to 100,000 characters. Changes only whitespace outside strings; number tokens, key order and duplicate keys stay intact. Checks syntax, not a schema.
π100% Private β Your files never leave your device. All processing runs locally in your browser.
How It Works
Format, minify and validate JSON in your browser. Choose two spaces, four spaces or tabs to make API responses and configuration files easier to read.
Formatting changes only whitespace outside strings. Original number tokens, escaped strings, key order and duplicate keys are preserved, including IDs larger than JavaScriptβs safe integer range.
Features
- βTwo-space, four-space and tab indentation
- βMinification and syntax validation
- βPreserves number tokens and key order
- βCopy the formatted result
- βUp to 100,000 input characters
How to Use This Tool
- Paste your JSON.
- Choose indentation, or select Minify.
- Run the action and check syntax feedback.
- Copy the output.
Perfect For
- βRead an API response
- βFormat a configuration file
- βCompact a JSON payload
Frequently Asked Questions
Whitespace outside strings only. It validates syntax before producing the compact output.
The formatter keeps original numeric text instead of serializing parsed numbers. Large integers and exponent notation are preserved.
No. It checks JSON syntax only. It does not check field requirements, data types or an external schema.
They are preserved in the output. Syntax validation does not flag duplicate keys as an error; applications may interpret them differently.
No. The input must be standard JSON. Browser error messages describe invalid syntax; their wording and location details can vary.
Input can contain up to 100,000 characters. Pretty-printing supports 128 nesting levels and 2 million output characters; minification does not add indentation.