CSS Box Model Size Comparator

Enter fixed pixel dimensions, four padding and border widths; preview and copy CSS.

Enable JavaScript for interactive processing. You can read the instructions, limits, and FAQs below without it. Files are processed only in your browser.

CSS Box Model Size Comparator User Guide

Compare the content, padding and border dimensions of both box models at fixed CSS pixel sizes.

How to use

  1. Enter declared dimensions and the padding and border on each side.
  2. Compare both modes using the dimensions and scaled previews.
  3. Choose a mode and copy its CSS.

Formats and limits

  • Only one empty box with fixed CSS px is handled; external layout is excluded.
  • Width and height: 0–4096; padding and border on each side: 0–256; integers only.

Output

Copyable CSS declarations for the chosen mode.

Frequently asked questions

Are CSS px physical device pixels?

No; CSS px do not necessarily match physical device pixels.

The file name and content are only processed in your browser and are not transmitted to the server. The original file will not be overwritten. Please export the required results before leaving the tool.