Reading file sizes
A kilobyte of 1,000 bytes makes this the simplest conversion on the site: move the decimal point three places to the right. The default entry of 10 kB is 10,000 bytes. A web developer reading a bundle report of 48.5 kB has a file of 48,500 bytes, and a photo thumbnail of 3.2 kB has 3,200 bytes. The page uses the decimal definition, which the SI prefix kilo requires. Operating systems differ, so a listing that says 48.5 KB may mean 49,664 bytes, since 48.5 times 1,024 is 49,664. Checking the byte count is the way to settle which convention a program uses. Page-speed tools make this practical: a script reported at 112.4 kB is 112,400 bytes, and a style sheet at 18 kB is 18,000, so the two together need 130,400 bytes on the wire before compression is applied by the server.
Why file dialogs disagree
Windows has long displayed file sizes using a 1,024-based kilobyte labeled KB, and its Properties window also shows the exact byte count in brackets. Macs use decimal units since Mac OS X 10.6, and many Linux tools offer both. The same file of 49,664 bytes therefore reads 48.5 KB on one system and 49.7 kB on another. Convert from the byte count when you must be exact, and use this page for the decimal reading: 49.664 kB converts to 49,664 bytes. When you compare sizes from different sources, ask which convention each uses before calling one of them wrong.
Upload limits on forms and services
Web forms, email systems and APIs often state size limits in kilobytes. A form that accepts attachments of up to 250 kB allows 250,000 bytes in decimal terms, and a file of 250,000 bytes would fit. If the service counts 1,024-byte kilobytes, the limit is 256,000 bytes. When a file sits close to the limit, check its size in bytes rather than the rounded value in a file manager. A photo of 1,800 kB is 1,800,000 bytes, and shrinking it by one tenth gets it to 1,620,000 bytes. Image editors report byte counts when you export, which makes the check simple. Email programs add roughly a third to an attachment because of the encoding used to carry binary files, so a 250 kB file may count as about 333 kB against a message limit, and that is another reason to check the limit with some room to spare.
Network packets and payloads
Network engineers speak in bytes for packets. A standard Ethernet maximum transmission unit is 1,500 bytes, or 1.5 kB, and a jumbo frame of 9,000 bytes is 9 kB. A request that sends a 12 kB body needs 12,000 bytes, which splits across at least 8 packets of 1,500 bytes before headers are counted. Converting between kB and bytes lets you size buffers, set limits in a proxy configuration and read packet captures. The bytes in a capture are exact, so your kB figure from a tool can be checked against them.
Programming and configuration values
Configuration files for servers and databases take sizes in bytes or with suffixes, and the suffix convention differs among programs. One parser may read 64k as 65,536 bytes and another as 64,000. When you write a setting, check the documentation for the multiplier. If a requirement says to reject payloads above 64 kB, a decimal reading gives 64,000 bytes. Putting the number in bytes in the code removes the ambiguity, and this page makes it easy to produce the byte figure from the kB value in a specification. Add a comment that states the convention for the next person. Teams that move between a database and a web server meet the same trap, because one side may read a setting of 8k as 8,192 bytes and the other as 8,000, and a payload of 8,100 bytes then passes in one place and fails in the other.
Text and character counts
In plain ASCII text one character takes one byte, so a text file of 3.2 kB holds about 3,200 characters. Languages with accented letters or symbols use more bytes per character in UTF-8, with two bytes for many European letters and three for most common Chinese characters. A 10 kB file of Latin text with a few accents has just over 9,000 to 10,000 characters, while 10 kB of Chinese text holds about 3,300. The conversion to bytes is the first step in counting characters, and the encoding determines the rest.
Storage and the cluster effect
Files occupy whole clusters on disk, so a file of 3,200 bytes may take a 4,096-byte allocation unit, depending on the file system. The size in the file properties is the data size and the size on disk is the space reserved. Converting a size in kB to bytes gives the data size, and the allocation depends on the cluster size of the volume. A folder of 1,000 small files of 3.2 kB each holds 3,200,000 bytes of data but may use around 4,096,000 bytes on disk with 4,096-byte clusters. That difference explains why folders look larger in disk usage tools.
When a kilobyte is not 1,000 bytes
The IEC created kibibyte, KiB, for 1,024 bytes to remove the ambiguity, and the SI Brochure defines kilo as 1,000. The two sets of names now coexist, and software varies in adopting them. If a document says KB without more context, it could be either, and the difference is 24 bytes per kilobyte, which becomes 2.4 percent of the total. The page does not guess. It converts a decimal kilobyte to bytes, and a binary reading needs a kibibyte converter. Look for the unit in the documentation of the tool that produced your number.
What this page does not cover
The result is a byte count for a size you enter and nothing more. It does not know whether the data is compressed, whether it is stored with overhead or how a file system rounds sizes up. It converts the value and ignores sign, so a negative size has no meaning here. For rates over time, use a data-rate converter. For comparing sizes across a wide range of units, convert to bytes first and then to the target unit. Keep the byte count when you record sizes for later reference, because it can be converted to any unit.