Clean Hierarchy & Nested Media Query Support
Handles standard selectors, pseudo-classes, keyframe animations, and @media or @container queries with correct nesting indentation.
Free online CSS Formatter and Beautifier. Clean and indent stylesheet rules, sort properties alphabetically, minify CSS for production, with 100% browser privacy.
Prettify, organize declarations, and minify stylesheets
.card {
background: #ffffff;
border-radius: 1rem;
border: 1px solid #e2e8f0;
box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1),0 2px 4px -2px rgba(0,0,0,0.1);
padding: 1.5rem;
transition: all .2s ease-in-out;
}
.card:hover {
box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
transform: translateY(-2px);
}
.card-title {
color: #0f172a;
font-size: 1.25rem;
font-weight: 700;
margin-bottom: .5rem;
}
.btn-primary {
align-items: center;
background-color: #0284c7;
border-radius: .5rem;
border: none;
color: #fff;
cursor: pointer;
display: inline-flex;
font-weight: 600;
justify-content: center;
padding: .625rem 1.25rem;
}
.btn-primary:hover {
background-color: #0369a1;
}A frontend engineer needs to debug a minified vendor CSS file by expanding compressed single-line rules into readable, indented declaration blocks.
| Minified Input | .btn-primary{background-color:#2563eb;color:#fff;padding:.5rem 1rem;border-radius:.375rem;font-weight:600;display:inline-flex;align-items:center;transition:background-color .15s ease-in-out}.btn-primary:hover{background-color:#1d4ed8} |
| Formatted CSS | .btn-primary { align-items: center; background-color: #2563eb; border-radius: .375rem; color: #fff; display: inline-flex; font-weight: 600; padding: .5rem 1rem; transition: background-color .15s ease-in-out; } .btn-primary:hover { background-color: #1d4ed8; } |
💡 The beautified stylesheet makes it easy to inspect overrides, audit CSS specificity, and tweak design tokens.
Paste your unformatted, minified, or messy CSS stylesheet into the input editor, or choose from popular CSS presets.
Select your preferred indentation size (2 spaces, 4 spaces, or Tab) and toggle options such as sorting CSS properties alphabetically.
Click Beautify to neatly indent selectors, declarations, and media queries, or click Minify to compress CSS for production bundles.
Copy the resulting CSS to your clipboard or download it as a .css file.
Handles standard selectors, pseudo-classes, keyframe animations, and @media or @container queries with correct nesting indentation.
Optionally sort CSS declarations within each rule block alphabetically for consistent team style guides and faster property lookup.
Strip comments, remove extra spaces and newlines, and produce a lightweight production-ready CSS snippet in milliseconds.
Yes. It fully supports custom properties (--css-variables), CSS nesting syntax, @keyframes, @media queries, and modern selector pseudo-classes.
No. All tokenization, formatting, and minification run 100% locally in your web browser. Your private stylesheets and design tokens never leave your computer.
Yes. Toggle the "Sort Properties" option to automatically reorder declarations inside every selector alphabetically.
Developer Tools
Format, beautify, and minify HTML, XML, and SVG markup with clean indentation, comment stripping, and real-time live preview.
Format, beautify, and minify JavaScript and TypeScript code online. Clean up indentation, standardize semicolons and quotes, and compress scripts 100% in your browser.
Format, beautify, validate, and minify JSON data online with instant syntax error highlighting and tree inspection.
Format, beautify, and minify SQL queries online. Standardize uppercase keywords, indent joins and subqueries, and clean syntax client-side with zero data sent to external servers.
Generate secure, cryptographically random Version 4 (v4) and time-ordered Version 7 (v7) UUIDs and GUIDs with custom formatting, bulk batch generation, and live inspection.
Explore, navigate, and inspect complex JSON payloads with an interactive collapsible tree viewer, type badges, node search, and JSON path copying.