JSON Formatter
Pretty-print messy or minified JSON with 2-space indents.
Shrink a stylesheet by stripping comments and needless whitespace in your browser. It removes spacing only and leaves the rules themselves alone.
Your browser is preparing the tool. It runs 100% locally.
Paste CSS and the tool removes comments and the whitespace around braces, colons, semicolons and commas, collapsing the stylesheet toward a single compact line. It is a fast whitespace minifier, so it does not do structural optimisation like shortening colours or merging rules, the way cssnano does. It is great for a quick size cut and shows the saving. It all happens in this tab, and nothing is uploaded.
This tool takes a readable stylesheet and compresses it by removing the parts that browsers ignore: comments, the spaces and line breaks around the structural punctuation, and the redundant final semicolon in each rule. The result is smaller CSS that behaves identically.
Use it to shave bytes off a stylesheet for production or for pasting inline when you have no build step running.
The tool runs a few regular expressions: it deletes comment blocks, removes the whitespace on both sides of braces, colons, semicolons, commas and child-combinator marks, drops the last semicolon before a closing brace, and collapses any remaining runs of whitespace to a single space.
This is pattern-based, not a parse. It keys off the structural punctuation rather than understanding selectors, properties or values. That makes it fast and dependency-free, and it shrinks ordinary CSS well, but it only removes whitespace. It does not rewrite or optimise the CSS itself.
• delete comment blocks
• remove whitespace around { } : ; , and the child-combinator mark
• drop the last semicolon before a closing brace
• collapse remaining whitespace to single spacesBefore: body { margin: 0; padding: 10px; }
After: body{margin:0;padding:10px}It shrinks by whitespace only. It does not shorten colours, merge duplicate rules, drop overridden declarations or reorder anything. The CSS stays the same and takes less space on disk.
Your CSS never leaves your device. It is minified in your browser with no network request, so nothing is uploaded.
Because the work is local, you can safely compress proprietary or unreleased styles without them being stored or sent anywhere.
Nothing carries over between visits. Close the tab and the input and output are gone.
It shrinks ordinary CSS reliably, but it removes only spacing and comments. It does not shorten hex colours, collapse margins, merge duplicate selectors or drop overridden declarations the way a structural tool does. The size cut is smaller as a result.
It keys off punctuation, so content that contains that punctuation can be affected. A semicolon or comma inside a string value or a data URI, or the meaningful spaces inside a calc() expression, may be collapsed or trimmed in ways that change the result. Check the output if your CSS has those.
It removes the final semicolon before each closing brace, which is always safe, and it strips comments, including any licence comment you may have wanted to keep. Add those back if you need them.
It is a one-way size cut, not a reversible format. To make the CSS readable again you would run it through a formatter, which re-adds whitespace but cannot restore the comments that were removed.
Compress a stylesheet when you have no build step running.
Minify a small stylesheet to drop into a style block.
See how much whitespace your CSS is carrying.
Compress CSS to send or embed compactly.
For maximum, safe compression that also optimises colours, merges rules and drops dead declarations, use cssnano or a bundler's CSS minifier in your build. To make minified CSS readable again, run it through a CSS formatter.
Shrinks by removing comments and the whitespace around braces, colons and semicolons; it removes whitespace only and does not shorten colours or merge rules.
Pretty-print messy or minified JSON with 2-space indents.
Paste JSON and find out whether it parses.
Standard Base64 for any text, emoji included.
MD5, SHA-1 and the SHA-2 hashes of any text, as you type.
Up to 500 random version 4 UUIDs at once.
Live match highlighting and a count, using JavaScript regex.
Paste, run and copy. The code stays in your browser and you don't need an account.