JSON Beautifier
Format JSON with clean indentation and line breaks so it's easy to read.
Strip every unnecessary space, tab and line break from your JSON to make it as small as possible, without changing a single value.
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.
Whitespace, indentation and line breaks are removed as you type. Values are left untouched.
Check the size saving under the editor, then copy or download the minified JSON.
About this tool
Pretty-printed JSON is great for people but wasteful for machines. Indentation and line breaks can make up a large share of a JSON file's size. A JSON minifier removes that whitespace and produces the most compact valid JSON, so it uses less storage and bandwidth and transfers faster.
Minified JSON is ideal for API payloads, embedding data in HTML or JavaScript, storing config in environment variables, and fixtures in tests. The data structure and values are untouched, and because the input is parsed first, invalid JSON is caught before you ship it.
See the before and after size and the percentage saved as you type.
Only whitespace is removed. Values, keys and order stay exactly the same.
Syntax errors are flagged with their line and column.
Paste JSON, drop a file onto the editor, and download the result as a .json file.
FAQ
Yes. Whitespace between tokens is optional in JSON, so minified output is fully valid and parses to exactly the same data.
Typically 10–40%, depending on how deeply nested and indented the original is. Gzip on your server will shrink it further.
Yes. Use the JSON Beautifier to add indentation and line breaks back.
No. This tool runs entirely in your browser using JavaScript. Your files and text never leave your device, so it's safe for private or confidential work.
Missing something?
Instant.tools grows from real requests. Describe the task you're stuck on and we'll consider building it next.