Free online tool to convert between bits, bytes, KB, MB, GB, TB and PB instantly. Perfect for file sizes, internet speeds, storage capacity, and data transfer calculations.
The table below covers the most frequently needed digital storage conversions - from bytes to kilobytes, megabytes to gigabytes, and gigabits to megabytes. Bookmark this page for instant reference.
| From | To | Formula | Example |
|---|---|---|---|
| Bytes (B) | Kilobytes (KB) | ÷ 1,024 | 2,048 B = 2 KB |
| Kilobytes (KB) | Megabytes (MB) | ÷ 1,024 | 1,024 KB = 1 MB |
| Megabytes (MB) | Gigabytes (GB) | ÷ 1,024 | 1,024 MB = 1 GB |
| Gigabytes (GB) | Terabytes (TB) | ÷ 1,024 | 1,024 GB = 1 TB |
| Terabytes (TB) | Petabytes (PB) | ÷ 1,024 | 1,024 TB = 1 PB |
| Bits (bit) | Bytes (B) | ÷ 8 | 8 bits = 1 byte |
| Megabits (Mb) | Megabytes (MB) | ÷ 8 | 80 Mb = 10 MB |
| Gigabits (Gb) | Gigabytes (GB) | ÷ 8 | 8 Gb = 1 GB |
| Megabytes (MB) | Megabits (Mb) | × 8 | 1 MB = 8 Mb |
| Gigabytes (GB) | Megabytes (MB) | × 1,024 | 1 GB = 1,024 MB |
| Terabytes (TB) | Gigabytes (GB) | × 1,024 | 2 TB = 2,048 GB |
| Kilobytes (KB) | Bytes (B) | × 1,024 | 5 KB = 5,120 B |
A bytes and bits converter is an online tool that lets you instantly convert between any digital storage or data size units - from tiny bits and bytes all the way up to kilobytes (KB), megabytes (MB), gigabytes (GB), terabytes (TB), and petabytes (PB). It also handles bit-based units such as kilobits (Kb), megabits (Mb), gigabits (Gb), and terabits (Tb) - which are essential for understanding internet speeds and network bandwidth.
Digital storage units can be confusing because two different standards exist: the binary (base-2) system used by operating systems and RAM, and the decimal (base-10) system used by hard drive manufacturers and internet service providers. This tool uses the binary standard (1 KB = 1,024 bytes) for storage unit conversions and the bits-to-bytes relationship (1 byte = 8 bits) for network speed conversions - the most widely used and technically accurate definitions for computing contexts.
Whether you need to convert MB to GB for cloud storage planning, convert Mbps to MB/s for download speed calculations, or understand how many bytes are in a terabyte for a data engineering project, this converter gives you an instant, accurate answer.
Converting digital storage units with this tool takes only a few seconds:
The converter auto-converts in real time - no need to press a button. Your last-used units and values are saved in your browser so you can pick up where you left off.
A bit is the most fundamental unit of digital information. It can hold exactly one of two values: 0 or 1. The word "bit" is a portmanteau of binary digit. Everything in computing - text, images, videos, programs - is ultimately stored as sequences of bits. On its own, a single bit has limited use; practical computing operates on groups of bits called bytes. There are 8 bits in one byte.
A byte consists of 8 bits and is the standard base unit for measuring digital storage and file sizes. One byte can represent 256 different values (2⁸) and is large enough to encode a single ASCII character - for example, the letter "A" is stored as the byte 01000001. File sizes on your computer (photos, documents, videos, apps) are all measured starting from bytes. Converting bytes to KB, MB, GB, or TB simply involves dividing by successive powers of 1,024.
One kilobyte equals exactly 1,024 bytes (2¹⁰) in the binary standard used by operating systems. Despite "kilo" meaning 1,000 in the metric system, computing adopted 1,024 because it is the closest power of 2 to 1,000 and computers work natively in binary. A plain text file or a short email is typically a few kilobytes. A single page of unformatted text is roughly 1–4 KB. To convert bytes to kilobytes, divide by 1,024.
One megabyte equals 1,024 KB or 1,048,576 bytes (2²⁰). This is one of the most commonly referenced storage units in everyday computing. A high-resolution photo typically takes 3–8 MB. An MP3 audio file is usually 3–10 MB. A PDF document might be 1–5 MB. App installers and software packages are frequently measured in megabytes. To convert megabytes to gigabytes, divide by 1,024. To convert MB to bytes, multiply by 1,048,576.
One gigabyte equals 1,024 MB or 1,073,741,824 bytes (2³⁰). Gigabytes are the standard unit for measuring smartphone storage, USB drives, RAM, and game download sizes. A standard HD movie file is typically 4–8 GB. Modern smartphones have 64–512 GB of internal storage. An hour of 4K video footage takes around 12–50 GB depending on the codec. To convert GB to MB, multiply by 1,024. To convert GB to TB, divide by 1,024.
One terabyte equals 1,024 GB or approximately 1.1 trillion bytes (2⁴⁰). Hard drives and solid-state drives for personal computers are commonly sold in terabyte increments - 1 TB, 2 TB, 4 TB. A 1 TB drive can store roughly 250,000 photos, 500 hours of HD video, or 200,000 MP3 songs. Enterprise NAS systems and cloud storage tiers are typically measured in terabytes. To convert TB to GB, multiply by 1,024.
One petabyte equals 1,024 TB or approximately 1.13 quadrillion bytes (2⁵⁰). Petabytes are the domain of large enterprises, cloud providers, and data centres. Companies like Google, Facebook, and Amazon process and store petabytes of data every day. The entire printed collection of the US Library of Congress is estimated at around 10–15 TB, so one petabyte could hold roughly 70–100 such collections.
One of the most common points of confusion in digital storage and networking is the difference between bits and bytes - specifically why your internet plan advertises speeds in Mbps (megabits per second) while your download manager shows speeds in MB/s (megabytes per second).
Internet service providers (ISPs) and network equipment manufacturers measure bandwidth in bits per second (bps, Kbps, Mbps, Gbps). This is because data transmission at the hardware level operates bit by bit. A "100 Mbps" broadband plan means the line can transfer 100 million bits every second.
File sizes and download speeds displayed by software are almost always in bytes (B/s, KB/s, MB/s). Because 1 byte = 8 bits, you divide the advertised Mbps speed by 8 to get the MB/s download speed you will actually observe.
This is why a "1 Gbps" fibre plan downloads a 1 GB file in about 8 seconds (not 1 second) - the 1 GB file is 8 gigabits, and at 1 Gbps it takes 8 seconds to transfer. Use the converter above to quickly calculate expected download times by converting between Mbps and MB/s for any file size.
| Internet Speed | Actual Download Speed | 1 GB File Download Time |
|---|---|---|
| 10 Mbps | 1.25 MB/s | ~13.7 minutes |
| 50 Mbps | 6.25 MB/s | ~2.7 minutes |
| 100 Mbps | 12.5 MB/s | ~1.4 minutes |
| 500 Mbps | 62.5 MB/s | ~16 seconds |
| 1 Gbps (1,000 Mbps) | 125 MB/s | ~8 seconds |
| 10 Gbps | 1,250 MB/s (1.22 GB/s) | <1 second |
If you have ever bought a "1 TB" hard drive and noticed Windows or macOS showing only about 931 GB, you have encountered the binary vs. decimal storage standard conflict - one of the most persistent sources of confusion in consumer electronics.
Hard drive manufacturers use the decimal (SI) standard where 1 KB = 1,000 bytes, 1 MB = 1,000,000 bytes, and 1 TB = 1,000,000,000,000 bytes. This makes their drives sound larger in marketing materials.
Operating systems (Windows, macOS, Linux) use the binary standard where 1 KB = 1,024 bytes and 1 TB = 1,099,511,627,776 bytes. When your OS receives a drive with 1,000,000,000,000 bytes and divides by 1,099,511,627,776 (binary TB), it gets 0.9095 - displayed as approximately 931 GB.
In 1998, the International Electrotechnical Commission (IEC) introduced binary prefixes to resolve this ambiguity: kibibyte (KiB) = 1,024 bytes, mebibyte (MiB) = 1,048,576 bytes, gibibyte (GiB) = 1,073,741,824 bytes, and so on. Linux and some technical software now use KiB/MiB/GiB correctly, but most consumer products still use KB/MB/GB to mean both binary and decimal, creating ongoing confusion. This converter uses the traditional binary (1024-based) definitions for KB, MB, GB, TB, and PB, which matches how most operating systems and computing tools report storage.
Use this reference to understand typical file sizes across common file types - helpful when planning storage, estimating backup space, or designing applications.
| File Type | Typical Size | Notes |
|---|---|---|
| Plain text document (1 page) | 1–4 KB | Unformatted .txt file |
| Microsoft Word document | 50–500 KB | Depends on embedded images |
| PDF document | 100 KB – 5 MB | Higher with images/graphics |
| JPEG photo (smartphone) | 2–8 MB | 12–108 MP camera sensor |
| RAW photo (DSLR) | 20–50 MB | Uncompressed sensor data |
| MP3 audio (1 minute) | ~1 MB | 128 kbps encoding |
| FLAC audio (1 minute) | ~20 MB | Lossless audio |
| MP4 video – 1080p (1 hour) | 4–8 GB | H.264 compression |
| MP4 video – 4K (1 hour) | 15–50 GB | H.265/HEVC compression |
| Mobile game (average) | 100 MB – 2 GB | Varies widely by genre |
| PC/console game (modern) | 30–150 GB | AAA titles often 50–100 GB |
| Operating system install | 4–20 GB | Windows 11 ~20 GB, macOS ~12 GB |
| Blu-ray movie (uncompressed) | 25–100 GB | 4K UHD Blu-ray ~50–100 GB |
Developers frequently convert between bits and bytes when working with network protocols (where data rates are in bits per second), file I/O (bytes), database storage (MB/GB), and memory allocation (KB/MB). Converting MB to bytes or GB to KB is a daily task when setting buffer sizes, estimating query result sizes, or configuring cloud infrastructure limits.
Network engineers must constantly convert between Mbps and MB/s when calculating throughput, sizing WAN links, or explaining internet plan speeds to clients. A 10 Gbps uplink carries 1,250 MB/s of actual data. Firewall rules, QoS policies, and bandwidth throttling are all configured in bits-per-second, while traffic monitoring dashboards show bytes-per-second.
Cloud providers (AWS, Azure, GCP) charge for storage in GB and TB and for data transfer in GB. Converting TB to GB or PB to TB helps engineers estimate costs accurately. Sizing S3 buckets, RDS instances, or Kubernetes persistent volumes all require confident unit conversion between bytes, megabytes, gigabytes, and terabytes.
Consumers regularly need to convert digital storage units to make purchasing decisions. Is a 256 GB phone enough? How many photos fit on a 128 GB memory card? How long will it take to download a 50 GB game on a 100 Mbps connection? This converter answers all of these questions instantly without requiring manual calculation.
Modern games routinely exceed 100 GB. Video editors working with 4K RAW footage generate files in the hundreds of gigabytes per project. Understanding GB to TB conversions helps gamers plan SSD capacity and content creators size their NAS or external drive arrays for project archiving.
Computer science and IT courses cover binary number systems, data representation, and storage units as core topics. Converting between bits, bytes, KB, MB, and GB is a standard exam topic at secondary and tertiary level. This converter doubles as a learning tool - students can verify their manual calculations instantly.
| Unit | Symbol | Equals (in bytes) | Type | Common Use |
|---|---|---|---|---|
| Bit | b / bit | 0.125 bytes (1/8) | Binary | Network speeds, data transmission |
| Byte | B | 1 byte | Binary | File sizes, all storage measurements |
| Kilobit | Kb | 125 bytes | Decimal | Dial-up modem speeds, DSL |
| Kilobyte | KB | 1,024 bytes | Binary | Text files, small images, config files |
| Megabit | Mb | 125,000 bytes | Decimal | Broadband internet speeds (Mbps) |
| Megabyte | MB | 1,048,576 bytes | Binary | Photos, music, documents, apps |
| Gigabit | Gb | 125,000,000 bytes | Decimal | Gigabit ethernet, fast broadband |
| Gigabyte | GB | 1,073,741,824 bytes | Binary | Smartphones, USB drives, games, RAM |
| Terabit | Tb | 125,000,000,000 bytes | Decimal | Data centre backbone links |
| Terabyte | TB | 1,099,511,627,776 bytes | Binary | Hard drives, SSDs, backups |
| Petabit | Pb | 125,000,000,000,000 bytes | Decimal | Submarine cable capacity |
| Petabyte | PB | 1,125,899,906,842,624 bytes | Binary | Data centres, cloud storage tiers |
In the binary standard (used by operating systems), 1 kilobyte = 1,024 bytes. In the decimal standard (used by storage manufacturers), 1 kilobyte = 1,000 bytes. This converter uses the binary standard.
In the binary standard, 1 gigabyte = 1,024 megabytes. To convert GB to MB, multiply by 1,024. To convert MB to GB, divide by 1,024.
1 terabyte = 1,024 gigabytes in binary. A 2 TB drive contains 2,048 GB. This is why a "1 TB" hard drive shows roughly 931 GB in Windows - the OS uses binary, while the manufacturer uses decimal (1 TB = 1,000 GB in their labelling).
Capitalisation matters: MB (capital B) = Megabytes - used for file sizes and storage. Mb (lowercase b) = Megabits - used for network speeds. 1 MB = 8 Mb. Internet plans advertised as "100 Mbps" provide a maximum download speed of 12.5 MB/s.
Divide the Mbps value by 8. A 200 Mbps connection gives a maximum download speed of 25 MB/s. This is because there are 8 bits in a byte, so megabits ÷ 8 = megabytes.
There are exactly 8 bits in one byte. This is a universal constant in modern computing. So 1 KB = 8,192 bits, 1 MB = 8,388,608 bits, and 1 GB = 8,589,934,592 bits.
Hard drive manufacturers measure in decimal (1 TB = 1,000,000,000,000 bytes), but your operating system measures in binary (1 TB = 1,099,511,627,776 bytes). When the OS divides the actual byte count by the binary TB value, a "1 TB" drive shows as approximately 931 GB. No bytes are missing - it's a labelling standard difference.
Petabytes are used by large organisations - social media platforms, cloud providers, government agencies, and research institutions. Facebook stores hundreds of petabytes of photos. The Human Genome Project produced about 200 TB of raw data. Particle physics experiments at CERN generate petabytes of collision data per year.
Yes. All conversions use exact binary factors (powers of 1,024) and the standard 1 byte = 8 bits relationship. Results are shown to 6 decimal places, providing precision well beyond what is needed for any practical computing or storage planning purpose.
Yes. All calculations run entirely in your browser using JavaScript. No data is sent to any server, and the converter works without an internet connection once the page has loaded.
1. Distinguish bits (b) from bytes (B) at a glance. By convention, lowercase "b" = bits and uppercase "B" = bytes. So "Mbps" means megabits per second and "MB/s" means megabytes per second. Always check the capitalisation in specs and documentation.
2. To roughly halve any MB/s speed to Mbps, multiply by 8. A 50 MB/s SSD read speed equals 400 Mbps throughput. This quick mental conversion helps when comparing storage and network specs.
3. Add 10–15% overhead when sizing storage. Filesystems themselves consume 5–10% of drive capacity for metadata and system files. Always provision more storage than your raw data size requires.
4. RAM is always binary. Your computer's RAM specifications are always in binary gigabytes - 8 GB of RAM = exactly 8,589,934,592 bytes. There is no decimal ambiguity in RAM specifications.
5. For cloud cost estimation, use decimal GB. AWS, Azure, and GCP all bill by decimal gigabytes (1 GB = 1,000,000,000 bytes), not binary gibibytes. When estimating costs, make sure you are using the correct definition to avoid budget surprises.
6. Use the Swap button for quick reverse checks. After converting 500 MB to GB (result: 0.488281 GB), swap the units and enter 0.488281 to verify you get back to 500 MB - a fast sanity check for critical calculations.
Discover more free developer tools that might interest you.
Convert between length units
Use ToolConvert between mass/weight units
Use ToolConvert between temperature scales
Use ToolConvert between area units
Use ToolConvert between volume units
Use ToolConvert between speed/velocity units
Use ToolRead the how-to, then come back to this tool when you are ready to run it locally.