Px To Rem Converter
Convert pixels to rem units and back for CSS, based on the root font size, for responsive accessible design. No signup. Ideal for front end developers and web designers.
Result
| Result |
|---|
Share on Social Media:
This PX to REM converter turns pixel values into rem units and back for CSS, based on the root font size, directly in your browser. Enter a pixel value to get its rem equivalent, helping you build responsive, accessible layouts. No account, no install, so front end developers and web designers can convert units on any device in seconds.
How to Convert PX to REM Step by Step
- Enter the pixel value. Type the pixel value you want to convert into the input field. This is the size in pixels you are used to working with in a design.
- Set the root font size. Confirm the root font size, the base against which rem is calculated. The common default is sixteen pixels, but you can set it to match your project.
- Convert to rem. The tool divides the pixel value by the root font size to give the rem equivalent, so you know the rem value that corresponds to your pixels.
- Convert back if needed. You can also convert rem back to pixels, multiplying by the root font size, to see what a rem value equals in pixels for reference.
- Use the rem value in your CSS. Apply the rem value in your stylesheet, gaining the scalability and accessibility benefits that rem units provide over fixed pixels.

What PX and REM Are and Why REM Matters
In CSS, px and rem are two units for specifying sizes, but they behave very differently. A pixel is an absolute, fixed unit: sixteen pixels is always sixteen pixels regardless of anything else. A rem is a relative unit, meaning root em, defined relative to the root font size of the page. So one rem equals whatever the root font size is, commonly sixteen pixels by default, and all rem values scale with that root.
The reason rem matters is accessibility and scalability. When users change their browser's default font size, often to make text larger for readability, elements sized in rem scale accordingly, because they are relative to the root font size the user has effectively set. Elements sized in fixed pixels do not scale and stay the same, potentially breaking the layout or ignoring the user's preference. Using rem respects user settings, which is important for accessible design.
The conversion between px and rem is simple arithmetic based on the root font size. To convert pixels to rem, divide the pixel value by the root font size; to go back, multiply. With the common default root of sixteen pixels, sixteen pixels equals one rem, thirty two pixels equals two rem, and so on. Designers often think in pixels, so converting their pixel based designs into rem for implementation is a frequent and useful task.
Adopting rem units is a widely recommended practice in modern, responsive web development. Because rem scales with the root font size, using it for sizing text, spacing and layout makes a design more flexible and accessible, adapting to user preferences and different contexts. The main friction is that designs are usually specified in pixels, so a converter that translates pixel values into rem bridges the gap between design and accessible, scalable implementation.
REM Versus PX for Web Design
| Pixels | REM (root 16px) | Note |
|---|---|---|
| 16px | 1 rem | Equals the default root |
| 32px | 2 rem | Twice the root |
| 8px | 0.5 rem | Half the root |
| 24px | 1.5 rem | One and a half times the root |
Who Needs a PX to REM Converter

Pro Tips for Using REM Units
Common PX to REM Mistakes to Avoid
Related Tools You May Need Next
For general unit relationships, our tools help, and to calculate proportions the Aspect Ratio Calculator is useful for layout. To generate CSS effects, the CSS Gradient Generator creates gradient code.

Frequently Asked Questions
How do I convert px to rem?
Enter the pixel value and confirm your root font size, commonly sixteen pixels by default, and the tool divides the pixel value by the root font size to give the rem equivalent. For example, with a sixteen pixel root, thirty two pixels equals two rem. You can also convert rem back to pixels by multiplying. Use the rem value in your CSS to gain the scalability and accessibility benefits that rem provides over fixed pixel units.
What is the difference between px and rem?
A pixel is an absolute, fixed unit, so sixteen pixels is always sixteen pixels regardless of anything else. A rem is a relative unit, meaning root em, defined relative to the root font size of the page, so one rem equals whatever the root font size is, commonly sixteen pixels by default. The key difference is that rem values scale with the root font size, while pixel values stay fixed, which affects how they respond to user font size preferences.
Why should I use rem instead of px?
Because rem is more accessible and scalable. When users change their browser's default font size, often to enlarge text for readability, elements sized in rem scale accordingly since they are relative to the root font size, respecting the user's preference. Elements sized in fixed pixels do not scale and ignore that preference, potentially breaking the layout or the user's readability needs. Using rem for text, spacing and layout makes a design flexible and respects accessibility settings.
How is the px to rem conversion calculated?
It is simple arithmetic based on the root font size. To convert pixels to rem, you divide the pixel value by the root font size; to convert rem back to pixels, you multiply by the root font size. With the common default root of sixteen pixels, sixteen pixels equals one rem, thirty two pixels equals two rem, eight pixels equals half a rem, and so on. The conversion depends entirely on the root font size, so it must be known for accurate results.
What is the default root font size?
The common default root font size in browsers is sixteen pixels, which means that by default one rem equals sixteen pixels. However, a project can set a different root font size, and users can change their browser's default, which affects what one rem equals. Because the px to rem conversion depends on the root font size, it is important to confirm your project's actual root rather than always assuming sixteen pixels, since a different root changes every rem value.
Does rem help with accessibility?
Yes, significantly. Because rem is relative to the root font size, elements sized in rem scale when a user increases their browser's default font size to make text more readable, respecting that accessibility preference. Fixed pixel sizes do not respond to this, so text and layout stay the same regardless of the user's needs. Using rem for text and layout sizing means your design honours users' font size settings, which is an important part of building accessible websites.
Should I use rem for everything?
Rem is excellent for sizing text, spacing and layout, where its scalability and accessibility benefits apply, and using it widely is a recommended modern practice. However, some situations, such as certain borders or specific fixed elements, may still suit pixels, and some developers make particular choices for media query breakpoints. The general guidance is to favour rem for scalable, accessible sizing while understanding the context, rather than rigidly using one unit for absolutely everything without thought.
Is the px to rem converter free?
Yes, it is completely free with no account and no usage limit. You can convert as many pixel values to rem, and rem back to pixels, as you like, as often as you like, at no cost. It runs entirely in your browser on any device, so there is nothing to download or install, and the converted value appears instantly whenever you enter a value and confirm your root font size.