Toolpuffin

    Loading...

    Up and down to choose, Enter to open, Esc to close.

    PX to REM Converter

    Convert pixels to rem and back with your own base font size, usually 16px. You can also paste a piece of CSS and convert every px value in it at once, while keeping thin 1px borders as they are. Works in English and in Dutch.

    Features

    • px to rem and rem to px with your own base size
    • Paste CSS and convert every px value at once
    • Option to keep 1px and 0px values
    • A table of common sizes

    How to use PX to REM Converter

    1. Check the base font size, usually 16.
    2. Type a px or rem value, or paste your CSS.
    3. Copy the result.

    Frequently asked questions

    How do I convert px to rem?

    Divide the pixels by the base font size. With the usual base of 16px, 24px is 24 / 16 = 1.5rem.

    Why use rem instead of px?

    Rem values follow the font size of the page, so text and spacing grow when a visitor enlarges the text in their browser. Pixel values do not.

    What is the base size?

    It is the font size on the root element of the page. Browsers use 16px by default, but a site can change it, so enter your own value if it differs.

    Is my CSS sent anywhere?

    No. Everything runs in your browser.

    Related tools