Small files and packets in kilobytes
A kilobyte is the unit people use to describe a small file, an email without attachments, a web page fragment or a network packet. This page takes a raw byte count from a file listing, a log or a programming language and expresses it as a decimal kilobyte. The default of 10 bytes gives 0.01 kB, which only checks the arithmetic. More typical inputs are in the hundreds or thousands: a 4,096 byte disk block is 4.096 kB, a 512 byte sector is 0.512 kB, and an Ethernet frame with a 1,500 byte payload is 1.5 kB. The conversion is a division by 1,000, with no rounding unless you choose to round the result.
What kilo means in the SI
The SI Brochure from the BIPM defines kilo as 1,000, and NIST SP 811 states that the prefixes keep their decimal meaning when applied to bytes. Used that way, 1 kB is 1,000 bytes, 1 MB is 1,000,000 bytes and 1 GB is a billion. The binary quantity of 1,024 bytes has its own name, the kibibyte (KiB), introduced in IEC standards in the late 1990s. Storage makers use the decimal meaning, which is why a drive sold as 500 GB holds 500 billion bytes. The page title says decimal to remind you which one it uses. The symbol for kilobyte is kB with a lowercase k, and KB is a common but nonstandard form.
Block sizes that show the decimal and binary gap
Disk sectors and memory pages come in powers of two, so their kilobyte values look less tidy in decimal. A 4,096 byte block is 4.096 kB, or exactly 4 KiB. A 512 byte sector is 0.512 kB and 0.5 KiB. A 65,536 byte buffer is 65.536 kB, or 64 KiB. The difference is 2.4 percent at the kilo level and grows with each prefix, reaching 7.4 percent at the giga level. If a tool reports 4 KB for a block, check whether it means 4,000 or 4,096 bytes. Some tools and operating systems use K for 1,024 in their own displays, so an exact byte count removes the doubt. A listing that shows 4,096 for the block size, rather than 4 K, can be entered here with no ambiguity, and the page gives the decimal kilobyte value next to the binary one when you switch the target to kibibytes.
Converting back and to binary units
To go from kilobytes to bytes, multiply by 1,000, so 2.5 kB is 2,500 bytes. Binary units are in the menu too. One kibibyte is 1.024 kB, so 1,024 bytes shown as 1 KiB is also 1.024 kB in decimal terms. A file of 3,000 bytes is 3 kB and 2.93 KiB. The page converts whichever pair you select, and the difference between decimal and binary is visible by switching the source unit. For programming work with buffers, binary units are natural. For disk labels, bandwidth and file transfer specifications, decimal units are the convention.
Text and characters
A plain ASCII character takes one byte, so a text file of 3,500 characters is about 3.5 kB. UTF-8 uses one byte for ASCII, two for many accented letters and Greek or Cyrillic, three for most East Asian characters and four for others, so the same count of characters can take two or three times as many bytes in other scripts. A page of English prose of 2,000 characters therefore fits in roughly 2 kB, and a short message in Chinese of 700 characters may take about 2.1 kB. These figures are approximate, since file formats add headers and markup. The byte count in a file listing is the exact figure to enter.
Comparing nearby file sizes
The division by 1,000 can be shown exactly in decimal, so no information is lost for integer inputs. A value such as 1,234 bytes is 1.234 kB, and 987 bytes is 0.987 kB. Display software often rounds to one or two decimals, which can make two nearby sizes look equal. If you compare files, use bytes. Rounding up is common when reporting storage use, and rounding down is common in transfer progress bars. State the convention in your report. If you total many files, add the byte counts first and convert the sum once, since rounding each file to the nearest tenth of a kilobyte may shift the total by several kilobytes. With 1,000 files of 1,499 bytes each, rounding every file to 1.5 kB gives 1,500 kB, while the true total is 1,499 kB, a small error here but one that grows with larger rounding steps.
Where kilobyte figures are quoted
Kilobytes appear in web performance budgets, email size limits, microcontroller memory specifications and file format documentation. A microcontroller with 32 kB of flash has 32,000 bytes in the decimal sense, though many datasheets mean 32,768 bytes and write KB. A web page of 150 kB weighs 150,000 bytes. When the number matters, such as when fitting a firmware image, ask for the byte count and use the binary meaning if the vendor does. The converter can show both, because the kibibyte is in the menu, so you can enter the byte count and read the result in either unit. Image and audio formats show the same pattern: a 48,000 byte icon is 48 kB, and a short sound clip of 176,400 bytes, one second of CD-quality stereo audio, is 176.4 kB. Always take the count from the file properties, which list the exact bytes, and not from a rounded display.
Common mistakes with kilo
Frequent slips are dividing by 1,024 when 1,000 is wanted, writing Kb for kilobit instead of kB for kilobyte, and treating bits and bytes as the same. A lowercase b means bit and an uppercase B means byte, so 8 kb is 1 kB. Another slip is applying the page to a rate, such as bytes per second, which has its own converters. Check the digits as well. A result that is smaller than the input by a factor of 1,000 is expected here, so a result larger than the input signals that the units were swapped. Also watch for thousands separators, since 1.500 means one and a half in some countries and fifteen hundred in others, and a pasted value with the wrong separator changes the answer by a factor of 1,000.