Select language

Interface controls and tool names are translated. Detailed instructions, legal text and some form labels remain in English. Your files are not translated.

Easy To Use - 140+ Free Online Tools

Minify JSON

Validate JSON and remove whitespace outside strings.

Drop your files here

or

Choose files

Max 100 MB per file · JSON

    Text options

    UTF-8 files only. Up to 300,000 characters per file.

    Your file is ready!

    Download
    Free No watermark No sign-up Files never uploaded
    Hard to read now?Use Format JSON to make it readable again.
    Need to edit later?Keep a formatted copy.
    Want it smaller still?Turn on Gzip on your server.

    How to use Minify JSON

    1. Select your JSON files.Add JSON files up to 2 MB for websites, apps or APIs.
    2. Click Minify JSON.Only whitespace outside text values is removed.
    3. Download your JSON file.Save the smaller one-line JSON; the data stays the same.
    4. Check the size.Spaces are removed, and the data is unchanged.

    About Minify JSON

    When is it useful? Minify JSON removes all unnecessary spaces and line breaks from JSON, making the file smaller for websites, apps and APIs, and easier to paste into a single line.

    Good to know: the JSON is validated first. Only whitespace outside of text values is removed — spaces inside strings are kept — and numbers are not rewritten. The data stays exactly the same; only its layout changes. Files up to 2 MB are supported.

    Tips for Better Results

    • Keep a formatted copy for editing; minified JSON is hard to read.
    • Use Format JSON to make a minified file readable again.
    • Gzip compression on your web server reduces size further.

    Frequently Asked Questions

    Are spaces inside text values removed?
    No. Spaces inside strings are kept; only layout spaces are removed.
    Are numbers rewritten?
    No. Numbers are not changed.
    How do I read it again?
    Use Format JSON — and keep a formatted copy for editing.
    Works with: Websites · apps · APIs · most code editors

    What converts well, and what doesn't

    In your JSONAfter minifying
    Spaces and line breaks outside textRemoved
    Spaces inside stringsKept
    NumbersNot rewritten
    The dataStays exactly the same
    JSON checkDone first
    💡 Tip: Gzip compression on your web server reduces size further.

    Common uses

    WebsitesSmaller files.
    AppsFaster loading.
    APIsCompact payloads.
    Single lineEasy to paste.
    ConfigCompact settings.
    StorageSave space.

    Is my file safe?

    Browser processing: your files are processed on your own device and are never uploaded to our server.

    Advertisement
    Guide

    Minify JSON: a complete guide

    Why minify JSON

    Spaces, indentation and line breaks make JSON readable for people but add size that computers do not need. Minified JSON loads faster in websites and apps, uses less bandwidth, and fits into a single line for configuration fields, environment variables and API tests.

    How it works

    Upload a .json file of up to 2 MB. It is checked to be valid JSON first, then all whitespace outside text values is removed. Spaces inside strings are kept, numbers are not rewritten, and key order is unchanged — the data stays exactly the same.

    How much smaller

    Savings depend on how the file was formatted: nicely indented JSON often shrinks by 20–40%. For websites, combine minification with gzip or Brotli compression on your server for the biggest savings.

    Common problems and how to fix them

    “Invalid JSON”: fix the reported problem — often a trailing comma or comments. You need to read the file again: use Format JSON to expand it. Escaped characters look strange: they were already in the original and are kept exactly.

    Good habits

    Keep a formatted copy for editing, minify only for deployment, and test the application with the minified file.

    Advertisement