Formateador y embellecedor CSS online y gratuito
El formateador CSS ordena tus hojas de estilo con la sangría y los saltos de línea adecuados, para que sean fáciles de leer y mantener. Respeta cadenas y comentarios, así que tu código queda intacto.
The matching minifier is the CSS Minifier, and translating the same rules into utility classes is the job of the CSS to Tailwind Converter. For the style properties themselves, the CSS Box Shadow Generator and CSS Gradient Generator produce ready-to-paste values.
Cómo usar Formateador CSS
- 1 Paste your stylesheet — minified or not.
- 2 Press Format. Each rule gets its own block with one declaration per line.
- 3 Check the reported errors for an unclosed brace, which is the usual cause of a rule silently not applying.
- 4 Copy the result. Consistent formatting makes a diff meaningful.
Cómo usarlo
Pega tu CSS y pulsa Formatear. La versión indentada y legible aparece a la derecha.
- Indenta las reglas según el nivel de anidamiento
- Mantiene intactos comentarios y valores de cadena
- Perfecto para limpiar CSS minificado o pegado
Preguntas frecuentes
Why is one rule missing after formatting?
Almost always because the input had an unbalanced brace. A single missing `}` causes everything that follows it to be parsed as part of the previous rule, and the browser discards what it cannot understand. Formatting makes that visible because a rule that should be separate appears nested inside another.
Does formatting affect specificity or cascade order?
No. Specificity comes from the selectors and the source order is preserved, so the computed styles are identical. Formatting only changes whitespace. That is exactly why it is safe to run on a stylesheet you inherited and cannot otherwise reason about.
Should I commit formatted CSS?
Yes, and then keep it formatted. A consistent format makes every subsequent diff show only the change that was made. A minified stylesheet in version control produces diffs where one character of change rewrites an entire line, which is unreviewable and hides real changes among noise.
Herramientas para desarrolladores relacionadas
También te puede interesar
Herramientas de otras categorías que suelen combinarse con Formateador CSS: