Convert kB to B

kB
1000B

1 kB = 1000 B

A kilobyte is 1,000 bytes in decimal units, so converting kB to bytes is three places of the decimal point. At this scale the rival binary kibibyte is only 2.4 per cent away and rarely changes a decision — while kB against kb, bytes against bits, is a factor of eight and changes every decision it touches.

  • Where it runs In your browser. The number you type is never part of a request.
  • Exact by definition 1 kB is exactly 1000 B — a definition, not a rounded factor.
  • Answers as you type No button, no wait. The worked answer is already on the page before any script runs.

Kilobyte to Byte in practice

  • 500 kB is 500000 B

    — a lean web page.

  • 64 kB is 64000 B

    — a long email.

  • 5000 kB is 5000000 B

    — a photograph from a phone.

  • 1.024 kB is 1024 B

    — a kibibyte, which is where the confusion starts.

Kilobyte to Byte at a glance

Every figure here is computed from the same definition the calculator uses, so the table cannot drift away from the answer above it.
kBB
11000
22000
55000
1010000
5050000
100100000
500500000
10001000000

Kilobyte and Byte

A kilobyte is 1,000 bytes when a standards body defines it and 1,024 when an operating system does. This page uses 1,000; the kibibyte is the unit that means 1,024.

A byte is eight bits, though that was not always fixed — early machines used six, seven or nine. The eight-bit byte won because it holds one character of text and divides neatly in half.

This one is a decimal point, not a calculation

Going from kilobytes to bytes moves the decimal point 3 places to the right and changes nothing else. There is no factor to remember and no rounding to decide: the digits stay in the same order and only their position changes.

1,234 kB is 1234000 B — same digits, moved along. That is worth knowing because it is the one kind of conversion you can check at a glance: if the digits of the answer are not the digits you started with, something other than the conversion has happened to them.

Three places of the decimal point, and a 2.4 per cent argument

Decimal makes this the simplest conversion in the data units: kilo is 10³, so a kilobyte is 1,000 bytes and 47 kB is 47,000. That is the SI meaning of the prefix, the meaning used by every network standard, and the meaning behind the capacities storage is sold at. The digits stay put and only the decimal point moves.

The binary reading gives 1,024 bytes, a unit properly called the kibibyte and written KiB. The two are 2.4 per cent apart, which is the narrowest gap between any decimal and binary pair — it widens to 4.9 per cent at mega, 7.4 at giga and 10 at tera. That narrowness is why the ambiguity has survived here longest: at kilobyte scale the difference is almost never large enough for anyone to notice they were using the wrong one.

kB against kb is where the real error lives

The case of a single letter is worth eight times more than the entire 1,000-against-1,024 question. B is a byte, b is a bit, and there are eight bits in a byte, so 1 kB is 8 kb and 100 kB is 800 kb. Files, memory and storage are counted in bytes; line speeds, bitrates and anything measured per second on a wire are counted in bits, by a convention that goes back to serial links and has never changed.

The practical consequence is that a figure with a per-second attached to it needs dividing by eight before it can be compared with a file. A 256 kbit/s audio stream is 32 kB every second, which is 115 MB an hour. A 64 kbit/s link moves 8 kB a second. Reading either as bytes overstates the throughput eightfold and produces plans that cannot work.

Performance budgets are written in kB and measured in bytes

The one place most people meet this conversion daily is a web performance budget: a limit of so many kilobytes of JavaScript, CSS or total page weight, checked against a transfer size a tool reports in bytes. Those budgets are decimal, because they are round numbers chosen by people and compared against network measurements that use powers of ten. A 170 kB script budget is 170,000 bytes.

What matters more than the divisor is which size is being measured. The number that counts against a budget is the compressed transfer size, because that is what crosses the network, and for JavaScript that is typically a third of the file on disk. A bundle of 520,000 bytes uncompressed can arrive as 160,000 bytes of brotli and pass a 170 kB budget comfortably — so a comparison between an uncompressed figure and a budget is not a comparison at all.

The boundaries small numbers actually live on

Below a megabyte, the numbers that shape everything are powers of two rather than powers of ten. A disk sector is 512 bytes or 4,096; a memory page is 4,096 on nearly every current system; a filesystem block is usually 4,096; a TCP segment on ordinary Ethernet carries up to about 1,460 bytes of payload. None of those is a round number of kilobytes in either system, and all of them decide behaviour that unit conversion does not.

That is why a 1 kB file occupies 4,096 bytes and a 5 kB file occupies 8,192. It is also why buffer sizes are chosen as 4,096, 8,192 or 65,536 rather than 4,000 or 50,000: a buffer aligned to a page or a block moves in whole units and one that is not straddles two. At this scale the useful instinct is not "which kilobyte" but "which boundary is this number near".

Byte limits count bytes, not characters

A limit expressed in kilobytes on text is a limit in bytes, and UTF-8 does not spend one byte per character. Plain ASCII does cost one, but accented Latin letters and Greek or Cyrillic cost two, most CJK characters cost three, and emoji and many symbols cost four. So a 2 kB field holds 2,000 English characters, around 1,900 characters of French with accents kept, and 500 emoji.

The distinction shows up wherever a limit is enforced somewhere other than where it was declared. A database column may be declared in characters while an index, a protocol field or a cookie limit further along the path counts bytes, and a value that fits by one measure is rejected by the other. Where a limit is being checked against a measurement in bytes, the safe assumption is that everything downstream counts bytes too.

What a kilobyte of anything looks like

A kilobyte is roughly 1,000 characters of plain English, which is a long paragraph or a short email body. A minimal HTTP request with its headers is one to two kilobytes before cookies, and cookies push it further; a small JSON API response is a few kilobytes; a web font subset for one weight is 15 to 30 kB; a favicon is a few kilobytes; a typical CSS file after compression is tens of kilobytes.

Holding that scale in mind is what the conversion is actually for. When a tool reports 47,318 bytes, calling it 47 kB immediately places it — larger than a request, smaller than a font file, a plausible size for a compressed stylesheet. The precise divisor is irrelevant to that judgement, which is the honest reason the kilobyte ambiguity has never been worth arguing about at this end of the scale.

Checking which kilobyte a tool meant

One test settles it. Take a value that is exactly 1,024 bytes: a tool reporting it as 1.02 kB is decimal, and one reporting it as 1.0 KB is counting in kibibytes whatever letters it prints. On Unix, du and df are binary by default and accept a flag for powers of ten; browser network panels and most web performance tooling report decimal, matching the way transfer rates are quoted.

If the two figures you are comparing differ by about 2.4 per cent and no other explanation fits, the divisor is the explanation. If they differ by a factor of four on a small file, it is block allocation. If they differ by roughly three to one, one of them is compressed and the other is not. Those three checks account for nearly every disagreement at kilobyte scale, and they are worth running in that order.

Convert kB to B: common questions

Is a kilobyte 1,000 or 1,024 bytes?

1,000 in the decimal system this page uses, which is the SI meaning of the prefix and the one used by standards bodies, networking and storage manufacturers. 1,024 bytes is a kibibyte, KiB, a unit named in 1998 for exactly this purpose. The gap at this scale is 2.4 per cent, the smallest anywhere in the data units, which is why the ambiguity survived so long here.

What is the difference between kB and kb?

A factor of eight. The upper-case B is a byte and the lower-case b is a bit, so 1 kB is 8 kb. Storage and file sizes are quoted in bytes, while connection speeds and bitrates are quoted in bits per second, and mixing them up is an error an order of magnitude larger than any decimal-against-binary question.

Why does a 1 kB file take 4,096 bytes on disk?

Because filesystems allocate whole blocks, and 4,096 bytes is the common default on both ext4 and NTFS. A file of any length from 1 to 4,096 bytes occupies one block. That rounding matters far more than the unit question at this scale: it is a factor of four on a 1 kB file, against 2.4 per cent for the kilobyte-kibibyte difference.

Is a performance budget in kB decimal?

Almost always, because budgets are set by people writing round numbers and are compared against transfer sizes that networking measures decimally. A 170 kB budget means 170,000 bytes. Some measurement tools report in KiB, so check one known value before trusting a comparison — the 2.4 per cent difference is small, but a budget is usually being missed by less than that.

Does a 255-character field hold 255 bytes?

Only for text that is one byte per character. A column declared in characters holds 255 of them, which in UTF-8 can be anywhere from 255 to over 1,000 bytes; a column or protocol limit declared in bytes holds 255 bytes, which may be fewer than 255 characters. Accented letters cost two bytes each in UTF-8 and most emoji cost four.

How much does a small request actually cost on the network?

More than its payload. Ethernet carries a maximum of about 1,500 bytes per frame, and each frame adds its own headers, so a 2 kB payload spans two frames before TCP and TLS overhead is counted. For requests of a kilobyte or two, the fixed costs dominate — which is why merging several small requests usually beats shrinking any one of them.

Going the other way: Byte to Kilobyte

One B is 0.001 kB. It is the same relationship read backwards, so an answer from one page put through the other has to come back to where it started.

Where these figures come from

The claims this page makes about data units are checkable, and these are the documents that settle them.

How this page works

The factor is a constant in the page and the arithmetic is four operations, so nothing is sent anywhere and nothing needs to be. The number you type never leaves the browser — there is no request for it to travel in.