CSS beautifier and minifier

    Format CSS neatly, or minify it to save bytes.

    Your text stays on this device

    About the CSS Beautifier & Minifier tool

    This CSS beautifier formats CSS with one property per line and clean indentation, or minifies it by removing comments and unneeded spaces. The minifier keeps the spaces that matter, such as descendant selectors, "and (" in media queries and the operators inside calc(), keeps /*! licence comments, and shows the size saved. Rules are never renamed, merged or reordered, so the page looks the same. Download the result as styles.css or styles.min.css.

    At a glance

    Modes
    Beautify (2 spaces, 4 spaces or tabs) or Minify
    Minify removes
    Comments, extra whitespace and the last semicolon in each block
    Kept
    /*! licence comments; rule order and names unchanged
    Output
    styles.css or styles.min.css, with the bytes saved shown
    Price
    Free, no sign-up
    Works in
    Your browser, on phone or computer. Works offline after the first visit.
    Privacy
    What you type never leaves your device.

    How to beautify or minify CSS

    1. Paste your CSS or open a .css file.
    2. Choose Beautify (and an indent) or Minify.
    3. Copy the result or download styles.css / styles.min.css.

    Private

    Your text stays in your browser and is never sent to a server.

    Instant

    Results update as you type, with nothing to install.

    Free

    No sign-up, no limits and no ads inside your writing space.

    CSS Beautifier & Minifier: frequently asked questions

    How much smaller does minified CSS get?

    It depends on how many comments and spaces the file has; the exact saving is shown above the result after you minify. Your server's gzip or Brotli compression reduces the size further.

    Is the minifier safe?

    It only removes comments, whitespace and the last semicolon in each block. It does not rename, merge or reorder rules, so the CSS behaves the same. Comments starting with /*! (licences) are kept.

    Can I turn minified CSS back into readable CSS?

    Yes. Paste the minified CSS and choose Beautify. Comments that were removed cannot come back.

    Is my text sent anywhere?

    No. Everything runs in your browser and your text never leaves your device. Nothing is stored on any server.