Token-aware
Strings, url() values and comments are recognised before anything is removed, so a semicolon inside content text stays where it is.
Strip comments and whitespace from CSS to make it smaller, or lay minified CSS out one rule per block. Strings and url() values are never touched.
CSS written for people is full of indentation, line breaks and comments that the browser does not need. Minifying removes them, so the file downloads faster. Beautifying does the reverse for a minified file you need to read.
The tool reads the CSS as tokens before changing it. A string such as content: "a ; b", a url() with spaces in it, and a comment are each recognised as a unit first, so nothing inside them is altered. Simple minifiers work on characters and will happily remove the double slash from a URL or the spaces inside a quoted font name, which produces CSS that looks fine and renders differently.
Comments, except those that start with /*!, the convention for licence notices. Line breaks and indentation. Spaces around braces, colons, semicolons, commas and the selector combinators >, + and ~. The last semicolon in each block. Spaces that separate two values, as in margin: 0 auto, stay, because removing them would change the value, and so does the space after and in a media query.
It does not rewrite your CSS. Colours are not shortened, selectors are not merged and rules are not reordered. Those optimisations can change which declaration wins the cascade, and a bundler that sees every stylesheet in the project is the right place to make them. The result line tells you the size before and after, so you know what you saved.
Choose Readable and every rule opens its own block, each declaration sits on its own line indented by two spaces, a colon is followed by a space, and rules inside a media query are indented one level further. Comments stay where they were. This is the quickest way to read the stylesheet of a page you are debugging.
For other formats, the JSON formatter and SQL formatter work the same way. Everything here runs in your browser, so stylesheets from a project that is not public yet are never uploaded.
Paste your CSS
Choose minified or readable
Copy or download the result
Strings, url() values and comments are recognised before anything is removed, so a semicolon inside content text stays where it is.
The result line gives the size before and after in bytes and the percentage saved, so you can see whether it was worth doing.
Minify for production, or turn a minified file back into one declaration per line to read or debug it.
Processing runs on this device. Open the browser’s Network panel while the tool works and you will see no file upload request to FileGizmo. Temporary previews use local browser URLs, and closing or resetting the page releases them instead of leaving a server copy behind.
Use the tool without a daily task counter, account wall or watermark. Nothing is uploaded, so your device’s memory sets the practical size. Free limits a few repeat-work features, such as 20 images per background batch.
Use a current browser on desktop, Android, iPhone, or iPad without installing an app. Once this tool and its required assets load, the cached workflow works without a connection. Large jobs are usually more comfortable on a desktop with additional memory.
Not the way this does it. Only whitespace and comments are removed, and only where the syntax allows. Strings, url() values and the space a media query needs after "and" are kept exactly.
Yes. A comment that starts with /*! is kept, which is the convention libraries use to ask for their licence to survive minification. Every other comment is removed.
No. It does not shorten colours, merge selectors or reorder anything. Those changes can alter which rule wins, and a build tool that sees the whole project is the right place for them.
Yes. Choose Readable and every rule gets its own block, every declaration its own line, and nested at-rules such as media queries are indented.