Micru Logo

Developer Unit Converter

A precise, client-side unit converter built for developers. Convert data storage, CSS units, time, number bases, angles, and data transfer rates - all instantly in your browser.

Base-10 (SI Decimal)

B
KB
MB
GB
TB

Base-2 (Binary / IEC)

KiB
MiB
GiB
TiB
Privacy Focused: All conversions happen locally in your browser. No data is sent to our servers.

Why a Developer-Focused Unit Converter?

General-purpose unit converters are designed for everyday measurements like weight, temperature, and distance. Developers operate in a completely different measurement landscape: they need to reason about file sizes in both binary and decimal prefixes, translate design mockups from points to pixels, convert API timeouts between milliseconds and seconds, and understand what 100 Mbps actually means in terms of throughput. This tool covers exactly those six categories - and nothing else.

All conversions happen entirely within your browser using JavaScript. No network request is made, and no value you enter is transmitted anywhere. The tool is intentionally minimal: type a value in any field and every related field updates instantly.

Data Storage: Base-10 vs. Base-2

One of the most persistent sources of confusion in computing is the dual definition of storage prefixes. The SI (metric) system defines a kilobyte as exactly 1,000 bytes - the same way a kilogram is 1,000 grams. Hard drive manufacturers use this convention, which is why a "500 GB" hard drive appears as roughly 465 GiB in your operating system.

The binary (IEC) system uses powers of 1,024, reflecting the natural alignment of binary-addressed memory. The IEC 80000-13 standard formalised the unambiguous prefixes in 1998: kibibyte (KiB = 210 bytes), mebibyte (MiB = 220 bytes), gibibyte (GiB = 230 bytes), and tebibyte (TiB = 240 bytes).

Unit System Exact value
1 KBBase-101,000 B
1 KiBBase-21,024 B
1 MBBase-101,000,000 B
1 MiBBase-21,048,576 B
1 GBBase-101,000,000,000 B
1 GiBBase-21,073,741,824 B

When writing code, always be explicit. Ambiguous variable names like fileSizeKB invite bugs. Prefer fileSizeKiB (binary) or fileSizeKB_SI (decimal) and document the convention in your codebase.

CSS & Typography Units: px, rem, em, pt

CSS offers a rich set of length units, but four dominate practical front-end work. Understanding when to use each is essential for building responsive, accessible interfaces.

px - Pixels

A CSS pixel is a device-independent unit defined as 1/96 of an inch at arm's length. On high-DPI (Retina) screens, one CSS pixel may map to two or more physical pixels. Use px for borders, shadows, and layout values that must not scale with user font preferences.

rem - Root EM

rem is relative to the root <html> element's font size - typically 16px by default. It is the preferred unit for font sizes and spacing in design systems because it respects the user's browser accessibility settings. 1rem = 16px at the default root size.

em - Element EM

em is relative to the computed font size of the element itself (or its parent when used for font-size). It compounds through nested elements, which can be a feature (padding that scales with text size) or a trap (unintended size compounding). Use rem for global sizing and em for component-scoped values.

pt - Points

A point is a typographic unit equal to 1/72 of an inch. At the standard screen resolution of 96 DPI, 1pt = 96/72 px = 1.333px. Points are common in print design (PDFs, word processors) and design tools like Figma when exporting to CSS. Converting pt to px is a frequent task when implementing print-sourced designs.

The converter's Root Font Size and Em Context fields let you customise the base values, making it accurate for non-standard configurations (e.g., a root font size of 10px, which makes the 62.5% root trick common in older codebases trivially easy to work with).

Time Units in Code

Milliseconds are the lingua franca of time in programming. JavaScript's Date.now(), setTimeout, and performance.now() all operate in milliseconds. HTTP cache headers and JWT expiry claims, however, use seconds. Database timestamps often use Unix seconds. This creates constant unit-mismatch bugs.

Use this converter to quickly answer questions like: "My API timeout is 30,000 ms - is that 30 seconds or 5 minutes?" or "The session expires in 86,400 seconds - how many hours is that?" (Answer: exactly 24.)

Best practice: always name time variables with their unit. Use timeoutMs, expiresAtSec, or durationMin rather than a bare timeout. This eliminates an entire class of off-by-1000 bugs that are notoriously hard to spot in code review.

Number Bases: Binary, Octal, Decimal, Hex

Developers regularly move between number bases when working with bitwise operations, memory addresses, colour values, file permissions, and protocol encodings.

Binary (Base 2)

Uses only 0 and 1. Essential for understanding bitwise AND, OR, XOR, and shift operations. File permission masks (Unix chmod 755) and network subnet masks are easiest to reason about in binary.

Octal (Base 8)

Uses digits 0-7. Each octal digit maps exactly to three binary bits, making it a compact representation. POSIX file permissions (0755, 0644) use octal. In C and JavaScript, a leading 0 (or 0o) denotes an octal literal.

Decimal (Base 10)

The standard human number system. Decimal is what CPUs ultimately compute in, but it does not align naturally with binary hardware - this misalignment is the root cause of floating-point representation errors like 0.1 + 0.2 !== 0.3 in JavaScript.

Hexadecimal (Base 16)

Uses 0-9 and A-F. One hex digit represents exactly four binary bits (a nibble), making it ideal for memory addresses, byte values, SHA hashes, UUIDs, and CSS colour codes (#FF5733). JavaScript uses 0x prefix for hex literals.

This converter uses arbitrary-precision integer arithmetic (JavaScript BigInt), so it correctly handles numbers larger than 253 without losing precision - a common problem with parseInt() on very large hex values like 64-bit memory addresses.

Angles: Degrees, Radians, and Turns

Angle conversions arise constantly in CSS animations, SVG path construction, canvas drawing, and geometry computations. The three units serve different contexts.

Degrees (0-360) are the most human-readable unit, used in CSS transforms (rotate(45deg)) and design tools. Radians are the native unit of trigonometric functions in every programming language - Math.sin(), Math.cos(), and Math.atan2() all expect radians. A full circle is 2π radians (approximately 6.2832). Turns are a CSS-native unit where 1turn = 360deg, introduced to make animations like rotate(0.25turn) more readable than rotate(90deg).

The key conversion formulas: radians = degrees × (π / 180) and turns = degrees / 360. When passing values to canvas or WebGL APIs, always convert degrees to radians first.

Data Transfer Rates: Bits vs. Bytes

The single most common source of confusion with network speeds is the case of the 'b': ISPs advertise in bits per second (Mbps, with a lowercase b) while file download speeds are reported in bytes per second (MB/s, with an uppercase B). Since 1 byte = 8 bits, a 100 Mbps connection delivers approximately 12.5 MB/s of actual throughput - not 100 MB/s as many users mistakenly assume.

Bits per second (bps, Kbps, Mbps, Gbps)

Used by network equipment specifications, ISP marketing, and protocols. All use SI decimal prefixes: 1 Kbps = 1,000 bps, 1 Mbps = 1,000,000 bps. Gigabit Ethernet (1000BASE-T) runs at 1 Gbps = 1,000 Mbps.

Bytes per second (B/s, KB/s, MB/s, GB/s)

Used by operating systems (download managers, disk I/O stats, dd output) and storage benchmarks. Most tools use SI decimal prefixes here too: 1 KB/s = 1,000 B/s. Divide Mbps by 8 to get MB/s.

Practical example: a home broadband connection advertised as 1 Gbps delivers 125 MB/s maximum throughput. A 4K video file of 8 GB would therefore take a minimum of 64 seconds to download, assuming no protocol overhead. Real-world TCP throughput is typically 85-95% of the theoretical maximum due to headers, retransmits, and congestion control.