Design tool

Online Screen Ruler — Measure in Pixels

Move the two markers to measure a distance on the ruler. Enter a calibration only if you know how many screen pixels equal a real-world length.

Runs in your browser. No upload.

Measure CSS pixels on this display. Physical units are estimates unless you calibrate the ruler.

050100150200250300350400450500
Calibrate

Use the range controls to move the markers.

Use the range controls to move the markers.

About this tool

Online Screen Ruler — Measure in Pixels made simple.

The ruler measures CSS pixels, not physical screen size. Display scaling and device settings vary; calibrated millimeters or inches are estimates and should not be used for precision work.

Guide

Using Online Screen Ruler — Measure in Pixels

The Screen Ruler is a drawn scale from 0 to 500 with two sliders that place a start marker and an end marker. It shows the gap between them in the tool's own pixel units, which the page calls CSS pixels. If you type a calibration, meaning how many of those units match a length you know in millimetres, it also shows millimetres and inches. It suits rough checks only.

How to use it

  1. Move the Start position and End position sliders, each from 0 to 500, until the two markers sit where you want on the drawn ruler.
  2. Read the Measured length line under the sliders. It is the gap between the markers as a whole number, and it is the same whichever marker is further along.
  3. To see millimetres and inches, open Calibrate. Hold an object of known size against the scale, put the markers on its two edges, and type that gap as Pixels per known length and the object's real size as Known length (mm).
  4. Move the markers again to read new lengths at the same zoom. Press Clear calibration to go back to pixels only.

Worked examples

A plain pixel reading

You enter
Start
40
End
240
You get
Measured length px
200

The distance is the end minus the start, 240 minus 40. With nothing typed in Calibrate, the tool shows only this pixel figure and no millimetres.

Run through the tool’s own code.

Calibrating with the CSS definition of an inch

You enter
Start
40
End
240
Pixels per known length
96
Known length mm
25.4
You get
Measured length px
200
Millimeters
52.92
Inches
2.08

CSS defines 1 inch as 96 pixels, and 1 inch is 25.4 mm. So 200 pixels is 200 times 25.4 divided by 96, which is 52.92 mm. This is the CSS inch, which may differ from a real inch on your screen.

Run through the tool’s own code.

Calibrating with an object you measured

You enter
Start
100
End
250
Pixels per known length
324
Known length mm
85.6
You get
Measured length px
150
Millimeters
39.63
Inches
1.56

Suppose a card known to be 85.6 mm wide spanned 324 units on the scale. Then 150 units is 150 times 85.6 divided by 324, which is 39.63 mm, or 1.56 inches. The result is only as good as the first reading.

Run through the tool’s own code.

A calibration box left at zero

You enter
Start
40
End
240
Pixels per known length
0
Known length mm
25.4
You get
Shown
pixels only, no millimetres or inches

Both calibration numbers must be above zero. If one is zero or empty, the tool quietly skips the conversion and keeps showing pixels, so check that both boxes are filled in.

Run through the tool’s own code.

When it helps

  • Get a quick pixel gap between two points when planning a layout or checking a size you already know in pixels.
  • Teach what a CSS pixel is and how a scale factor turns pixels into millimetres.
  • Make a rough size estimate of a small object held against the screen after calibrating with another object.
  • Compare two lengths on the same scale to see which is longer and by how much.

Limits to keep in mind

  • The scale covers whole units from 0 to 500 only, so the tool cannot measure longer distances and cannot read sizes of other windows or pictures on your screen.
  • Millimetres and inches exist only after you calibrate, and accuracy depends on that calibration. Changing the browser zoom, display scaling or window width afterwards can make the numbers wrong.
  • From the page styles, the drawn scale stretches to the width of its panel, so a tick labelled 100 is not promised to be 100 device pixels. Redo the calibration if the panel changes size.
  • Physical readings are estimates. Do not use them for cutting, fitting, printing to size or any work that needs a precise measurement.

Tips

  • Calibrate with the longest straight-edged object you have, because small reading errors matter less over a long span.
  • Keep the browser zoom and window size the same between calibrating and measuring, and re-check with a real ruler.
  • Write down your calibration pair, such as 324 units for 85.6 mm, so you can type it back in later.

Sources

Common questions

About Online Screen Ruler — Measure in Pixels.

Is the screen ruler accurate in real-world units?

Only as accurate as your calibration, and never precise enough for exact work. The page itself says calibrated millimetres and inches are estimates. Screens differ in size, resolution and scaling, so a ruler on a web page cannot know the true physical size of a pixel by itself.

What is a CSS pixel, and is it a screen pixel?

A CSS pixel is a unit defined by the web standard as 1/96 of a CSS inch. On many screens one CSS pixel covers more than one device pixel, and browser zoom changes the match. That is why a pixel count alone does not give a physical length.

How do I calibrate the ruler?

Open Calibrate, hold an object of known width against the scale, and set the two markers on its edges. Type the marker gap as Pixels per known length, and the object's true width in millimetres as Known length. From then on the page converts every reading using that ratio.

Why do the millimetres change when I zoom or resize the page?

The conversion is a fixed ratio you typed, but the size of the scale on the screen can change with zoom or panel width. After a change, the ratio no longer matches what you see, so clear the calibration and do it again at the new size.

Can I measure things on other websites or programs?

No. The tool does not look at the rest of your screen. It only compares two marker positions on its own scale. To measure something real you must hold it against the display, which is why the calibration step uses a known object.

What is the longest length I can measure?

Five hundred units, because the sliders run from 0 to 500. The calibration boxes accept values up to 10,000 pixels and 10,000 mm, but the markers themselves stop at 500.

Is anything I type uploaded?

No. The page says it runs in your browser with no upload, and the ruler only reads the slider and calibration boxes on the page. There is nothing to sign in to and no file to send.

How do I use Screen ruler?

Move the two markers to measure a distance on the ruler. Enter a calibration only if you know how many screen pixels equal a real-world length.

Is my data uploaded to a server?

No. This tool runs locally in your browser. Your input is not uploaded.