What this online ruler does
This page draws a working ruler on your screen. It is not a photograph of a ruler: the browser draws the graduations at a scale taken from your own screen, so the centimetres and inches you see can match the ones on a real ruler once the page is calibrated. Two scales are available, a metric one in millimetres and centimetres and an imperial one in inches divided into eighths, and you can rotate the ruler so it runs down the screen instead of across it.
Everything runs in your browser. There is no account, no upload and no file to install, and the calibration you set is stored on your own device.
How to use the online ruler
- Pick a unit. Tap cm, mm or inch at the top of the ruler. The graduations redraw immediately; the zeros stay in the same place.
- Calibrate once. Press Calibrate and hold a bank card against the outline on screen. Slide until the outline and the card line up exactly, then press Save calibration.
- Put the object at zero. Line up the edge of what you are measuring with the zero mark at the top-left corner of the ruler, the end the numbers count from.
- Read the length. Press and drag to the far edge of the object. The reading under the slider shows how far that point is from zero, in the unit you picked.
- Rotate or go fullscreen when you need more room or a longer ruler. Fullscreen hides the browser bars, which is useful on a phone.
Why the ruler needs calibrating
A browser has no way of knowing how large a physical pixel is. By convention it treats 96 pixels as one inch, which is close on many desktop monitors and well off on others, and off again on phones and tablets, where pixel density is much higher than the desktop screens that convention was written for. An uncalibrated ruler is therefore an estimate.
Calibration fixes that with an object whose size is fixed by standard. The outline in the calibration panel is the ID-1 card format, 85.60 mm by 53.98 mm, the size used by bank cards, most loyalty cards and many identity cards. Because every card of that format is the same size, matching the outline to a real card tells the page exactly how many pixels your screen uses for a millimetre. From then on the graduations are drawn at that scale. A US quarter and a 1 euro coin are offered as alternatives for anyone who does not have a card to hand.
The calibration value is saved in your browser, on this device only. It is never sent anywhere, and clearing the site's data removes it.
Which unit should you use
| Setting | Smallest division | Numbered every | Good for |
|---|---|---|---|
| mm | 1 mm | 10 mm | Small parts, printed detail, anything under a centimetre |
| cm | 1 mm | 1 cm | Everyday measuring: paper, cards, photos, fabric |
| inch | 1/8 inch | 1 inch | US and UK habits, sewing patterns, hardware sold in inches |
One inch is exactly 25.4 millimetres, so the metric and imperial scales describe the same distances in different steps. If you need to convert a reading, multiply centimetres by 10 for millimetres, or divide millimetres by 25.4 for inches.
Measuring on a phone
Phones work, with one obvious limit: the screen is only a few centimetres wide, so a horizontal ruler shows a short length at a time. Two habits make it easier. Rotate the ruler and go fullscreen for a taller measuring edge, and measure long objects in parts, noting where each part ends and adding the readings up. Calibrate the phone separately from your computer, because the two screens have different pixel densities.
On a touch screen, a press and drag on the ruler moves the reading. Scrolling up and down still works outside the ruler area.
How accurate is it
The accuracy depends on two things: how carefully you matched the outline to a real card, and how flat the object sits against the glass. A card held flat against the screen gives the best calibration. Measuring something thick, or holding it above the surface, adds parallax and makes the reading read short or long. For work that needs finer than a fraction of a millimetre, use a physical ruler or a caliper; this page is for quick, everyday measurements.
Before calibrating, also check that browser zoom is at 100%. Zoom changes the size of a CSS pixel, so a zoomed page measures wrong until you reset it and calibrate again.
Which page to open next
If you want a scale dedicated to one unit, the inch ruler and the cm ruler pages open with that scale already selected. The actual size page explains what actual size means and how far the accuracy holds, and the vertical ruler opens rotated for measuring down the page. The calibration guide walks through the card and coin methods step by step.