CSS Beautifier

Lay out a compact CSS rule so its individual declarations can be reviewed.

Lay out a compact CSS rule so its individual declarations can be reviewed.

How to use

  1. Paste the sample with the selector, braces, and both declarations intact.
  2. Format the rule and read the output from the selector to the closing brace.
  3. Check that the two declarations appear on separate lines under the same selector.

Worked example

Input

.card{margin:0;padding:12px}

Expected result

.card {
	margin: 0;
	padding: 12px;
}

Check the result

The formatted rule should retain the selector and both original property values.

Continue with another guide

Cookie
We care about your data and would love to use cookies to improve your experience.

Learn how we use cookies