Minify any JSON to the smallest possible payload
Paste pretty JSON, get a wire-ready compact version. Live byte savings, copy or download, 100% in your browser.
{"company":"TryDevTools","founded":2024,"employees":[{"id":1,"name":"Ada Lovelace","role":"admin","active":true},{"id":2,"name":"Linus Torvalds","role":"engineer","active":true},{"id":3,"name":"Grace Hopper","role":"admin","active":false}],"count":3}How to minify JSON: a complete step-by-step guide
JSON minification removes every non-essential whitespace character — spaces, tabs, newlines, and indentation — from a JSON document to produce the smallest possible representation. This guide walks through using a free online JSON minifier to compress API payloads, configuration files, NoSQL records, and any other JSON data, with full RFC 8259 validation and live byte-savings metrics. Everything runs locally in your browser, so your data never leaves your machine.
- 01
Paste, drop, or type your JSON document
Drop any valid JSON document into the input editor on the left of the workspace. The minifier accepts REST API responses, GraphQL payloads, configuration files such as
package.jsonortsconfig.json, exported analytics, log entries, NoSQL records, and any other valid JSON input from a few bytes up to several megabytes.You can paste from the clipboard with
⌘V/Ctrl+V, drag a.jsonfile directly onto the panel, or edit JSON inline with syntax-aware behaviour. Parsing happens client-side as you type — no upload to any server, no signup, no rate limits.API responseconfig fileGraphQLlog payloadinput · pretty json.json{ "user": "ada", "active": true, "roles": [ "admin", "founder" ] }87 B · 7 linespretty-printed - 02
Validate against the RFC 8259 specification
Every document is parsed using the browser's native
JSON.parseengine, which strictly enforces the RFC 8259 standard. Invalid trailing commas, unquoted keys, unterminated strings, duplicate identifiers, control characters, and other syntax errors surface instantly with the exact error message and character position.Strict JSON does not allow comments or single-quoted strings by design — if you need those, use a JSON5 validator instead. Otherwise, fix the highlighted issue inline and minification resumes automatically.
RFC 8259strict parseerror positionvalidation errorline 3 · col 18SyntaxError: Unexpected token ',' at position 42 in JSON. → trailing comma after "roles" arrayfix → retryRFC 8259 § 4 - 03
Review live byte savings and compression metrics
The stats bar above the editor updates in real time as you type, showing input size, minified output size, total bytes saved, and percentage reduction. Typical pretty-printed JSON shrinks 20–40% after whitespace removal; deeply nested or heavily indented documents often save 50% or more.
Stack JSON minification on top of
gziporbrotlicompression for the best total payload reduction — minify first to strip redundant whitespace, then let your CDN or web server compress the remaining tokens.bytes savedgzip compatiblebrotli compatibleoutput · minified1 line{"user":"ada","active":true,"roles":["admin","founder"]}56 B− 31 B · 36% smaller - 04
Copy to clipboard or download as a .min.json file
One click sends the minified JSON to your clipboard, ready to paste into a request body, environment variable, GitHub commit, Postman collection, or test fixture. Alternatively, download the result as a
.min.jsonfile ready to ship inside CDN bundles, iOS asset catalogs, Androidres/rawdirectories, Docker images, or document-database imports.Because the entire tool runs in the browser, your data stays on your device — perfect for sensitive payloads, internal API responses, or pre-production fixtures. Open DevTools → Network to verify zero outbound requests after the page loads.
clipboard.min.jsonoffline-capableprivacy-firstexport2 outputs✓ Copied to clipboard ✓ Saved: output.min.json ✓ 0 outbound requests ✓ 100% client-side
ready to shipsuccess
Production-grade JSON minification, the right way
Stack minify + gzip
Minify removes whitespace; gzip and brotli compress repeated tokens. Together, they typically cut JSON payloads by 70–85% over the wire.
Keep the pretty source
Source-control the pretty-printed version for diffs and code review; minify on build. Use the Re-format input button to round-trip safely.
Beware NaN and Infinity
Strict JSON has no representation for NaN, Infinity, or undefined. Replace them with null or stringified sentinels before minifying.
Preserve key order
This minifier preserves the original key order. If you need canonical, sortable output for signing or hashing, run keys through Sort JSON Keys first.
Watch big-integer precision
JavaScript loses precision past 2^53−1. For ledger or blockchain payloads, transport large integers as strings to survive round-trips.
Embed in HTML safely
When inlining minified JSON inside a <script> tag, escape </ sequences to <\/ to prevent premature tag closure.
When to minify JSON
Every kilobyte compounds across millions of requests. Here are the scenarios where engineering teams reach for JSON minification before shipping.
REST & GraphQL APIs
Strip formatting whitespace before responding to clients. Even with gzip enabled, minified JSON parses faster on the receiving end and reduces TLS frame counts on mobile networks — the highest-impact win for any public API.
avg. 30% smaller payloadBuild artifacts & bundles
Embed configuration, translation files, or feature flag manifests in shipped JavaScript bundles, iOS asset catalogs, and Android res/raw directories without the dead weight of formatting whitespace inflating your app binary.
Storage & document DBs
Compact JSON in DynamoDB items, Redis values, MongoDB documents, and Postgres jsonb columns where every byte affects throughput limits, RU consumption, and per-record storage cost.
CDN & edge caching
Smaller files mean faster cache fills, lower egress costs on Cloudflare, Fastly, or CloudFront, and quicker time-to-first-byte for users on the far side of the world from your origin.
faster TTFBMobile & low-bandwidth clients
Cellular users on 3G networks, IoT devices on metered SIMs, and embedded browsers all benefit disproportionately from minified payloads. Less data over the air also means measurably lower battery drain on long-polling clients.
friendlier on metered dataEmbedding JSON in source
Inline JSON inside HTML <script> tags, JavaScript string literals, or environment variables. Single-line minified JSON sidesteps quoting headaches, multi-line escape sequences, and accidental syntax errors during code review.
Frequently asked questions
Common questions about JSON minification.
JSON.parse + JSON.stringify. Open your network tab — zero requests.Something missing?
Tell us what you need. We ship the top requests every two weeks.