Result
1.5rem
100% Private
All calculations run locally in your browser. Nothing is uploaded.
PX to REM Converter changes pixels to rem and rem to pixels instantly online for free. Set the base font size for accurate CSS sizing in your browser.
Written & reviewed by Helperzy Editorial Team · Updated July 2026
Result
1.5rem
100% Private
All calculations run locally in your browser. Nothing is uploaded.
Enter your project's root font size, or keep the default 16px. Match this to the font size your CSS sets on the html element, since the rem values are calculated against it. If you set no custom root, 16px is correct.
Type a pixel value to get rem, or switch direction and enter a rem value to get pixels. The conversion is a single division or multiplication against the base, so it updates the moment you type.
Copy the converted value straight into your CSS font-size or spacing rule. Using rem for type and layout lets the page respect browser zoom and the user's font-size preference, which helps accessibility.
A PX to REM converter turns pixel measurements from a design into rem units for CSS, and converts rem back into pixels, using a base font size you can set. It defaults to the browser standard of 16 pixels. Front-end developers reach for it constantly because designs are usually handed over in pixels while modern, accessible stylesheets are written in rem. The reason rem matters is that it scales with the user's chosen root font size: a heading sized in rem grows when someone bumps up their browser text size, whereas a fixed pixel size ignores that preference. Converting every spacing and font value by hand is tedious and easy to get slightly wrong, so a converter keeps the whole stylesheet consistent. The maths is a single division. To convert pixels to rem you divide the pixel value by the base font size; to go back you multiply the rem value by the base. With the standard 16 pixel base, 16 pixels is exactly 1rem, 24 pixels is 1.5rem, and 8 pixels is 0.5rem. The base is adjustable because some projects set a different root font size on the html element, and a few use the so-called 62.5 percent trick, setting the root to 10 pixels so that 1rem equals a tidy 10 pixels and conversions become mental arithmetic. Whatever base you choose, every result recalculates against it immediately, so the rem values match how your actual page will render. Here is a concrete example. Say a mockup specifies a 24 pixel heading, 18 pixel body text, and 32 pixel section spacing, and your root font size is the default 16 pixels. Dividing each by 16 gives 1.5rem for the heading, 1.125rem for the body, and 2rem for the spacing. If instead your project uses a 10 pixel root, those same pixels become 2.4rem, 1.8rem, and 3.2rem. Enter 24 with a 16 pixel base and the tool returns 1.5rem instantly, ready to paste into a font-size rule. The practical uses are specific. A developer translates a Figma spec given in pixels into rem values for a scalable stylesheet. Someone maintaining a design system converts token values so spacing stays consistent as users adjust text size. A developer working with a framework like Tailwind, whose spacing scale is expressed in rem, converts a designer's pixel request into the nearest rem step. A team improving accessibility replaces fixed pixel font sizes with rem so the layout respects browser zoom and font settings. Someone auditing a legacy stylesheet converts a 14 pixel caption to 0.875rem and a 12 pixel label to 0.75rem so small text still grows for a reader who needs it. Email-to-web ports, media-query breakpoints expressed in rem, and component libraries documenting a 4 pixel spacing grid as 0.25rem steps all lean on the same division. Each is a small, frequent task the converter makes exact. A couple of pointers help. Match the base font size in the converter to the root font size your CSS actually sets, or the rem values will be off; if your html element has no custom font size, the 16 pixel default is correct. Understand that rem is relative to the root, unlike em, which is relative to the current element and can compound when nested, so rem is more predictable for layout. And remember rem responds to the user's root font size, which is exactly the point for accessibility, so do not fight it by hard-coding pixels everywhere. One pitfall catches nearly everyone new to the 62.5 percent trick: setting the root to 10 pixels shrinks the default text for anyone who never touches their settings, so bump body text back up if you use it. Everything runs locally in your browser, so it is instant, works offline once loaded, and never uploads or stores anything you enter.
rem = pixels ÷ base font size pixels = rem × base font size Default base = 16px, so 16px = 1rem, 24px = 1.5rem. With a 10px root (62.5% trick): 24px = 2.4rem.
Input
24px with 16px base
Result
1.5rem
Divide pixels by the base: 24 ÷ 16 = 1.5rem.
Input
2rem with 16px base
Result
32px
Multiply rem by the base: 2 × 16 = 32px.
Enter a pixel value in the Helperzy PX to REM Converter and it divides by the base font size to give the rem value. With the default 16px base, 24px equals 1.5rem. You can change the base if your project uses a different root size.
Length Converter changes meters, feet, inches, miles, kilometers, and more instantly online for free. Accurate unit conversion in your browser.
Inches to CM Converter changes inches to centimeters and back instantly online for free. Uses the exact 2.54 factor in your browser.
Kg to Lbs Converter changes kilograms to pounds and back instantly online for free. Uses the standard 2.20462 factor in your browser.
Celsius to Fahrenheit Converter changes °C to °F and back instantly online for free. Uses the exact C×9/5+32 formula in your browser.
Image Resizer changes image dimensions online — set exact pixels, use percentage scaling, or pick from 12 presets (Instagram, Passport, YouTube, etc.). Target specific file sizes like 50KB or 100KB. Batch resize multiple images. 100% free, browser-based.
Image Converter changes images between any format online free — JPG, PNG, WebP, AVIF, PDF, ICO, BMP, HEIC, GIF, SVG. Batch conversion, resize, rotate, flip, AI format recommendation. 100% browser-based, no upload.
Convert JPG to WebP format online free — reduce image file size by 25-35% with identical visual quality. Batch conversion, adjustable quality, lossless mode available. Boost website speed and Core Web Vitals scores. 100% browser-based, no upload needed.
Convert PNG to WebP format online free — reduce file size by 26-34% while preserving full transparency. Batch conversion, lossless and lossy modes, adjustable quality. Boost website performance and Core Web Vitals. 100% browser-based, no upload needed.