Omnikit
DevFilesMoneyAll tools
Ctrl K
Dev toolsFile toolsMoney calculatorsAll tools
HomeDeveloper toolsJSON Formatter & ValidatorJSON Minifier

JSON Minifier

dev

Strip whitespace from JSON for production

Runs in your browser. Nothing you type is sent anywhere. Updated on 24 Oct 2026.

Minified JSON is the same data with every space, tab and line break between tokens removed, which is what belongs in an API response, a config baked into a build, or a value stored in a database column. Paste formatted JSON and the compact version appears, with the size of what went in and what came out. Keys, order and values are untouched.

Next:
  • JSON to TypeScript Generate TypeScript interfaces or types from a JSON sample
  • JSON Schema Validator Validate JSON against a JSON Schema (2020-12, 2019-09, draft 7), with each error located
  • JSON Diff Compare two JSON documents and list every added, removed and changed value

How to minify JSON

1

Paste formatted JSON into the Input pane.

2

Make sure Minify is selected on the options bar, so the right pane is headed Minified.

3

Compare the size shown above the Input pane with the smaller size shown above the result.

4

Click Copy, or the download icon to save the result as data.min.json.

How JSON Minifier works

This JSON formatter turns compact or messy JSON into a clean, indented document you can read, and tells you exactly where it breaks if it is not valid. Choose two spaces, four spaces or tabs, sort keys alphabetically, or minify back to a single line for production.

People use it when an API response arrives on one line, when a config file stops loading and the error message only says "unexpected token", or when two teams need the same file diffed with keys in the same order. Paste, press Ctrl+Enter, copy the result.

If validation fails you get the line and column plus a plain-English fix, such as "Remove the trailing comma" or "Property names must be wrapped in double quotes". For structured browsing, switch to the tree view and collapse what you do not need. Related tools: JSON to TypeScript, YAML to JSON, CSV to JSON.

The rest of the article, and all 6 questions about JSON Formatter & Validator, are on the JSON Formatter & Validator page.

Frequently asked questions

Is my JSON uploaded anywhere?

No. Formatting, validation and minifying all run in your browser with JavaScript, so nothing you paste leaves your device and no copy is kept on a server. API responses holding access tokens, customer names or bank details are safe to paste here.

How do I find the error in invalid JSON?

Paste the text and press Format. The error message shows the line and column, highlights the line, and suggests the most likely fix, for example removing a trailing comma or replacing single quotes with double quotes.

Can I format JSON with 4 spaces or tabs?

Yes. Choose 2 spaces, 4 spaces or Tab in the options bar and the output reindents as you change it. The choice is remembered on this device, so the next file comes back in the same style. Minify removes the indentation altogether for a production payload.

Does sorting keys change the data?

No. Sorting rewrites the order in which keys appear, and a JSON object has no defined key order, so the parsed value is identical. Arrays keep their original order, because position is part of the data in an array. Sorting both sides first makes a diff far shorter.

Still stuck? Ask about JSON Formatter & Validator and anybody who knows can answer. No account needed.

More ways to use JSON Formatter & Validator

  • JSON Formatter & ValidatorFormat, validate, minify and sort JSON with exact error positions
  • JSON ValidatorCheck JSON and see exactly where it breaks

Same job, other tools: HTML Minifier – Strip comments and spare whitespace from HTML and see the saving · CSS Minifier – Compress a stylesheet and see exactly how many bytes you saved · JS Minifier – Shrink a JavaScript file with terser and see the size saved · Remove Tracking Parameters – Strip utm, fbclid and gclid from a link before you share it.

On the related tools: GraphQL Validator – Check a GraphQL query or schema for errors, optionally against your own SDL.

Read about this

All guides
  • How to convert JSON to CSV, and CSV back to JSON, without losing dataHow nested JSON becomes CSV columns, what happens to arrays, why Excel mangles IDs and long numbers, and how to turn a CSV back into JSON safely.

Related tools

All developer tools
URL Parser & Query EditorSplit a link into its parts, edit the parameters and rebuild itHex Viewer (xxd online)See any file as an xxd hex dump with offsets and text, or turn a hex dump back into a fileGraphQL FormatterFormat, minify and validate GraphQL queries and schemas, with errors by line and columnSQL FormatterFormat and beautify SQL for PostgreSQL, MySQL, SQL Server and moreMarkdown PreviewWrite Markdown and see it rendered live, with tables, task lists and codeHTML Formatter & MinifierIndent messy HTML, or minify it and see the bytes you savedCSS Beautifier & MinifierTidy a stylesheet or minify it, with the size saved shownJavaScript Beautifier & MinifierBeautify JavaScript, or minify it and see how many bytes went

In the collections JSON Tools · Code Formatters and Minifiers.

Was this tool helpful?
Omnikit

Small jobs, done in your browser. Free, fast and private. Files are never uploaded.

Files

  • Compress Image
  • Image to PDF
  • Merge PDF
  • Compress PDF
  • PDF to Word
  • Word to PDF

Dev

  • JSON Formatter & Validator
  • Base64 Encode & Decode
  • JWT Decoder, Verifier & Encoder
  • Password Generator
  • UUID Generator
  • Unix Timestamp Converter

Money

  • SIP Calculator
  • EMI Calculator
  • GST Calculator
  • FD Calculator
  • PPF Calculator
  • Lumpsum Calculator
GuidesQuestionsAboutHow we checkLaw library (beta)PrivacyTermsDisclosureContactMore: Exam practice (UGC NET Paper 1)Runs in your browser. Nothing is uploaded. © 2026 Omnikit (theomnikit.com)