Next-Gen App & Browser Testing Cloud
Trusted by 2 Mn+ QAs & Devs to accelerate their release cycles

To convert px to rem, divide the pixel value by the root font size (16px by default): rem = px / base font size. So 16px = 1rem, 20px = 1.25rem, and 24px = 1.5rem. This free converter does it instantly for responsive, accessible CSS, works in both directions, and also converts EM, Point and Percent. It is brought to you by TestMu AI (formerly LambdaTest), the team behind a unified software testing platform.
Base size in px. Default
EM
Pixel
REM
Percent
Point
Convert
Reset
EM
h1 {
font-size: 1em;
}
Pixel
h1 {
font-size: 16px;
}
REM
h1 {
font-size: 1rem;
}
Percent
h1 {
font-size: 100%;
}
Point
h1 {
font-size: 12pt;
}
| EM | Pixel | REM | Percent | Point |
|---|---|---|---|---|
| 0.0625em | 1px | 0.0625rem | 6.25% | 0.75pt |
| 0.125em | 2px | 0.125rem | 12.5% | 1.5pt |
| 0.1875em | 3px | 0.1875rem | 18.75% | 2.25pt |
| 0.25em | 4px | 0.25rem | 25% | 3pt |
| 0.3125em | 5px | 0.3125rem | 31.25% | 3.75pt |
| 0.375em | 6px | 0.375rem | 37.5% | 4.5pt |
| 0.4375em | 7px | 0.4375rem | 43.75% | 5.25pt |
| 0.5em | 8px | 0.5rem | 50% | 6pt |
| 0.5625em | 9px | 0.5625rem | 56.25% | 6.75pt |
| 0.625em | 10px | 0.625rem | 62.5% | 7.5pt |
| 0.6875em | 11px | 0.6875rem | 68.75% | 8.25pt |
| 0.75em | 12px | 0.75rem | 75% | 9pt |
| 0.8125em | 13px | 0.8125rem | 81.25% | 9.75pt |
| 0.875em | 14px | 0.875rem | 87.5% | 10.50pt |
| 0.9375em | 15px | 0.9375rem | 93.75% | 11.25pt |
| 1em | 16px | 1rem | 100% | 12pt |
| 1.0625em | 17px | 1.0625rem | 106.25% | 12.75pt |
| 1.125em | 18px | 1.125rem | 112.5% | 13.5pt |
| 1.1875em | 19px | 1.1875rem | 118.75% | 14.25pt |
| 1.25em | 20px | 1.25rem | 125% | 15pt |
| 1.3125em | 21px | 1.3125rem | 131.25% | 15.75pt |
| 1.375em | 22px | 1.375rem | 137.5% | 16.50pt |
| 1.4375em | 23px | 1.4375rem | 143.75% | 17.25pt |
| 1.5em | 24px | 1.5rem | 150% | 18pt |
| 1.5625em | 25px | 1.5625rem | 156.25% | 18.75pt |
| 1.625em | 26px | 1.625rem | 162.5% | 19.5pt |
| 1.6875em | 27px | 1.6875rem | 168.75% | 20.25pt |
| 1.75em | 28px | 1.75rem | 175% | 21pt |
| 1.8125em | 29px | 1.8125rem | 181.25% | 21.75pt |
| 1.875em | 30px | 1.875rem | 187.5% | 22.5pt |
| 1.9375em | 31px | 1.9375rem | 193.75% | 23.25pt |
| 2em | 32px | 2rem | 200% | 24pt |
| 2.0625em | 33px | 2.0625rem | 206.25% | 24.75pt |
| 2.125em | 34px | 2.125rem | 212.5% | 25.5pt |
| 2.1875em | 35px | 2.1875rem | 218.75% | 26.25pt |
| 2.25em | 36px | 2.25rem | 225% | 27pt |
| 2.3125em | 37px | 2.3125rem | 231.25% | 27.75pt |
| 2.375em | 38px | 2.375rem | 237.5% | 28.5pt |
| 2.4375em | 39px | 2.4375rem | 243.75% | 29.25pt |
| 2.5em | 40px | 2.5rem | 250% | 30pt |
| 2.5625em | 41px | 2.5625rem | 256.25% | 30.75pt |
| 2.625em | 42px | 2.625rem | 262.5% | 31.5pt |
| 2.6875em | 43px | 2.6875rem | 268.75% | 32.25pt |
| 2.75em | 44px | 2.75rem | 275% | 33pt |
| 2.8125em | 45px | 2.8125rem | 281.25% | 33.75pt |
| 2.875em | 46px | 2.875rem | 287.5% | 34.5pt |
| 2.9375em | 47px | 2.9375rem | 293.75% | 35.25pt |
| 3em | 48px | 3rem | 300% | 36pt |
| 3.0625em | 49px | 3.0625rem | 306.25% | 36.75pt |
| 3.125em | 50px | 3.125rem | 312.5% | 37.5pt |
A PX to REM converter is a tool that transforms pixel (px) measurements into root em (rem) units using the formula rem = px divided by the root font size. With the default 16px root, 16px equals 1rem. Developers use it in CSS to build responsive designs that adapt to diverse screen dimensions and resolutions.
Its primary function is establishing the rem value derived from the pixel value, which streamlines the design of adaptable and visually consistent web interfaces across devices and display settings. This converter from TestMu AI also returns the matching EM, Point, and Percent values, so a single input covers every unit your stylesheet needs.
Using a PX to REM converter is a fundamental step in achieving a responsive and accessible web design. To employ this tool effectively, follow these steps:
By inputting a specific pixel width dimension, users can readily obtain the equivalent value expressed in REM and EM units, facilitating the creation of adaptive and fluid designs within a web environment. This conversion capability is particularly pertinent in the context of web development, where REM units are used to ensure consistent and accessible typography and spacing, catering to a diverse range of display sizes and resolutions. The PX to REM converter simplifies this process and empowers designers and developers to maintain design consistency and accessibility across various viewing contexts.
Typography setup rarely ends at sizing: once the scale is settled, the webfont generator turns uploaded WOFF, WOFF2, TTF or OTF files into the @font-face CSS that loads the typeface itself, along with a preview and a downloadable kit.
Using a PX to REM converter is a fundamental step in achieving a responsive and accessible web design. To employ this tool effectively, follow these meticulous steps:
Check the root font size specified in your CSS. If it's not explicitly defined, the default browser font size is typically 16px. This root size is essential as REM values are relative to it.
Identify the font sizes you wish to convert from PX to REM in your CSS stylesheet.
There are various online tools or converters available that help in converting PX to REM values. These tools usually require you to input the pixel value and the root font size. They will then generate the corresponding REM value.
Once you have the converted REM values, replace the original PX values in your CSS with the new REM values. For instance, if you had a font size set to font-size: 16px; and the equivalent REM value is 1rem, replace it with font-size: 1rem;.
Test the updated REM values across different browsers and devices to ensure they display consistently and adapt properly to varying user settings.
Using a PX to REM converter offers several benefits, especially in web development and design practices:
The PX to REM converter serves as a versatile instrument for several critical tasks in day-to-day CSS work:
Px are absolute units that remain constant in size, the smallest addressable element in a raster image. Rem, on the other hand, is widely used in CSS development. The rem unit lets you define a size relative to the HTML root element's font-size.
The distinction is that px is a fixed-size unit. If you say this font is 16px, it is exactly 16px no matter where you put it, although different devices may render it differently. A 16px font displayed on your computer monitor may appear differently on your mobile phone.
Root em (rem) units, in contrast, are a type of relative measurement determined by the font size of the webpage's root element, typically the HTML tag. With a root font size of 16px, 1rem equals 16px and a 2rem element becomes 32px. Change the root to 20px, and 1rem equals 20px while 2rem equates to 40px.
Using rem units creates a uniform layout that adapts to users' font size preferences, enhancing accessibility. Px units come in handy when precision is required for specific element sizes, such as buttons and icons. Rem units are commonly employed in typography, allowing font size to accommodate user font choices.
Using a PX to REM converter offers several benefits, especially in web development and design practices:
Type a pixel value into the PX field and the REM field updates instantly, along with the EM, Point and Percent fields. It works in both directions, so entering a rem value fills in the pixels instead. If your project uses a root font size other than 16px, change the “Base size in px” field first and every conversion follows it.
Yes. The converter is completely free with no signup or subscription, there is no limit on how many values you can convert, and every calculation runs in your own browser.
Both px and rem have their merits. px provides a fixed value, while rem is relative to the root element's font size. rem is preferred for accessibility and scalability, as it adjusts based on user preferences. Ultimately, the choice depends on the specific project requirements and design considerations.
1 rem equals the font size of the root element, which is the html element. Browsers set that to 16px unless a stylesheet overrides it, so 1rem is 16px on a default page. Change the root font size to 20px and 1rem becomes 20px, which is what makes rem scale with a reader's own font-size preference.
20px in rem units depends on the root font size. If the root font size is the browser default of 16px, 20px is 1.25rem (20 ÷ 16 = 1.25). This ensures scalability based on user preferences and accessibility. Always consider using relative units like rem for better responsiveness in web design.
By default, yes. Browsers use a root font size of 16px unless a stylesheet changes it, so 16px equals 1rem out of the box. If the root font size is set to something else, say 20px, then 1rem becomes 20px and the equivalence no longer holds, which is why this converter lets you set the base size yourself.
px is a fixed unit: 16px is always 16px wherever you put it. rem is relative to the root element's font size, so if the root is 16px then 1rem is 16px and 2rem is 32px, and raising the root to 20px makes 1rem 20px. px is useful when an element must be an exact size, such as a button or icon, while rem is preferred for typography because it adapts to the reader's font-size preference.
Did you find this page helpful?
TestMu AI forEnterprise
Get access to solutions built on Enterprise
grade security, privacy, & compliance