# Bit and Byte Converter

URL: https://hifreetools.com/developer/bit-byte-converter

> Instantly convert between bits, bytes, kilobytes, megabytes, gigabytes, terabytes, and petabytes — using both decimal (SI) and binary (IEC) prefixes. Everything runs in your browser with no data uploaded.

## Quick answer

A bit is the smallest unit of digital data — it holds either a 0 or a 1. Eight bits equal one byte. In the decimal (SI) system, one kilobyte is 1,000 bytes and one megabyte is 1,000,000 bytes. In the binary (IEC) system, one kibibyte is 1,024 bytes and one mebibyte is 1,048,576 bytes. To convert from bits to bytes, divide by 8; to go from bytes to bits, multiply by 8. For network speeds measured in megabits per second (Mbps), divide by 8 to get megabytes per second (MB/s).

## Formula

- bytes = bits / 8
- KB = bytes / 1000 (SI) — KiB = bytes / 1024 (IEC)

## Examples

- 1 MB to bits: 1 megabyte (MB) → 8,000,000 bits (8 Mb)
- 100 Mbps to MB/s: 100 megabits per second (Mbps) → 12.5 megabytes per second (MB/s)
- 4 GB to bytes: 4 gigabytes (GB) → 4,000,000,000 bytes
- 512 KB to bits: 512 kilobytes (KB) → 4,096,000 bits

## FAQ

**What is the difference between a bit and a byte?**
A bit (b) is the smallest unit of digital information and stores a single binary value — 0 or 1. A byte (B) is made up of 8 bits and is the standard unit for measuring file sizes and memory.

**Why does 1 MB mean different things in different contexts?**
In the SI decimal system (used by hard drive manufacturers), 1 MB = 1,000,000 bytes. In the IEC binary system (used for RAM and by Windows for file sizes), 1 MiB (mebibyte) = 1,048,576 bytes. This is why Windows shows a 500 GB drive as about 465 "GB", really 465 GiB.

**How do I convert Mbps to MB/s?**
Divide by 8. Internet speeds are measured in megabits per second (Mbps), but file sizes are in megabytes (MB). So a 100 Mbps connection can transfer up to 12.5 MB/s in ideal conditions.

**What is the difference between KB and KiB?**
KB (kilobyte) is the SI decimal unit where 1 KB = 1,000 bytes. KiB (kibibyte) is the IEC binary unit where 1 KiB = 1,024 bytes. The difference grows significantly at larger scales — 1 TB vs 1 TiB differs by about 99.5 GB.

**How many bytes are in a gigabyte?**
In the SI decimal system, 1 GB = 1,000,000,000 bytes (10^9). In the IEC binary system, 1 GiB = 1,073,741,824 bytes (2^30). Storage manufacturers use the decimal definition; Windows reports sizes in binary units (labeled GB), while macOS uses decimal.

**Is my data sent to a server when I use this converter?**
No. All conversions are calculated directly in your browser using JavaScript. Nothing you enter is transmitted to any server.


## Sources

- [IEC 80000-13:2008 — Quantities and units for information science and technology](https://www.iso.org/standard/31898.html)
- [NIST — Prefixes for Binary Multiples](https://physics.nist.gov/cuu/Units/binary.html)

Runs in the browser; nothing is uploaded. Cite as: HIFreeTools, "Bit and Byte Converter", https://hifreetools.com/developer/bit-byte-converter
