How to Use the CSS Prettifier Online
- 1Paste a selector with its full declaration block, or include a small set of related rules that you want to read together.
- 2Select two or four spaces under Indentation Spacing. Change the selection to preview the indent used at each level.
- 3Read the declaration lines under the selector. For a media query, look for the extra indent on the rules grouped inside it.
- 4Copy the formatted result for a review or an example. When replacing source, compare any strings, comments, and values that rely on their original spacing.
Input & Output Examples
The selector opens a block and each declaration appears on its own indented line.
.card{padding:1rem;color:#123}.card {
padding: 1rem;
color: #123
}The media query and its inner rule are shown at different indentation levels.
@media (min-width:40rem){.grid{display:grid;gap:1rem;}}@media (min-width: 40rem) {
.grid {
display: grid;
gap: 1rem;
}
}Practical Developer Workflows
- Expand a generated rule while tracking down which declaration controls the spacing or color of a component.
- Prepare a small stylesheet for a code review so each affected property can be discussed on its own line.
- Inspect the conditional styles inside a media query before comparing them with the default declarations.
Zero Server Uploads & Complete Privacy
Runs 100% in your browser; no data is uploaded to any server.
Let us know directly so our engineering team can fix it.