PX to REM Converter

Convert pixels to REM or EM units based on your base font size. Perfect for creating responsive layouts and following web accessibility standards.

px

Standard browser default is 16px

px
rem

Conversion Formula

REM = 16px / 16px = 1rem

Why use REM over PX?

01

Accessibility

When users change their browser font settings, REM units scale proportionally, while PX values remain fixed, potentially breaking your design for users with visual impairments.

02

Responsive Design

You can scale your entire UI by changing just the root font size in a media query. This makes mobile optimization significantly easier to manage.

About the PX to REM Converter

Convert pixels to rem and rem to pixels using a base font size you choose (16 px by default), for accessible, scalable CSS.

Everything you enter is processed in your browser; nothing is uploaded or stored.

How to use it

  1. Check the base font size (16 px is the browser default).
  2. Type a pixel value to get rem, or a rem value to get pixels.
  3. Copy the value into your CSS.

The px to rem formula

rem = px ÷ base font size; px = rem × base font size

rem is relative to the root (html) font size. If a reader sets a larger default font in their browser, rem-based sizes grow with it while px sizes stay fixed – which is why rem is better for accessibility.

Example

With a 16 px base: 24 px = 1.5 rem, 14 px = 0.875 rem, 2 rem = 32 px. If your CSS sets html { font-size: 62.5% }, the base becomes 10 px and 24 px = 2.4 rem.

Common mistakes

  • Mixing up rem and em: em is relative to the parent element’s font size, so nested em values compound.
  • Forgetting a custom root font size: set the base here to match your html font-size.
  • Using rem for 1 px borders, where a pixel value is usually what you want.

Frequently asked questions

How many pixels is 1 rem?

16 px with the default browser font size.

What is 14 px in rem?

0.875 rem with a 16 px base.

rem or em?

rem for most sizes (predictable); em for things that should scale with their own text, like button padding.