Technology May 12, 2026 3 min read

Developer Unit Converter — Bits, Bytes, Number Bases, and Time Units in One Place

O
OIYO Editorial Contributor

Unit Conversion for Developers

When coding, you repeatedly need to convert between units. Is this file size in bytes or kilobytes? How many minutes is that API response time in milliseconds? How do you convert hexadecimal to decimal? This tool handles those calculations quickly.

개발자 & 디자이너 유틸리티

PX to REM Converter
1.000rem
Color Converter (HEX to RGB)
rgb(59, 130, 246)

* 이 도구는 ahoxy-nextjs의 유틸리티 라이브러리를 기반으로 blog-oiyo용으로 최적화되었습니다.


Data Size Units

The basic unit of computer data is the bit, and 8 bits make one byte.

UnitSizeAbbreviation
Bit0 or 1bit
Byte8 bitsB
Kilobyte1,024 BKB
Megabyte1,024 KBMB
Gigabyte1,024 MBGB
Terabyte1,024 GBTB
Petabyte1,024 TBPB

Note: Hard disk manufacturers label drives using 1 KB = 1,000 B (decimal), but operating systems calculate 1 KB = 1,024 B (binary). This difference is why a “500 GB hard drive” actually shows up as about 465 GiB in your OS.


Number Base Conversion

Decimal → Binary

Repeatedly divide by 2 and read the remainders in reverse order.

10 ÷ 2 = 5 remainder 0
 5 ÷ 2 = 2 remainder 1
 2 ÷ 2 = 1 remainder 0
 1 ÷ 2 = 0 remainder 1
Result: 1010₂ (read remainders in reverse)

Hexadecimal (Hex)

Hexadecimal uses digits 0–9 and letters A–F. It appears frequently in color codes (#FF5733), memory addresses, and SHA hashes.

DecimalHex
10A
11B
12C
13D
14E
15F
1610
255FF

CSS color example: #FF5733 = R:255, G:87, B:51

Quick Base Conversion (JavaScript/Python)

// JavaScript
(255).toString(2)   // → "11111111" (binary)
(255).toString(16)  // → "ff" (hexadecimal)
parseInt("ff", 16)  // → 255 (hex → decimal)
# Python
bin(255)   # → '0b11111111'
hex(255)   # → '0xff'
int('ff', 16)  # → 255

Time Unit Conversion

These come up constantly with API response times, cache TTLs, and timer configurations.

UnitConversion
1 second1,000 milliseconds (ms)
1 minute60 seconds = 60,000 ms
1 hour3,600 seconds = 3,600,000 ms
1 day86,400 seconds
1 week604,800 seconds

Pro tip: JWT expiration times, Redis TTLs, and setTimeout values all use milliseconds or seconds. Since it is easy to mix them up, define them as named constants:

const ONE_HOUR_MS = 60 * 60 * 1000;
const ONE_DAY_SECONDS = 24 * 60 * 60;

Network Speed Units

UnitDescription
bpsbits per second
Kbps1,000 bps
Mbps1,000,000 bps
Gbps1,000,000,000 bps

Note: Internet speeds are measured in bits (lowercase b), while file sizes use Bytes (uppercase B).

  • Download time for a 100 MB file over a 100 Mbps connection: 100 MB × 8 = 800 Mb ÷ 100 Mbps = 8 seconds
O

OIYO Editorial

Content Editor

지식 인큐베이터이자 전문 콘텐츠 크리에이터. 경영, 경제, 법률 및 실생활에 유용한 실무/자격증 중심의 깊이 있는 정보를 연구하고 공유합니다.