ESC

Unit Converter

px
Default browser font size is 16px
px
rem
em
pt
All processing happens in your browser. No data is sent to any server.

Quick Reference Table

PX REM EM PT

CSS Variables Output

Usage Examples

Typography Scale

Convert a complete typography scale from pixels to REMs for responsive web design.

Responsive Layout

Convert spacing and sizing values from PX to REM for fluid responsive layouts.

CSS Variables

Generate CSS custom properties with REM values from your pixel-based design system.

Features

Bidirectional Conversion

Convert from any unit to all others instantly — PX, REM, EM, and PT

Quick Reference Table

See common pixel values and their REM, EM, and PT equivalents at a glance

Bulk Conversion

Paste multiple PX values at once and get all conversions in a single click

Privacy First

All unit conversions happen locally in your browser, no data sent to servers

How to Use?

1

Set Base Font Size

Set your base font size (default is 16px). This is used as the reference for REM and EM calculations.

2

Enter a Value

Type a value in any unit field (PX, REM, EM, or PT) and all others update automatically.

3

Copy Results

Copy individual values, the reference table, or CSS variables output for your project.

Frequently Asked Questions

The formula is: REM = PX / base font size. The default browser base font size is 16px, so 24px = 24/16 = 1.5rem. If your root font-size is different (e.g. 10px for easier math), change the base size in the converter and it recalculates everything instantly.

REM (root em) is always relative to the root element (html) font size — consistent and predictable throughout the page. EM is relative to the parent element, which means it compounds: if a parent is 1.2em and the child is also 1.2em, the child ends up at 1.44× the root size. Use REM for font sizes and consistent spacing; use EM when you intentionally want scaling relative to a component's own font size (like padding on a button).

REM respects the user's browser font size preference. If a user sets their browser default to 20px for accessibility, 1rem becomes 20px and your layout scales proportionally. PX values are fixed and ignore this preference. Using REM makes your site more accessible and easier to scale with a single root font-size change.

PT (points) is a print unit: 1pt = 1/72 inch. For web, 12pt = 16px at standard screen resolution. PT is occasionally used for print stylesheets (@media print) but rarely in regular web CSS. Stick to PX, REM, or EM for screen layouts.

Enter multiple PX values one per line in the Bulk Converter field and click Convert. You get REM, EM, and PT equivalents for each value in a single table. Useful when migrating a design system or converting an existing stylesheet from PX to REM all at once.

The CSS Variables section generates ready-to-paste CSS custom property declarations from your bulk conversion results. For example: --font-sm: 0.875rem; --font-base: 1rem; --font-lg: 1.25rem. You can paste these directly into your :root {} block.

Use whatever font size you have set on the html element in your CSS. If you haven't set anything, it defaults to the browser default (16px). Some developers set html { font-size: 62.5% } to make 1rem = 10px for easier mental math (e.g., 24px = 2.4rem). Change the base size input to match your project's actual root font size.

No. All conversions are calculated locally in your browser with JavaScript. Nothing is transmitted or stored. You can use it offline after the page loads.

What Is PX to REM Converter?

Set your base font size, type a value in any unit, and see all the others update instantly. Includes a quick reference table, bulk converter, and CSS custom properties output.

Key Features

Bidirectional conversion between PX, REM, EM, and PT. Customizable base font size, reference table for common values, bulk conversion mode, CSS variables output.

Common Use Cases

Building responsive websites with REM units, converting legacy PX-based designs, ensuring accessibility by respecting user font size preferences, or generating CSS variables for design systems.

Tips

REM is relative to the root element font size (usually 16px). EM is relative to the parent element. REM is more predictable for consistent sizing across components.

Privacy

All calculations happen in your browser. Nothing is sent to a server.

Security and Privacy

Your data security is our priority

Local Processing

All processing happens in your browser

No Data Transfer

Your data is not sent to our servers

No Data Storage

No data is stored or shared

SSL Encryption

SSL encryption for secure connection

Next Step

Also on MoreOnlineTools