Byte Size Converter

Convert between Bytes, KB, MB, GB, TB, and PB instantly. Supports both binary (KiB, MiB, GiB) and decimal (SI) units. Free online file size calculator for developers.

Byte Size Converter

Unit Type

1 Byte = 8 bits

Decimals

Precision for converted values

Input

Enter value (supports: 1024, 1.5 GB, 2 MiB, 1_000_000)

🔷 IEC Binary (1024-based)

Bytes
KiB
MiB
GiB
TiB
PiB

Common File Sizes

Network Speed Calculator

Calculate download/upload time based on size & speed.

File Size (MB)
Connection Speed (MB/s)
Estimated Time
10s

Bytes to KB, MB, GB, TB Converter

A byte size converter translates digital storage values between all common units: Bytes, Kilobytes (KB), Megabytes (MB), Gigabytes (GB), Terabytes (TB), and Petabytes (PB). Understanding data sizes is essential for developers working with file uploads, REST APIs, database storage, network bandwidth limits, and cloud pricing.

This file size calculator supports both the decimal (SI) standard used by storage manufacturers and the binary (IEC) standard used by operating systems, so you always get the right answer for your context.

Binary vs Decimal units: what is the difference?

  • Decimal (SI) units: 1 KB = 1,000 bytes, 1 MB = 1,000,000 bytes. Used by storage manufacturers, network providers, and most file size labels.
  • Binary (IEC) units: 1 KiB = 1,024 bytes, 1 MiB = 1,048,576 bytes. Used by operating systems (Windows, Linux, macOS) to report RAM and actual file sizes.
  • Why this matters: A hard drive advertised as "1 TB" (1,000,000,000,000 bytes) appears as roughly 931 GiB in your operating system. This converter helps you explain that gap to clients or work through it in your code.

How to convert bytes

  1. Enter a value in any unit field: Bytes, KB, MB, GB, TB, or PB.
  2. All other fields update instantly.
  3. Toggle between decimal (SI) and binary (IEC) mode at any time.
  4. Click any result to copy it to your clipboard.

Developer use cases

  • File upload limits: Convert a server-side byte limit (e.g. 10,485,760 bytes) to a human-readable MB value for user-facing error messages.
  • API payload size: Quickly check if a JSON response fits within a gateway's 10 MB limit.
  • Cloud storage pricing: Convert storage sizes between units when comparing S3, GCS, or Azure pricing tiers.
  • Database field sizing: Calculate whether a BLOB column or VARCHAR length is large enough for your expected data.

Quick reference: bytes to KB, MB, GB

  • 1 KB = 1,000 bytes (decimal) / 1,024 bytes (binary KiB)
  • 1 MB = 1,000,000 bytes (decimal) / 1,048,576 bytes (binary MiB)
  • 1 GB = 1,000,000,000 bytes (decimal) / 1,073,741,824 bytes (binary GiB)
  • 1 TB = 1,000,000,000,000 bytes (decimal) / 1,099,511,627,776 bytes (binary TiB)

Free forever, no ads, no tracking. Support the project