inyourbrowser.com

Byte converter

Byte converter is a calculator tool that converts a storage size between bytes, KB, MB, GB, TB, and PB. It shows every unit at once, switches between decimal SI units (1 KB = 1,000 bytes) and binary IEC units (1 KiB = 1,024 bytes), and keeps the byte count when you switch, so 1 TB reads as about 0.909495 TiB. The tool runs in your browser.

Standard:
UNITVALUE
B1,000,000
KB1,000
MB← input1
GB0.001
TB< 0.001
PB< 0.001

Decimal (SI): 1 KB = 1,000 B · 1 MB = 1,000,000 B · used by storage manufacturers

How to convert byte units

  1. Enter a value in the input field.
  2. Select the source unit, bytes, KB, MB, GB, TB, or their binary equivalents.
  3. All other units are displayed simultaneously in the results table.
  4. Click Decimal (SI) or Binary (IEC) to show the same size in the other standard.

Common uses

Technical specification

  • Algorithm or formula: Multiplication by base unit factors. SI (decimal) uses powers of 1,000; IEC (binary) uses powers of 1,024.
  • Browser API or library: Pure JavaScript arithmetic. No external library.
  • Input limits: JavaScript Number range (up to 2^53 safe integer). Very large values lose precision beyond that limit.
  • Output: All units of the selected standard (B, KB, MB, GB, TB, PB in decimal mode, or B, KiB, MiB, GiB, TiB, PiB in binary mode) displayed simultaneously.
  • Known limitations: Bit units (b, kb, Mb, Gb) are not included. Mixed-base inputs (e.g. “1.5 KB”) must be entered as plain numbers in one unit at a time.

Frequently asked questions

What is the difference between MB and MiB?
MB (megabyte) uses the SI definition: 1 MB = 1,000,000 bytes. MiB (mebibyte) uses the binary definition: 1 MiB = 1,048,576 bytes. Operating systems often mix both conventions.
Why does my 1 TB hard drive show less than 1 TB on my computer?
Drive manufacturers use SI TB (10^12 bytes), but operating systems often report in binary GiB, making the drive appear smaller. A 1 TB drive holds approximately 931 GiB.
Is my data sent to a server?
All conversions are pure JavaScript calculations running in your browser. Our servers are not involved at any point.
Does the tool support bits as well as bytes?
The tool converts byte units: B, KB, MB, GB, TB and PB, or B, KiB, MiB, GiB, TiB and PiB. Network speeds are usually quoted in bits: multiply bytes by 8 to get bits, or divide bits by 8 to get bytes.

Related tools

Unit converter
Convert length, weight, temperature, speed and volume between metric and imperial. Instant results.
Number base converter
Convert numbers between binary, octal, decimal, and hex. All bases shown at once.
CIDR / subnet calculator
Calculate network address, broadcast, host range and usable hosts from any CIDR block.

Reviewed and tested September 30, 2026.