Convert rem to pixels at any base font size

Content last reviewed:

At the browser default one rem is 16 pixels, so 1.5rem gives 24. Enter a value in rem, set the base font size and read the result – the 10px base from the 62.5% technique works the same way.

rem
px
to
ADVERTISEMENT

Why convert rem to pixels?

Rem turns into pixels with a single multiplication: the value in rem times the base font size. At the browser default that base is 16px, so 1rem is 16 pixels and 1.5rem is 24. The unit refers to the text size of the html element, the root of the document – hence the name, root em [1].

The conversion earns its keep when you work from a mock-up. The designer hands over pixel measurements, the stylesheet stores them in rem, and you want one number to check whether a 1.875rem heading really is the 30 pixels from the design.

The base does not have to be 16px. The 62.5% technique sets it to 10px, and a reader can raise it in their own browser settings, which is why the base font-size field accepts anything from 1 to 100.

Below you will find a table of 26 values at three bases, the full Tailwind CSS type scale, and an explanation of why 16 is only a default. The journey the other way is handled by the pixels to rem converter.

How to work out rem to pixels by hand

The formula holds one operation: pixels = rem × base font size. The base font size is the text size set on the html element, and if nobody has changed it the browser uses 16px.

Take a 1.25rem spacing value: at a 16px base it comes to 1.25 × 16 = 20 pixels. The same value at a 10px base gives 12.5 pixels, and for a reader who set 20px in their browser it grows to 25.

The 62.5% technique means writing html { font-size: 62.5% }, which yields a 10px base, because 62.5% of 16 is exactly 10. The arithmetic then happens in your head: 2.4rem is 24 pixels. One condition comes with it – body text needs a readable size back, usually 1.6rem, or the whole page ends up set in ten-pixel type.

The em unit works the same way but refers to the parent rather than the root of the document – that calculation is done by the em to pixels converter. Those same 16 pixels are 12 typographic points in typesetting, which the points to pixels converter handles.

How many pixels are in common rem values?

Value in rem16px base (default)10px base (62.5%)20px base (enlarged text)
0.25 rem4 px2.5 px5 px
0.375 rem6 px3.75 px7.5 px
0.5 rem8 px5 px10 px
0.625 rem10 px6.25 px12.5 px
0.75 rem12 px7.5 px15 px
0.875 rem14 px8.75 px17.5 px
1 rem16 px10 px20 px
1.125 rem18 px11.25 px22.5 px
1.25 rem20 px12.5 px25 px
1.375 rem22 px13.75 px27.5 px
1.5 rem24 px15 px30 px
1.625 rem26 px16.25 px32.5 px
1.75 rem28 px17.5 px35 px
1.875 rem30 px18.75 px37.5 px
2 rem32 px20 px40 px
2.25 rem36 px22.5 px45 px
2.5 rem40 px25 px50 px
2.75 rem44 px27.5 px55 px
3 rem48 px30 px60 px
3.5 rem56 px35 px70 px
3.75 rem60 px37.5 px75 px
4 rem64 px40 px80 px
4.5 rem72 px45 px90 px
5 rem80 px50 px100 px
6 rem96 px60 px120 px
8 rem128 px80 px160 px

The three bases cover three situations: 16px is the browser default, 10px comes out of the 62.5% technique, and 20px is a typical figure for someone who has enlarged text in their settings.

ADVERTISEMENT

Why is 16px only a default?

The figure 16 does not come from the CSS specification. It is the default text size a browser gives a document, and the reader can change it in their own settings. Anyone with weaker eyesight sets 20 or 24px there and expects the page to follow.

That is the whole difference between rem and the pixel. An element written as font-size: 24px stays 24 pixels tall whatever the reader chose. The same element written as 1.5rem grows with the base: at 20px it gives 30 pixels, at 24px it gives 36.

Success criterion WCAG 1.4.4 requires text to be resizable up to 200% without loss of content or functionality [2]. A layout built on rem meets that on its own, because it scales along with the reader’s setting, and it is the cheapest way to satisfy the criterion across an entire interface at once.

In the United States that criterion comes with a date. The Department of Justice rule for ADA Title II makes WCAG 2.1 Level AA binding for the websites and mobile apps of state and local governments from 26 April 2027, and from 26 April 2028 for entities serving fewer than 50,000 residents and for special district governments [3]. A stylesheet already written in rem covers success criterion 1.4.4 before that work even starts.

Hence the practical split: put type sizes, spacing and column widths in rem, and keep the pixel where a measurement should stay fixed regardless of text – borders, shadows and hairlines.

Where do values like 0.875 or 1.875rem come from?

Tailwind classValue in remPixels at a 16px baseWhere it is used
text-xs0.75 rem12 pxImage caption, small label
text-sm0.875 rem14 pxHelper text, form field label
text-base1 rem16 pxBody copy, the reference value
text-lg1.125 rem18 pxLead paragraph
text-xl1.25 rem20 pxCard heading
text-2xl1.5 rem24 pxSection heading
text-3xl1.875 rem30 pxPage subheading
text-4xl2.25 rem36 pxPage title
text-5xl3 rem48 pxHero heading
text-6xl3.75 rem60 pxLarge desktop heading
text-7xl4.5 rem72 pxHome page statement
text-8xl6 rem96 pxDecorative wordmark
text-9xl8 rem128 pxFigure in a statistics block

This is the default Tailwind CSS type scale in version 4.3, checked on 7 August 2026 against the maker’s documentation [4]. If you see 0.875 or 1.875rem in a stylesheet, it almost certainly comes from here.

Rem and pixel side by side

Propertyrempx
Point of referenceFont size of the html elementNone, an absolute value
Default value1rem = 16px1px = 1/96 inch
Response to reader settingsScales along with themStays unchanged
Nested elementsNo effect, always counts from the rootNo effect
Typical useType sizes, spacing, widthsBorders, shadows, hairlines
In Tailwind CSSThe unit of the type and spacing scaleAny value in square brackets
ADVERTISEMENT

When will you need this conversion?

  1. Checking a mock-up

    The design says a 30px heading, the code says 1.875rem. One multiplication tells you whether both numbers describe the same size.
  2. Reading someone else’s stylesheet

    You open a project written in rem and want to know how large the spacing is. A 16px base turns 0.75rem into a familiar 12 pixels.
  3. An accessibility check

    Set the base to 20px and see how much every element grows once a reader enlarges text in the browser.
  4. Working with the 62.5% technique

    At a 10px base the values turn round: 2.4rem is 24 pixels. The converter takes that base exactly like the default one.

Convert other units to Pixels

Explore other unit converters

Sources

  1. CSS Values and Units Module Level 4W3C
  2. Understanding SC 1.4.4: Resize Text (WCAG 2.2)W3C
  3. Fact Sheet: New Rule on the Accessibility of Web Content and Mobile AppsU.S. Department of Justice
  4. font-size – TypographyTailwind CSS

Every figure in the tables was computed from the unit definitions and checked arithmetically before publication. Historical values and the names of local units come from the sources listed above.

Content last reviewed: · written and checked by the Arteon team

Frequently asked questions

How many pixels is 1rem?

At the browser default 1rem is 16 pixels. The value comes from the text size of the html element, so after setting html { font-size: 62.5% } that same 1rem gives 10 pixels, and for a reader with enlarged text it gives 20 or more.

Is 1rem always 16px?

16px is the browser’s default text size, not a constant from the CSS specification. The reader changes it in their browser settings and the author changes it in the stylesheet. That is why the base font-size field accepts any value from 1 to 100px.

How many pixels is 1.5rem?

24 pixels at a 16px base, 15 pixels at a 10px base and 30 pixels at 20px. The value 1.5rem matches the text-2xl class in Tailwind CSS and is a common section-heading size.

How many pixels is 1.25rem?

20 pixels at the default 16px base. That is the text-xl class in Tailwind CSS, usually used for card headings and highlighted interface elements.

How many pixels is 0.875rem?

14 pixels at a 16px base. The value matches the text-sm class and is the usual size for helper text and form field labels.

How many pixels is 32rem?

512 pixels at a 16px base. Values of that order describe a column width or a container maximum rather than a type size.

What is the 62.5% technique?

Writing html { font-size: 62.5% } sets the base to 10px, because 62.5% of 16 is exactly 10. The arithmetic then happens in your head: 2.4rem is 24 pixels. Body text needs a readable size back, usually 1.6rem, so the whole page does not end up in ten-pixel type.

What is the difference between rem and em?

Rem refers to the font size of the html element and gives the same result anywhere in the document, however deeply an element is nested. Em refers to the font size of the parent, so values compound as you nest. Type sizes usually go in rem, because the result is predictable.

Does Tailwind CSS use rem?

Yes. The default type scale is in rem: text-base is 1rem, text-2xl is 1.5rem and text-9xl is 8rem. The spacing scale works in the same unit, so changing the base font size shifts the whole layout at once.

When is a pixel the better choice than rem?

Wherever a measurement should stay fixed regardless of text size: borders, shadows, hairlines and individual graphic elements. Type sizes, spacing and column widths go in rem, so the layout answers the reader’s settings.

How does rem affect accessibility?

Success criterion WCAG 1.4.4 requires text to be resizable up to 200% without loss of content or functionality. A layout written in rem grows with the browser setting, so it meets that on its own, while values in pixels stay where they are. For public sector sites in the United States that criterion carries a date: WCAG 2.1 Level AA becomes binding on 26 April 2027, and a year later for the smallest entities.

How many rem is 1 pixel?

At a 16px base one pixel is 0.0625rem. A few pairs the other way are worth knowing: 12px is 0.75rem, 14px is 0.875rem, 20px is 1.25rem and 24px is 1.5rem.

rem to px – Arteon

Help us improve our tools

Have an idea for a feature, found a bug, or want to suggest another tool? Write to us – we reply within 24 hours.

ADVERTISEMENT