jump totool workspace
ToolHub

CSS tools

Format, compress, and assist with scaling CSS.

Runs the entire process locally
views
—
favorites
—

CSS

1 lines · UTF-8Loading…

Result

The processing results will be displayed here
1 lines · UTF-8Read only results

Tool description and FAQ

Tool Guide

01Professional CSS formatting and compression

Formatting uses Prettier's CSS parser; compression uses the CSS Tree syntax tree, preserving necessary whitespace in the selector and calc() operation whitespace. Automatically updates after modifying input, indentation or pattern; clears old results on error.

02Relative unit reference

The unit page converts px, rem, em, vw, vh, and % based on the filled in font size, viewport width and height, and container width. All reference values ​​must be greater than zero. em and rem use the same manual font size reference and will not read page element styles.

FAQ

Q1Why are there still spaces after compression?

Whitespace may represent descendant selectors or mathematical operations; removal changes the meaning. Compression prioritizes semantic preservation and does not perform rule rearrangement or aggressive merging.

Q2Why do em and rem have the same result?

Both use the current manually filled font size. ems in real web pages depend on element context, this tool does not infer inheritance chains.

Q3Will content be uploaded or saved automatically?

Input, results and files are only processed locally and are not uploaded or automatically saved. Copying and downloading are done on your own initiative.