Output will appear here...
A JSON minifier removes every space, tab, and line break that sits between the tokens of a JSON document, leaving the smallest byte-for-byte equivalent that still parses. The data itself is unchanged - the same keys, the same values, the same order - but a pretty-printed 4 KB config can drop to 2.5 KB or less once the indentation is gone. Smaller JSON means faster network transfers, lower bandwidth bills, and quicker parsing on the receiving end, which is why API responses and bundled data files are almost always shipped minified.
This minifier strips whitespace only outside string literals, so text inside your values - including spaces you meant to keep - is preserved exactly. It also keeps your numeric tokens as written: a trailing-zero value like 1.0 or a 30-digit integer survives intact, because the tool removes whitespace rather than round-tripping every number through a parse that would rewrite it. Before minifying, it validates the input with the JavaScript JSON parser, so if a comma or bracket is out of place you get the parser's exact error instead of silently broken output. A beautify mode does the reverse, re-indenting compact JSON with two spaces, four spaces, or tabs so you can read and edit it.
Everything runs 100% in your browser. Your JSON - which often holds API keys, customer records, or internal configuration - is never uploaded or stored, and the tool works offline once the page has loaded. That makes it safe to minify sensitive payloads that should never leave your machine.
Paste or type a JSON object or array into the input area. It can be pretty-printed or already compact - either works.
Click Minify to strip whitespace and shrink the file, or Beautify to re-indent it. Choose 2 spaces, 4 spaces, or tabs for beautify.
Read the size badge to see the original size, the new size, and the percentage reduction. Invalid JSON is flagged with the exact parser error.
Copy the result to your clipboard or download it as a .json file, ready to drop into your API, config, or bundle.
Removes spaces, tabs, and newlines between tokens while leaving string contents untouched, producing the smallest valid equivalent
Keeps numeric tokens exactly as written - trailing zeros and large integers survive, because minify strips whitespace rather than reparsing values
Shows original size, minified size, and the percentage reduction so you can see the byte impact immediately
Re-indent compact JSON with two spaces, four spaces, or tabs to make it readable and diff-friendly again
Minify CSS to cut file size or beautify minified stylesheets for debugging
Minify HTML markup for faster page loads or beautify it for readable, indented source
Sort the keys of a JSON object alphabetically, recursively through nested objects, with optional array sorting. Ascending or descending, minify or pretty. Client-side, no signup.
Find and replace text with a regular expression, using capture group backreferences like $1 and named groups, with full flag support
0 comments
No comments yet. Be the first to share your thoughts!