Turn raw JSON into a compact one-line string
Paste JSON on the left and copy the minified output on the right

{"hello":["world"]}The JSON Minify calculator turns a valid JSON document into a compact one-line JSON string by removing spaces, indentation, and line breaks.
It’s useful when you need to paste JSON into a config field, an environment variable, a ticket, or a tool that expects a single-line payload.
Developers, data analysts, QA engineers, and anyone who copies JSON between tools (Postman, curl, feature flags, dashboards, CI variables).
The tool parses your input and re-serializes it. If the output exists, it’s guaranteed to be syntactically valid JSON.
Need the opposite? Pair this with our JSON to YAML converter for human-friendly editing, or use YAML to JSON converter to turn configs into strict JSON.
The output is the same data, just without extra whitespace. Keys and values stay the same, but line breaks and indentation disappear.
If you need a readable format again, paste the minified output into a JSON formatter (or convert it to YAML for editing).
Say you have a prettified JSON payload that is about and the minified output becomes .
In real networks you still want compression (like gzip or brotli), but minifying makes copy/paste and storage workflows much smoother.
Some tools reject multi-line values (for example, certain CI variables or form inputs). Minified JSON becomes a single line, so it’s less likely to break when pasted.
Tip: after you paste, verify it by parsing it again in your target tool (or by running a quick JSON parse locally).
Background: You’re pasting a JSON body into a request builder.
Input: A prettified JSON payload copied from docs.
Result:
How you use it: The request body is compact, consistent, and easy to share in tickets.
Background: Your dashboard expects a single-line JSON value.
Input: A multi-line object with nested flags.
Result:
How you use it: You avoid accidental line-break issues and reduce the chance of copy errors.
Background: You want to compare two payloads quickly.
Input: Two “pretty” JSON blobs with different whitespace.
Result:
How you use it: Whitespace noise disappears; differences become easier to spot (and you can use our JSON diff tool next).
If you’re comparing two payloads, minify both first and then use JSON diff to see real structural changes.
When a UI field doesn’t like line breaks.
When you want consistent, compact storage for small JSON blobs.
When whitespace makes a measurable difference for small requests.
When formatting noise hides real changes.
When you embed JSON in query params or logs (carefully).
When humans need to review/edit it — prefer a formatter or YAML.
JSON often contains tokens, cookies, email addresses, or internal IDs. Minifying makes it easier to share, so double-check before you paste it into public channels.
For docs and reviews, readability wins. Keep JSON formatted or convert it to YAML while editing, then minify at the last step.
Conceptually, minification is “parse then stringify with no indentation”. You can think of it like this:
In JavaScript terms, it’s equivalent to parsing your JSON into an object and then serializing it back out with spaces.
Minification removes whitespace. Compression (gzip/brotli) looks for repeated patterns and shrinks data further. They work together: you can minify for copy/paste friendliness and still rely on compression for network transfers.
Removing whitespace by hand is risky because you might delete characters that are actually part of a string. Parsing ensures the output represents the same data structure.
No. It removes whitespace outside strings. If the output appears, it’s valid JSON that represents the same parsed data.
Most often it’s a missing comma, an unquoted key, a trailing comma in strict JSON, or a string quote mismatch. Fix the input and the output will appear.
Comments are not part of standard JSON. If your source contains comments, the output will drop them because the result must be valid JSON.
Yes. Paste the minified JSON into a formatter or into our JSON-to-YAML tool if you want a cleaner editing experience.
The conversion runs locally in your browser, similar to our other converters. Still, treat sensitive JSON carefully when sharing links.
Normalize email addresses to a standard format for easier comparison. Useful for deduplication and data cleaning. Runs locally in your browser.
Parse and decode your JSON Web Token (JWT) and display its content. All computation runs locally in your browser.
Edit rich text in a simple WYSIWYG editor and copy Prettier-formatted HTML instantly. Runs locally in your browser.
Parse, validate, and format phone numbers. Get the country, calling code, type, and common formats like E.164 and RFC3966. Runs locally in your browser.
Convert fractions to percentages and vice versa instantly
Convert grams to tablespoons for any ingredient instantly. Perfect for cooking and baking with support for multiple ingredients.