Skip to content

Design tool

Pixel Ruler

Drop in a screenshot or mockup and drag to read exact pixel dimensions. Pick colours as HEX or RGBA, magnify to land on the right pixel, and export a PNG with the measurement marked. Nothing leaves your machine.

Retina-accurateHEX & RGBA pickerPNG exportNothing uploaded
Crosshair
Snap
Grid
Checkerboard
Zoom: 100%
Cursor: 0px, 0px

Drop or paste an image. Click a ruler to add a guide (drag to move, right/⌘-click a ruler to remove). Hold Space or use the middle mouse to pan. Use Ctrl/Cmd + wheel to zoom. Click the image to pin and copy a color. Drag the selection handles to resize.

Four steps

How to measure pixels in an image

  1. 1

    Load an image

    Drag a screenshot, mockup or wireframe onto the canvas.

  2. 2

    Drag a selection

    Click and drag over the element, width × height reads out live in pixels.

  3. 3

    Pick a colour

    Click any pixel to pin its colour, then copy the HEX or RGBA value.

  4. 4

    Export the evidence

    Save a PNG with the measurement drawn on for a bug report or review.

What this is actually for

Design systems specify spacing in numbers, 8, 16, 24, 32. Implementations drift. A pixel ruler is how you find out whether that gap is the 24 px the spec says or the 21 px somebody nudged it to, without opening the design file or the dev tools.

Device pixels versus CSS pixels

This trips up almost everyone at some point. A CSS pixel is a logical unit; a device pixel is a physical one. On a standard display they are the same. On a 2× Retina screen, one CSS pixel is drawn using four device pixels, so a screenshot of a 100 px element is 200 px wide in the file.

The tool reports the image’s own pixels, which is what you want when checking an asset. If you are comparing against a CSS value on a 2× display, halve the reading, or take the screenshot at 1× to avoid the arithmetic entirely.

The spacing scale worth knowing

Most design systems use a 4 px or 8 px base scale, so real values cluster on 4, 8, 12, 16, 24, 32, 48 and 64. A measurement of 23 px is almost always a 24 that drifted, and knowing the scale tells you immediately whether you have found a bug or a rounding artefact.

Privacy

The image is loaded into a canvas element in your own browser and read back from there. There is no upload, no server processing and no analytics on the content, which is the only reasonable way to handle screenshots that may contain unreleased work or personal data.

Related tools

The aspect ratio calculator works out missing dimensions when resizing, the unit converter translates pixels to physical units at a given density, and the online ruler handles real-world measurement. For layout sketching on paper, dot grid exports as clean SVG.

Answers

Frequently asked questions

Yes. The tool reads the device pixel ratio and reports measurements in the image’s own pixels, not in CSS pixels. On a 2× display that distinction matters enormously, without it every measurement would be exactly half of the real value.

No. Everything runs through the browser Canvas API on your own machine. The image is never transmitted, which matters when you are measuring an unreleased design or a screenshot containing customer data.

Click any pixel to pin its colour, then copy the value as HEX or RGBA. The magnifier helps land on the exact pixel you want, which matters on gradients and anti-aliased edges where neighbouring pixels differ.

Units. The online ruler measures physical distance, centimetres and inches, against a calibrated screen. This measures in pixels, the unit CSS and design tools actually work in. Different jobs entirely.

Yes. The export is a pixel-perfect crop of the original with the measurement drawn on top, no recompression, no resampling. Useful for annotating a bug report or a design review.

Take a screenshot first and drop it in. Browser security prevents any page from reading the pixels of another, so a screenshot is the way in, and it also gives you a fixed reference you can re-measure later.

Need a different sheet?

Everything on this site is free, runs in your browser and exports print-ready PDF. Browse the full index and take what you need.