Unit Converter for Developers
Three small converters developers keep needing: pixels and rem, byte sizes in decimal and binary units, and milliseconds in human time.
Runs in your browser — nothing is uploaded.
px ↔ rem / em
The root font size, 16 by default.
- px
- Copied
- rem / em
- Copied
Bytes: SI and IEC
Decimal (SI)
Binary (IEC)
Milliseconds ↔ duration
Such as 1h 2m 3s, 90 min, 1.5h or 01:02:03.
How to use it
- px and rem: type a value, pick its unit and set your root font size (16 px by default).
- Bytes: type a size and unit to see it in every decimal (kB, MB…) and binary (KiB, MiB…) unit.
- Time: type milliseconds to get “1h 2m 3s”, or type a duration like 90 min to get milliseconds.
Frequently asked questions
What is the difference between KB and KiB?
kB, MB, GB use powers of 1,000 (SI): 1 MB = 1,000,000 bytes. KiB, MiB, GiB use powers of 1,024 (IEC): 1 MiB = 1,048,576 bytes. Drive makers use SI; operating systems and memory use either, which is why a “1 TB” disk shows about 931 GiB.
Why is rem based on 16 px?
Browsers default the root font size to 16 px, so 1rem = 16px. If your CSS sets html { font-size: 62.5% } the base is 10 px: change it above.
rem or em?
The maths is the same; em is relative to the parent element’s font size, rem to the root. Set the base to the element’s font size to convert em.
Which duration formats are read?
Units w, d, h, m (or min), s (or sec) and ms, such as “2d 3h”, “1.5h” or “90 min”; a clock time like 01:02:03; and a plain number as milliseconds.
Are the byte conversions exact?
The byte total is exact (whole numbers, no rounding). The converted values are shown with up to six decimals.