The short answer
Why use Online Ruler?
Holding a real ruler to a screen gives a different answer on every device. Measuring in the image's own pixels, then scaling by a known object, gives the same number wherever you open it.
The two points start at 25% across and 35% down, and at 75% and 65%. Drag them to the ends of what you are measuring, or type Start and End X and Y in pixels. The status line reads Distance with two decimals. With Pixels per unit at 1 the answer is in pixels; any other value switches the label to units.
The scale is only right for things at the same distance from the camera as your reference. A coin on a table and the table's far edge are at different distances, so one scale cannot serve both. Lay the reference flat next to the object and shoot from straight above to keep errors small.
Measure Distance is the same tool under its plainer name. For the angle between two lines, use Measure Angle; for the edge length of a triangle, Measure Perimeter. If you only need the image's own width and height, Measure Image reads those without placing points.
Setting the image ruler to scale, with real numbers
Say a bank card lies next to a shoe in your photo. Drag the points to the ends of the card's long edge and the status reads, for example, Distance: 428.00 px. The card is 8.56 cm long, and 428 ÷ 8.56 = 50, so type 50 in Pixels per unit. From then on every reading is in centimeters. For inches, divide by 3.37 instead, which gives about 127.
With any calibration value besides 1, the readout switches its label from px to units, since the tool cannot know whether you measured the reference in centimeters, inches or something else. Write down what you chose. The answer shows two decimals, but the true accuracy depends on where you dropped the points: at 50 pixels per centimeter, one pixel of misplacement is 0.2 mm.
Scans and screenshots that need no reference object
A flatbed scan already has an exact scale. Scan at 300 DPI and there are 300 pixels to every inch on the glass, so enter 300 to read inches or 118.11 to read centimeters (300 ÷ 2.54). If you are unsure what the scanner saved, DPI Checker shows the resolution stored in the file.
Screenshots work the same way. An iPhone or Retina Mac screenshot holds 2 or 3 device pixels for every CSS pixel, so a designer checking a gap in a layout can enter 2 or 3 and read the spacing in CSS pixels, the unit the stylesheet uses.
Lens bend at the edges of an online ruler photo
Phone cameras use short, wide lenses, and their software straightens the picture only partly. Straight edges near the frame borders can still bow, and the 0.5× ultra-wide camera bends them the most. Keep both the object and the reference near the middle of the picture, and stay on the main 1× camera or a 2× zoom.
Stepping back and zooming in helps too. The farther the camera is from the scene, the smaller the size difference between near and far parts of the object, so the single scale you set fits more of the picture.
Where Online Ruler fits
Online selling
Estimate an item's length from a photo when the listing gives no size.
Furniture fit
Measure a gap in a room photo with a tape measure in the shot.
Plant growth
Track a seedling's height in weekly photos taken next to the same ruler.
Start to finish
How to use Online Ruler
- 01Tap Choose image and pick a photo with a reference of known size, like a card or ruler, beside the object.
- 02Measure the reference, divide the pixel reading by its real length, and type the result in Pixels per unit.
- 03Drag the two points to the ends of the object and read Distance; Apply changes and Download result save the PNG.
What to expect from Online Ruler
| Check | What it means here |
|---|---|
| Supported input | JPEG, PNG, WebP, GIF, BMP, SVG and browser-supported AVIF images |
| Main controls | Draggable points, exact X and Y fields, and an optional pixels-per-unit scale |
| Output | The measurement on screen and a marked-up copy of the image |
| Working limit | 50 MB and 50 megapixels per image |
Online Ruler tips
- A bank card's long edge is 85.6 mm, a handy reference.
- Keep the reference at the same distance from the camera as the object.
- Photograph from straight above to avoid foreshortening.
- With Pixels per unit at 1, readings are plain pixels.
Online Ruler FAQ
Something missing? Ask us.
Why does the online ruler say units instead of cm?
Can I measure a curved length in a photo?
Is this a real-size ruler on my screen?
How do I measure in centimeters?
Is it different from Measure Distance?
Does Online Ruler upload my file?
Is Online Ruler free to use?
Why did Online Ruler fail or look wrong?
Related tools
More in Utilities.
