Compress JSON
JSON Minifier
Strip every unnecessary space and line break from JSON to make it as small as possible for APIs, config values and storage. The size saving is shown as you go.
Select a node to see its pathThe beautified JSON and tree appear here as soon as your input is valid.
Drop to open
.json, .txt and other text files
How it works
How to use the JSON Minifier
- 01
Paste formatted JSON or open a file.
- 02
Press Minify (⌘/Ctrl + Shift + M). The output is a single compact line.
- 03
Check the bytes saved in the status bar, then copy or download the result.
FAQ
Frequently asked questions
Does minifying change my data?
No. Minifying only removes whitespace that sits outside strings. Keys, values and order stay exactly the same, and whitespace inside strings is kept.
How much smaller will my JSON get?
Typically 10–30% for pretty-printed JSON, more for deeply indented files. Combining minification with gzip or brotli on your server gives the biggest saving.
Is my JSON uploaded to a server?
No. All parsing, formatting and validation happens in your browser with JavaScript. Nothing you paste or open is sent to us or stored on a server. Share links keep the JSON inside the URL fragment (after the #), which browsers never send to servers.
Tools
More JSON tools
JSON Viewer
Free online JSON viewer, formatter and validator. Paste or upload JSON to beautify it, explore it as a tree and find syntax errors by line. 100% private.
JSON Formatter
Pretty-print JSON instantly with 2-space, 4-space or tab indentation, optional key sorting and syntax highlighting. Free online JSON beautifier, no upload.
JSON Validator
Validate JSON as you type. Errors are flagged on the exact line and column with a plain-English explanation and a one-click fix. Free and private.
JSON Tree Viewer
Explore JSON as a collapsible tree with type badges, item counts, search and click-to-copy JSONPath. Handles large files smoothly. Free online tool.
JSON Repair
Repair invalid JSON automatically: trailing commas, single quotes, comments, unquoted keys, missing brackets, Python True/None and more. Free and private.