px / rem Converter
Convert between px and rem. Adjustable base font size.
About this tool
This tool converts px and rem in one click. Three features: 1) Instant conversion from px or rem input, 2) Adjustable base font size (default 16px), 3) Useful for responsive and accessible CSS design. Ideal for converting design px to rem.
The margin in Figma is 24px, but what is that in rem? Are you dividing by 16 on a calculator over and over while coding? Enter a px value in this tool and the rem value appears immediately. Going back from rem to px is just as easy. If your project's base font size changes, just update the setting — a handy companion for designing spacing and font sizes in CSS or Tailwind.
Tool interface
px
rem
Usage
- Enter px or rem value in the input field
- Converted value is displayed instantly
- Base font size (default 16px) is adjustable
When to use
Converting design px to rem, accessible font sizing, responsive spacing.
Examples
16px = 1rem, 24px = 1.5rem (base 16px).
FAQ
What's the difference between px and rem?
px is absolute (1px = 1 pixel). rem is relative to root font-size. 1rem = 16px when root is 16px.
What is rem based on?
Root element (html) font-size. Default 16px so 1rem=16px. html{font-size:62.5%} makes 1rem=10px for easier math.
Why use rem for responsive?
Change root font-size to scale everything. Fewer media queries. Respects user browser settings for accessibility.
How many px is 1rem?
Depends on base. Default 16px → 1rem=16px. Check your html font-size.
How to use the px/rem converter tool?
Enter a px or rem value and it converts in both directions. The base font size (default 16px) is adjustable.
How do I convert px to rem from a design mockup?
Enter the px value from the mockup into this tool. It converts to rem, which you can adjust to match your project's base.
What is the 62.5% font-size trick?
62.5% of 16px is 10px, so 1rem = 10px and rem = px ÷ 10, making the math easier.
What's the difference between em and rem?
em is based on the parent element's font size. rem is based on the root. rem is more predictable and can be calculated with this tool.
Why specify font sizes in rem?
It follows the user's browser settings (text-size scaling), which is better for accessibility.
What's the formula to convert px to rem?
rem = px ÷ base font size. With a 16px base, 24px = 1.5rem. This tool calculates it instantly.
Is px / rem Converter free?
Free to use, no sign-up required.
Is data sent to a server?
Data stays on your device; we do not store it on our servers.
Supported browsers?
Tested on recent Chrome, Edge, Firefox, and Safari.
Offline use?
Core features work offline after the first load.
vs CLI or desktop apps?
px / rem Converter is an install-free online alternative to CLI or desktop apps.
When to use it?
Use it when: Converting design px to rem, accessible font sizing, responsive spacing.
Usage example?
Example: 16px = 1rem, 24px = 1.5rem (base 16px).
Main features?
px↔rem conversion, Adjustable base font size, Responsive and accessible
How is this different from similar tools?
px / rem Converter runs in the browser with no install—ideal for quick checks before heavier CLI or IDE workflows.
Search keywords
px to rem, rem to px, px to rem converter, rem to px calculator, css px rem, font size rem
Basic workflow
- Enter px or rem value in the input field
- Converted value is displayed instantly
- Base font size (default 16px) is adjustable
Practical use cases
- Converting design px to rem, accessible font sizing, responsive spacing.
- This tool converts px and rem in one click. Three features: 1) Instant conversion from px or rem input, 2) Adjustable base font size (default 16px), 3) Useful for responsive and accessible CSS design. Ideal for converting design px to rem.
- px↔rem conversion
- Adjustable base font size
Privacy & data handling
Data stays on your device; we do not store it on our servers.
Things to watch out for
- Treat px / rem Converter as a quick check — re-verify critical values in your editor or CI before shipping.
- If a browser extension breaks the page, retry in a private window with extensions disabled.
- Very large pastes can freeze a tab briefly — wait for the result before closing the tab.
Related learning content
Tool set
Typography Set