Drag on the stage to measure
Drag to draw a box. The rulers and the readout use CSS pixels.
Tick marks are CSS pixels. A 2× screen still reports CSS pixels, which is what layout code uses.
Help Us Improve
—
(—)
Measure CSS pixels on screen
Measure a box in CSS pixels. Drag on the stage, read width and height, and copy the size — free, no sign-in.
What is a pixel ruler?
Pixel ruler controls
Drag to measure: Draw a box on the stage. Width and height update while you drag.
Horizontal and vertical ticks: Rulers mark every 10 CSS pixels and label every 50.
Copy CSS size: Copy width and height as CSS declarations.
Origin readout: See where the box starts, in CSS pixels from the stage’s top left.
How to use the pixel ruler
Open the stage
The ruled area is the only surface this tool measures.
Drag a box
Press and drag. Release to keep the measurement.
Read or copy
Use the width × height line, or Copy CSS size.
Clear
Clear removes the box so you can measure again.
Tips for on-screen measuring
- 01
Reset browser zoom
Measure at 100% zoom when you want the number to match an unscaled layout.
- 02
Use CSS pixels in code
Do not multiply the readout by devicePixelRatio unless you are counting bitmap pixels.
- 03
Measure one box at a time
Clear the previous box before the next drag so the readout matches the new region.
When a pixel ruler helps
Spacing checks: Compare a gap you see on screen with the padding you plan to write.
Component sizing: Rough out a card or button size before opening a stylesheet.
Screenshot sanity checks: Hold a capture next to the stage and match a region’s CSS-pixel size.
Why measure here
No sign-in
Open the page and drag. Nothing is uploaded.
Free
No account and no watermark on the readout.
Matches layout code
The unit is the CSS pixel, which is what width and height in CSS mean.
Technical details
- Unit
- CSS pixels from pointer positions relative to the stage.
- Ticks
- Minor ticks every 10 CSS pixels. Labels every 50.
- Rounding
- Width, height, and origin are rounded to the nearest CSS pixel.
- Scope
- The stage only. Other windows and design files are not measured.
Sources & References
“The CSS pixel is synonymous with the CSS unit of absolute length px — which is normatively defined as being exactly 1/96th of 1 CSS inch.”
CSS pixel: This ruler reports CSS pixels, the unit used by width, height, and layout coordinates in the browser. developer.mozilla.org/en-US/docs/Glossary/CSS_pixel
“The devicePixelRatio of Window interface returns the ratio of the resolution in physical pixels to the resolution in CSS pixels for the current display device.”
devicePixelRatio: A high-density screen can show several device pixels per CSS pixel. This tool does not multiply by that ratio. developer.mozilla.org/en-US/docs/Web/API/Window/devicePixelRatio