OxyPages

Free Online CSS Formatter And Beautifier

Paste CSS and get it back readable. Everything runs in your browser.

Free. No account. Live in seconds.
Input
Formatted
Input: 1.4 KB, 1 lineFormatted: 0 B, 0 lines
Your CSS on a sample page. Free. No account. Live in seconds.

How It Works

How To Use The CSS Formatter

  1. 1

    Paste Or Open Your CSS

    Drop minified, single-line or unevenly indented CSS into the left pane, or open a .css file from your computer. The sample shows what a production stylesheet looks like.

  2. 2

    Pick Your Layout

    Choose 2 spaces, 4 spaces or tabs, put each selector on its own line, add a blank line between rules, or keep the blank lines you already had. The formatted result updates on the right as you change options.

  3. 3

    Copy, Download Or Publish

    Copy the formatted CSS, download it as formatted.css, or publish it on a demo page to see the rules applied. No account is needed for the 30-minute link, and claiming it is free.

About This Tool

What This CSS Formatter Does

It takes a stylesheet that is hard to read and gives it back with one declaration per line, rules separated, nested blocks indented, and nothing about the styles themselves changed.

Stylesheets end up unreadable for boring reasons. A file copied from a site's source arrives minified onto a single line. A page from ChatGPT or Claude mixes two-space and four-space indentation after a few rounds of edits. A theme a designer handed over has selectors squeezed together with no blank lines between rules. This CSS formatter reads the stylesheet, works out where each rule, declaration, media query and keyframe block begins and ends, and writes it out again with consistent indentation so you can see the structure at a glance. If you just need to format CSS once, paste, copy, done; the options are there for when the default is not what your editor expects.

Who It Is For

Anyone holding CSS they did not write from scratch. If you are trying to find which rule sets the colour of a button on a page an AI wrote, comparing two versions of a theme, or turning a minified production file back into something you can edit, a readable copy is the first step. Developers use a CSS beautifier before a code review; people learning CSS use one to see how a real stylesheet is put together. Format both versions of a file and the differences line up.

How It Works

Formatting runs entirely in your browser using the same open-source library behind the “format document” command in many code editors. Your CSS is never sent to a server while you format it. You choose the indent style (2 spaces, 4 spaces or tabs), whether a comma-separated selector list is split so each selector sits on its own line, whether rules are separated by a blank line, and whether the blank lines already in your input are kept. Comments, custom properties, @media and @keyframes blocks, and strings inside url() or content are all preserved. The output updates as you type, and “Use as input” feeds the result back in to try different options. The status line shows the size and line count of both sides, because pretty-printed CSS is almost always larger than the minified file it came from.

What It Does Not Do

A formatter indents; it does not validate or repair. A missing closing brace, a stray semicolon or a misspelt property stays as it was, though it is usually far easier to spot once everything is indented. It also does not reorder declarations or rename anything, so the cascade is exactly what it was. When you are ready to ship, the CSS minifier strips the whitespace back out, and the HTML formatter does the same job for the markup around it.

Then See It On A Page

CSS on its own is not a web page, so the publish button below the formatter wraps your stylesheet in a small demo page with a heading, a paragraph, a button and a few cards, and puts it on a free OxyPages subdomain with HTTPS, in seconds, with no account. The link lasts 30 minutes; claiming it is free and keeps it permanently, with your own address and, on paid plans, a custom domain. To publish a real page, paste the CSS into a <style> block of your HTML or upload it beside the HTML in a ZIP. Read how it works or compare plans.

Questions

Frequently Asked Questions

Yes. The formatter runs in your browser and your CSS never leaves your device while you format it. Copying and downloading are local too. Nothing is sent to OxyPages unless you press the publish button, and only then.

Try It Now

Still Here? Drop It In.

The whole pitch fits in one sentence: your HTML, on a link, in seconds.

Drag and drop your HTML file(s), folders, or ZIP file

or ·

No account needed. Your unclaimed website stays live for 30 minutes on a free subdomain. Claim it to your account to keep it permanently.

  • No Account Needed
  • Free SSL
  • 30-Minute Unclaimed Link, Claim To Keep It