:rl Ruler

How wide is that button? Hover it to see the pixels.

See any element’s size and the gap between two of them, in pixels. Press ⌘K, type :rl and point at the page to measure it.

7-day free trial No account Chrome, Edge, Brave, Arc, Vivaldi and Opera

Live demo

Measure an element in three steps

  1. ⌘K

    Step 1

    Open the palette

    On any page. Ctrl+K on Windows and Linux.

  2. :rl

    Step 2

    Start the ruler

    Rulers appear along the top and left edges.

  3. C

    Step 3

    Copy the size

    Click an element to select it, then press C.

In detail

How the ruler works

The ruler lays a see-through layer over the page. Everything you point at is measured, and nothing on the page changes.

Hover for size, click to compare

Point at an element to outline it with its tag, like button.btn, and its width × height. Click it to select it. Then point at a second element and the ruler draws the gap between them in pixels.

  • The selected element keeps its outline and size label while you point at others.
  • Click the element again or press Delete to deselect it.

Guides you drag out of the rulers

Drag down from the top ruler for a horizontal guide, or right from the left ruler for a vertical one. Guides stay pinned to the page as you scroll. Two guides on the same axis show the distance between them, and a selected element shows its distance to each guide.

  • Drag a guide back into the ruler, or double-click it, to remove it.
  • Press G to hide or show all guides.

Margins, styles and free measuring

Margin and padding are shaded around the element you point at, and a panel lists its styles, such as font size, line height and colors as hex codes. Press M to switch to free measuring and drag a line between any two points.

  • B hides or shows margin and padding, and S hides or shows the style panel.
  • In free measuring, hold Shift to keep the line straight. X clears your lines.
  • A hint bar at the bottom lists every key while the ruler is open.

More about the ruler

  • Copy the size

    Press C with an element selected to copy its size, like 148 × 40. You see Copied: 148 × 40.

  • Copy the element as an image

    Click the camera button next to a selection to copy just that element as a PNG, even when it’s taller than the screen.

  • Live position on the rulers

    Both rulers mark where your cursor is, in page pixels, so you can line things up by eye.

  • Keys stay with the ruler

    While it’s open, key presses go to the ruler, not the page. Reload with ⌘R or Ctrl+R still works.

  • No DevTools

    Check sizes and spacing on any page without opening the inspector or knowing its code.

  • Esc to leave

    Esc first cancels a line you’re drawing, then leaves free measuring, then closes the ruler.

FAQ

Questions about the ruler

More in the documentation.

How do I measure an element on a web page?

Press ⌘K on a Mac or Ctrl+K on Windows and Linux, type :rl and point at the element. Its width and height in pixels show next to it.

How do I measure the space between two elements?

Click the first element to select it, then point at the second. The ruler draws the gap between them in pixels.

Can I add guides like in a design app?

Yes. Drag one out of the top or left ruler. Guides stay with the page as you scroll, and you remove one by dragging it back or double-clicking it.

How do I copy an element's size?

Select the element and press C. A size like 148 × 40 goes to your clipboard.

Does it show padding and margin?

Yes, shaded around the element. Press B to hide or show them.

How do I close the ruler?

Press Esc. If you’re in the middle of a free measurement, the first Esc cancels that line.

One shortcut for your whole browser. Stop hunting for tabs.

Free for 7 days Then $3.99 / y No account