Kilobytes to Bytes
Convert kilobytes to bytes for size limit checks, protocol design, and exact file sizing. Covers decimal KB (×1,000) and binary KiB (×1,024) with legacy and network context.
Enter your values above to see the results.
Tips & Notes
- ✓HTTP protocol has a practical header size limit around 8 KB = 8,000 bytes (decimal) per request for most web servers. A cookie is limited to 4 KB = 4,000 bytes by browser standards (RFC 6265 recommends 4,096 bytes max).
- ✓Floppy disk capacities were defined in binary: 1.44 MB floppy = 1,474,560 bytes = 1,440 KiB. The "1.44 MB" label mixes decimal prefix (M) with binary quantity — a historical inconsistency still causing confusion.
- ✓Network packets: Ethernet MTU (Maximum Transmission Unit) is 1,500 bytes = 1.5 KB (decimal). TCP window size starts at 64 KiB = 65,536 bytes and scales up. DNS UDP packets are limited to 512 bytes = 0.512 KB (decimal).
- ✓OS kernel and embedded systems work in exact byte counts. Linux page size = 4,096 bytes = 4 KiB. An L1 CPU cache line = 64 bytes. L2 cache is often 256 KiB = 262,144 bytes. Exact byte counts matter for memory alignment and cache efficiency.
- ✓Base64 encoding: converts binary to ASCII text at a 33% size overhead. A 1 KB (1,000 byte) binary file encoded as base64 = 1,333 bytes. This matters for email attachments and JWT tokens, which use base64 encoding.
Common Mistakes
- ✗Using decimal KB when a system expects binary KiB — file system allocation units are binary. A 64 KB allocation unit = 65,536 bytes (not 64,000 bytes). Using 64,000 in calculations involving disk clusters causes errors.
- ✗Confusing kilobytes with kilobits in bandwidth limits — a "64 Kbps" dial-up connection is 64 kilobits per second = 8 kilobytes per second = 8,000 bytes/s (decimal). The byte rate = kilobit rate / 8.
- ✗Ignoring protocol overhead when calculating payload bytes — a 1 KB (1,000 byte) HTTP request also includes headers (200-800 bytes), TCP/IP headers (40+ bytes), and Ethernet framing. Actual wire bytes are higher than payload bytes.
- ✗Assuming all 64 KiB addresses are 65,536 bytes — in modern computing yes, but in 16-bit MS-DOS era, "64K" memory segments were exactly 65,536 bytes (binary KiB). Always verify which convention the documentation uses.
- ✗Treating file size on disk as file size in bytes — a 1 KB file on an NTFS partition with 4,096-byte clusters occupies 4,096 bytes of disk space (one cluster), even though the file data is only 1,000 bytes. Disk usage ≠ file size in bytes.
Kilobytes to Bytes Overview
Kilobytes to bytes conversion reveals the exact byte counts behind the KB values that appear in file systems, protocol specifications, cache limits, and hardware documentation. While KB provides a human-readable scale, byte precision is required for correct implementation.
Kilobytes to bytes formula:
Bytes = KB × 1,000 (decimal) | Bytes = KiB × 1,024 (binary) | Important: specify which convention
EX: Cookie limit 4 KB → 4 × 1,000 = 4,000 bytes (decimal) OR 4 × 1,024 = 4,096 bytes (binary KiB). Linux page size 4 KiB → 4 × 1,024 = 4,096 bytes (always binary in OS contexts)Key computing size limits in KB and bytes:
DNS UDP: 512 bytes | Cookie: 4 KB | HTTP header: 8 KB | Ethernet MTU: 1,500 bytes | TCP window: 64 KiB
EX: Dial-up 56 Kbps → bytes/s = 56,000 bits/s ÷ 8 = 7,000 bytes/s = 7 KB/s. ADSL 1 Mbps → 1,000,000 ÷ 8 = 125,000 bytes/s = 125 KB/sLegacy storage capacities in KiB and bytes:
| Medium | KiB | Bytes | Label Used |
|---|---|---|---|
| 8" floppy SD | 77 KiB | 78,848 B | "77 KB" |
| 5.25" HD floppy | 1,200 KiB | 1,228,800 B | "1.2 MB" |
| 3.5" HD floppy | 1,440 KiB | 1,474,560 B | "1.44 MB" |
| ZIP disk | 100,000 KiB | 102,400,000 B | "100 MB" |
| CD-ROM | 700,000 KiB | 716,800,000 B | "700 MB" |
| Protocol / Component | Limit (bytes) | Decimal KB | Binary KiB |
|---|---|---|---|
| SMS message (7-bit) | 140 bytes | 0.14 KB | 0.137 KiB |
| DNS UDP packet | 512 bytes | 0.512 KB | 0.5 KiB |
| Ethernet frame (MTU) | 1,500 bytes | 1.5 KB | 1.465 KiB |
| Browser cookie max | 4,096 bytes | 4.096 KB | 4.0 KiB |
| HTTP header limit (typical) | 8,192 bytes | 8.192 KB | 8.0 KiB |
| TCP initial window | 65,536 bytes | 65.536 KB | 64.0 KiB |
Frequently Asked Questions
Multiply KB by 1,000 (decimal) or KiB by 1,024 (binary). Examples: 1 KB = 1,000 bytes; 4 KB (cookie limit) = 4,000 bytes; 8 KB (HTTP header limit) = 8,000 bytes; 64 KiB (memory page) = 65,536 bytes; 512 KiB (L2 cache) = 524,288 bytes; 1,024 KiB = 1,048,576 bytes = 1 MiB. For internet speeds: 64 Kbps = 64,000 bits/s = 8,000 bytes/s = 8 KB/s (decimal).
Key KB limits: browser cookie limit 4 KB = 4,096 bytes (RFC 6265 recommended max); HTTP request header typical server limit 8 KB = 8,000-8,192 bytes; DNS UDP packet maximum 512 bytes (0.5 KB); Ethernet MTU 1,500 bytes (1.5 KB); TCP window initial size 64 KiB = 65,536 bytes; Linux page size 4 KiB = 4,096 bytes; CPU L1 cache line 64 bytes; SMS text message 160 bytes (7-bit GSM) or 70 bytes (Unicode). Understanding these limits helps developers avoid truncation and protocol errors.
Early computing used binary kilobytes throughout. Intel 4004 (1971): 4-bit, addressed 4,096 bytes = 4 KiB. Commodore 64 (1982): 64 KiB = 65,536 bytes RAM. IBM PC original (1981): 640 KB = 640 × 1,024 = 655,360 bytes addressable. Floppy disks: 5.25-inch HD = 1.2 MB = 1,228,800 bytes = 1,200 KiB; 3.5-inch HD = 1.44 MB = 1,474,560 bytes = 1,440 KiB. Note: "1.44 MB" is unusual — it mixes decimal M (1,000,000) interpretation with actual 1,440 × 1,024 bytes, making it neither purely decimal nor binary. The actual byte count is 1,474,560.
SMS uses the GSM 03.38 character encoding: each 7-bit character allows 160 characters per SMS message = 160 × 7/8 = 140 bytes = 0.14 KB. Unicode (UCS-2) SMS: 70 characters per message = 70 × 2 = 140 bytes = 0.14 KB. Concatenated (long) SMS: multiple segments each 153 characters (7-bit) or 67 characters (Unicode) linked by a 7-byte header. MMS (multimedia messaging): up to 300 KB to 1 MB (operator dependent). Modern messaging apps (WhatsApp, iMessage) use internet data rather than SMS — no strict character limit.
Web caching uses byte-exact comparisons. HTTP cache headers specify size limits: Cache-Control max-age, Content-Length in bytes. CDN edge nodes cache resources; frequently accessed content under 8 KB may be stored in CDN memory (L1 cache) for sub-millisecond retrieval. Larger files go to SSD or HDD cache with higher latency. Browser cache: Chrome caches resources under 32 MB. Service worker cache: no hard limit but typically kept under 50 MB. Cache invalidation compares byte counts and ETags (checksums). A 1-byte change to a CSS file changes its checksum and forces re-download — every byte matters.
Network socket buffers are specified in bytes. TCP socket receive buffer: default 87,380 bytes ≈ 85 KiB on Linux; configurable up to 4 MB. UDP datagram max size: 65,507 bytes ≈ 64 KiB (limited by 16-bit length field minus IP/UDP headers). WebSocket frames: 2-byte header for payloads under 126 bytes; 4-byte header for 126-65,535 bytes (up to 64 KiB); 10-byte header for larger. HTTP/2 frames: default max frame size 16,384 bytes = 16 KiB. gRPC messages: default max size 4 MB = 4,194,304 bytes. Understanding exact byte limits prevents buffer overflows and protocol errors in network programming.