Neatbo.

CSS formatter

Reformat CSS into readable rules with consistent indentation and spacing.

Browser-local processingInputCSS sourceOutputFormatted CSS textUp to 10 MiB per file · File limit: 1
  1. 1Add input
  2. 2Adjust settings
  3. 3Get your result

Tool input and files are processed in this browser without being uploaded.

Your input

or drag and drop it here

Files stay on this device. Your originals stay unchanged.

.css · .txt

Up to 10 MiB per file · File limit: 1

    0 characters · 0 bytes
    Options

    Complete the required options first. You can keep the defaults for the rest.

    Inputs are kept temporarily in this tab when switching tools. Refreshing or closing clears them; large results may need to be regenerated.⌘ / Ctrl + Enter to run

    Preparing the tool…

    Before you start

    Use Prettier to format CSS source for reading and editing. The output stays in a text view: it is not applied to this page, and formatting does not fetch URLs referenced in the stylesheet.

    How to use this tool

    1. Paste CSS into “CSS source” or choose a UTF-8 file. To use the file, clear the pasted text; to use pasted text alone, remove the file.
    2. Choose 2 spaces or 4 spaces under Indentation, then select “Format CSS”. Prettier may also adjust line breaks and quoted strings.
    3. Read the full result, then use “Copy result” or download formatted.css. If you change the input or options, run the formatter again to update the output.

    Supported inputs and limits

    Paste up to 1 MiB of UTF-8 text or choose one file up to 10 MiB. Filenames can contain up to 512 UTF-16 code units; characters such as emoji may count as two. Nonempty pasted text is formatted in preference to a selected file, but the file is still checked and read.

    Worked example

    Example input

    a{color:red;margin:0}
    Example options
    {}

    Example output

    a {
      color: red;
      margin: 0;
    }
    

    When something does not work

    If formatting fails, review the CSS and indentation. For a file, save a UTF-8 copy in another application and select it again, or remove it and paste the CSS instead. Reduce oversized input or shorten a long filename. After changing anything or cancelling a run, select “Format CSS” to run again.

    Frequently asked questions

    Are my files uploaded?

    No. Your CSS and files are processed in your browser. While you move between tools in the same tab, a workspace may stay in memory, subject to size and time limits. Refreshing or closing the tab clears it. Download anything you want to keep.

    Does formatting check CSS validity or browser support?

    The parser can reject CSS it cannot read, but a formatted result does not prove that every property or value is valid or supported by a browser. This tool does not add vendor prefixes or minify your stylesheet. Review the CSS before using it on a site.

    Documentation & further reading

    Related tools