On-Screen Ruler
Measure a span on your screen in CSS px, inches or centimetres with a draggable overlay and a stated DPI. Nothing is uploaded.
What the on-screen ruler measures
The blue span is a draggable overlay: drag its edge and the page reports the
span's length. The span is measured in CSS pixels, and the DPI you enter —
96 by default — turns pixels into inches (px / dpi) and centimetres
(inches × 2.54). The DPI is a stated assumption, never a claim about your
panel: browser zoom and display scaling change what a CSS pixel covers, which
is why the setting stays explicit instead of pretending to detect your screen.
How to use it
Hold a real ruler against the blue span once and set the DPI so they agree. Then drag the edge of the span to the object you are measuring and pick px, in or cm; the readout updates live as you drag, and a Copy button takes the reading to the clipboard.
Worked example
A span of 192 px at the default 96 DPI reads 2.00 in; switching the unit
to centimetres reads 5.08 cm. A DPI of 0 or a non-number is refused with
the field named, and the readout shows a dash until the setting is fixed.
Why it runs in your browser
The arithmetic is pointer math plus one division, done in this tab. The DPI and unit persist under a namespaced key so the calibration survives a reload; when storage is blocked the page keeps working and says so in one line. Nothing is measured remotely and nothing is uploaded.
The page reports a draggable span's length in the unit you pick.
192 px at the default 96 DPI reads 2.00 in; centimetres read 5.08.
The DPI is a stated assumption — calibrate once against a real ruler.
Calibrate, then drag
Hold a real ruler against the blue span once and set the DPI so they agree; that one calibration absorbs your zoom and display scaling. Afterwards drag the span's edge to anything on screen and the readout follows in px, in or cm.
The span measures CSS pixels, not panel pixels, which is why the same drag reads differently at different zoom levels until you recalibrate.
- Set the DPI against a real ruler once
- Drag the span edge to the object
- Switch units without losing the span
Refusals name the setting
A DPI of zero or a non-number names the DPI box and holds the readout at a dash instead of dividing by nonsense. An unknown unit is refused the same way.
When browser storage is blocked the calibration simply does not persist, and the page says so in one line rather than failing.
How to use the span and DPI
Hold a real ruler against the blue span once and set the DPI, CSS px per inch, 96 by default, so they agree; that one calibration absorbs your zoom and display scaling. Drag the span edge to the object and pick px, in or cm in Unit; the readout updates live as you drag.
Press Copy to take the reading to the clipboard. A DPI of 0 or a non-number holds the readout at a dash with the field named, and the calibration persists under a namespaced key so it survives a reload.
What to Expect
Best for
- Sizing an element against a known reference
- Reading px, in and cm from one span
- Quick calibration-checked estimates
Not ideal for
- Certified physical measurement
- Uncalibrated screenshots
- Sub-pixel typography work
What this tool keeps
- The span while switching units
- The DPI across reloads
- Two-decimal readout spelling
What may need cleanup
- Recalibration after a zoom change
- Panel scaling the OS applies silently
- Parallax when holding a ruler to glass
Common errors
- Reading CSS px as physical px
- Skipping the one-time calibration
- Entering 0 as the DPI
Example use cases
- Checking a 192 px banner at 96 DPI
- Comparing in and cm readouts
- Copying a measured length
Sample input
A 192 px span at 96 DPI.
Sample output
2.00 in — 5.08 cm in centimetre mode.
Who this is for
- Designers checking on-screen sizes
- Shoppers comparing product photos
- Anyone without a ruler to hand
Frequently asked questions
Does the ruler measure physical size?
No. It measures CSS pixels converted at the DPI you enter — 96 by default — so calibrate once against a real ruler before trusting inches or centimetres.
Why is the DPI a setting instead of auto-detected?
The page cannot know your panel density: browser zoom and display scaling change what a CSS pixel covers, so an assumed 96 is stated and adjustable rather than a silent guess.
Is anything I measure uploaded?
Nothing. The readout is pointer math in this tab, the calibration persists under a namespaced key in your own browser, and the page keeps working once loaded even offline.
Build custom tools for your store
Join the SDK program to create useful ecommerce utilities for your store.