b2KIT

Byte Converter

Convert between bytes, kilobytes, megabytes, gigabytes, and other data size units with binary and decimal modes.

Tested tool guide Tested browser tools Checked August 16, 2026

What Byte Converter does, with a checked example

Data-size labels such as KB and MB are often used with two different scales. Byte Converter translates a quantity among bytes, kilobytes, megabytes, gigabytes, and its other listed size units, using either decimal powers of 1,000 or binary powers of 1,024. The mode is part of the answer: the same number and unit can represent different byte counts. The usual mistake is comparing a decimal storage specification with a binary result without noticing that the selected scale changed.

Worked example

A concrete input and expected output from the current implementation.

Input

Value: 1024; from: bytes; to: kilobytes; mode: binary

Expected output

1 KB

In binary mode, one kilobyte step represents 1,024 bytes. Therefore, 1,024 divided by 1,024 equals 1.

How the result is produced

1

Scaling by mode

Decimal mode makes each step from bytes through kilobytes, megabytes, and gigabytes 1,000 times the preceding unit. Binary mode uses 1,024 for each step. Therefore, the selected mode affects every conversion that crosses a unit boundary, while a bytes-to-bytes conversion is unchanged.

2

Compounding across units

The relationship compounds with unit distance. In decimal mode, a megabyte is 1,000 x 1,000 bytes; in binary mode, it is 1,024 x 1,024 bytes. Converting toward a larger unit can yield a fraction, and converting toward bytes can produce a large whole number.

Good uses

  • Convert an upload limit expressed in MB into the byte count required by a configuration field.
  • Reconcile a drive vendor's decimal GB figure with a binary-scale capacity display.
  • Translate a memory or file size stated in bytes into a more readable binary unit.

Limits and checks

  • Read the selected mode with the result. A binary-mode KB must not be interpreted as decimal kB; the formal binary prefix for 1,024 bytes is KiB.
  • Do not confuse bytes with bits. A bit-based network rate and a byte-based file size are different quantities, and eight bits equal one byte.
  • A converted file size does not predict allocated disk space, transfer overhead, or compressed size. Those values depend on storage, protocol, and file-content details.

Common questions

Which mode should I use for MB or GB?

Decimal mode uses 1,000 between adjacent units, while binary mode uses 1,024. For example, one decimal megabyte is 1,000,000 bytes, while one binary-scaled megabyte is 1,048,576 bytes. IEC calls the latter a mebibyte, or MiB. Use the mode that matches the source value's convention.

Why is the byte value unchanged when I switch modes?

Bytes are the base quantity in both modes. Decimal and binary selections only determine how prefixed units relate to bytes. If the source and target are both bytes, no scale boundary is crossed, so the result stays identical. Once either side is KB, MB, GB, or another multiple, the choice of mode can change the number.

References and verification

The example and behavioral notes were checked against the browser implementation. Standards and primary references below define the relevant format, formula, or platform behavior.

Related Tools