Switching language reloads this page. Copy or save any inputs and results first.
29 / DATA
CSS formatter
Make selectors and declarations readable. Supports media queries.
Formats with Prettier without executing code. Up to 100,000 characters. Syntax errors are shown without being fixed. TypeScript, SCSS, and external plugins are not supported.
Inputs and results are processed in your browser and are not saved.
How to use, examples and questions
Format CSS selectors and declarations with Prettier, including line breaks and indentation. Supports comments, custom properties and media queries. Input CSS is not applied to the page.
CSS formatter — how to use
Paste CSS.
Choose 2 spaces, 4 spaces or tabs, and a preferred line width.
Press “Format”, review the result, then copy it or save a .css file.
Input and output examples
Make CSS declarations readable
Settings: 2 spaces
Input
.card{display:grid;gap:16px}
Output
.card {
display: grid;
gap: 16px;
}
Frequently asked questions
Can I format SCSS or Less?
This tool supports regular CSS. SCSS, Less and HTML documents containing CSS are unsupported.
Does formatting change the appearance?
The CSS is not applied to an actual page, so this view cannot show its appearance. Check the formatted code where you use it. Input limit: 100,000 characters; processing stops after 10 seconds.
Specifications and limits
Formats CSS with Prettier. Maximum 100,000 characters. SCSS and Less are unsupported.
Analytics and privacy
Conversion inputs and results are processed in your browser. Image URL and OGP loads connect directly to your chosen destination only when you select the corresponding button. Image, video, Markdown, HTML, CSV and TSV files are not uploaded to our servers. Self-signed certificates and signatures are generated locally; private keys are never sent to our servers or analytics. Markdown external images and HTML scripts are not loaded. The API client sends the URL, headers, body and selected files directly to the endpoint only when you select Send or its shortcut. Speed tests exchange generated test data with Cloudflare when you start a measurement. These destinations receive your IP address. We do not proxy these connections or send inputs or measurement results to analytics. Conversions are not saved automatically. Unsaved API inputs, responses, history and environments stay only in this page. Only API requests explicitly selected with Save in this browser are stored. Auth fields, secret variables, known auth headers and files are excluded; review URLs, bodies and custom headers for other secrets first. Collection exports include URLs and bodies, so review them before sharing.
When analytics is enabled, we use Google Analytics 4 to measure pages, tool names and use counts, actions such as copying or saving an image, speed test starts, completion, cancellation and errors, product link clicks, and monitoring guide and service clicks using fixed IDs. Google uses cookies and collects device and browser information. Google signals for advertising and ad personalization are disabled.
Disabling analytics stores only that preference in this browser. Analytics settings never contain your inputs.Google's privacy policy