Convert MiB to kB

MiB
1048.576kB

1 MiB = 1048.576 kB

One mebibyte is 1,048.576 kilobytes, not a thousand, because a MiB is 1,048,576 bytes and a kB is 1,000. A bundle a build tool calls 1.5 MiB is 1,572.9 kB against a budget written in decimal kilobytes, which is 4.9 percent more than the round conversion suggests.

  • Where it runs In your browser. The number you type is never part of a request.
  • Exact by definition 1 MiB is exactly 1048.576 kB — 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.

Mebibyte to Kilobyte in practice

  • 703 MiB is 737100 kB

    — a data CD, which is 700 MB on the label.

  • 8 MiB is 8389 kB

    — a chunk of memory a program might allocate.

  • 0.4768 MiB is 500 kB

    — a lean web page.

  • 0.06104 MiB is 64 kB

    — a long email.

Mebibyte to Kilobyte 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.
MiBkB
11048.576
22097.152
55242.88
1010485.76
5052428.8
100104857.6
500524288
10001048576

Mebibyte and Kilobyte

A mebibyte is 1,024 kibibytes, or 1,048,576 bytes. Linux tools and memory sizes generally mean this even when they print "MB".

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.

What it costs to round the factor

The factor is 1048.576, and almost nobody carries that around. Rounded to 1050 it is off by 0.14 % — which stays invisible on small numbers and turns into a whole unit somewhere around 1,000 MiB.

That is the number worth knowing before you round: not the error itself, but where it stops being ignorable. Below that point the shorter factor is the sensible one; above it, use the field above, which never rounds until it prints.

MiB is the binary one

One MiB is 1,024 of the unit below it; one MB is 1,000. On this page that is the difference between 1048.576 kB and 1000 kB — 4.9 % — and the gap grows at every step up the scale, which is why it is a rounding error on a photograph and a visible chunk of a hard disk.

This is the whole of the missing-storage mystery, and on this page it is worth 4.9 %. A drive sold in MB holds exactly what the label says; Windows divides by 1,024 instead of 1,000, keeps the decimal name, and reports 1000 kB where the box said 1048.576. macOS has counted these in the decimal units since 10.6, which is why the same drive can look two sizes on two machines — nothing is missing and nobody is rounding, the same bytes have two names.

A MiB is 1,048.576 kB, and budgets are written in kB

Build tooling counts in binary units because it is describing what a filesystem holds, and a bundler that prints KiB and MiB has told you so honestly. Performance budgets are written in decimal kilobytes because they describe bytes crossing a network, where powers of ten have been the convention since long before anyone was shipping a megabyte of JavaScript. Both are internally consistent and they do not agree.

The conversion is a multiplication by 1,048.576. A bundle reported as 1.5 MiB is 1,572.9 kB, not 1,536 and not 1,500. Against a 1,500 kB budget it is over by nearly five percent, and the round conversion in somebody's head is exactly what hides that — 1.5 MiB reads as "about one and a half megabytes", which sounds like it fits.

The gap between what the bundler weighs and what the user waits for

Before worrying about 4.9 percent, check that the number is measuring the right thing at all. A build tool reports the size of the file it wrote; a user waits for the compressed bytes that crossed the connection. Text assets typically compress to somewhere between a fifth and a quarter of their raw size, so a 1.5 MiB bundle may be 350 kB on the wire, and a budget written against the raw figure is off by a factor, not a percentage.

That does not make the unit conversion unnecessary — the compressed figure has to be stated in some unit too, and the same 2.4 percent applies to it. It makes the order of operations clear: establish which stage of the pipeline the number describes, then convert its unit. Getting the second right and the first wrong produces a precisely stated number about the wrong quantity.

Why a systematic 2.4 percent is worse than a random one

A random measurement error averages out over enough assets; a unit error does not, because it is the same multiplication every time and always in the same direction. Every asset appears slightly smaller than it is, the total appears smaller than it is, and every comparison against the budget is slightly optimistic. Nothing in the report looks wrong, and the reconciliation only fails against field data collected by something that measured bytes.

The compounding is what turns it from pedantry into a real gap. A page assembled from twenty assets, each converted with the round factor, is short by 2.4 percent overall — perhaps thirty or forty kilobytes on a moderate page. That is roughly the size of an entire small library, which is the sort of thing teams spend an afternoon removing. The comparison is worth making explicitly when somebody proposes tightening a budget: a correct conversion recovers the same number of kilobytes as a real optimisation, and it takes a line of arithmetic rather than a refactor.

Reading a build report and a network panel side by side

The two will rarely show the same number for the same asset, and the reasons stack. The build report shows raw bytes in binary units; the network panel shows transferred bytes, compressed, in decimal units, and it may or may not include response headers. Any one of those differences is enough to make the figures disagree by tens of percent, and all three together make a direct comparison meaningless.

The way to compare them is to reduce both to a byte count of the same quantity. Take the compressed artefact, read its exact size, and compare that against the transferred size the browser reports; the residual should be small and attributable to protocol overhead. Once those agree, the friendly units on either side can be whatever each tool prefers, because you have a number underneath that both are derived from.

Where a kilobyte or two is genuinely worth chasing

Not everywhere. The bytes that matter most are the ones blocking the first render — the critical CSS, the scripts that must execute before content appears, the fonts that hold text back. Fifty kilobytes there is worth more than five hundred in something loaded lazily after the page is usable, and a budget that treats all bytes as equal will optimise the wrong ones with great precision.

This is also where the unit question stops being academic, because critical-path budgets are the tight ones. A target of 150 kB of blocking JavaScript has almost no headroom; converting a 0.15 MiB figure as if it were 150 kB rather than 157.3 kB has spent five percent of the budget on arithmetic. On a lazily loaded chunk with a budget ten times larger, the same error is invisible and nobody should spend time on it.

Writing an asset budget that survives being inherited

A budget is a number somebody else will apply months later without the context you had. That means it needs three things stated with it: the quantity, the unit including which system, and the stage of the pipeline — compressed or raw, per asset or per page. Any of the three left implicit will be filled in by assumption, and the assumption will differ from yours often enough to matter.

The mechanical version is to express the budget in bytes in whatever configuration enforces it, and let the human-readable figure appear in the documentation beside it. Bytes cannot be misread, they compare directly against every tool's underlying measurement, and they remove the need for anyone downstream to know whether the person who set the budget meant 1,000 or 1,024.

Converting a MiB figure in your head, and when not to

Multiply by a thousand and add five percent. 2.4 MiB is roughly 2,400 plus 120, so about 2,520 kB against 2,516.6 exactly. That is accurate enough for a conversation and for spotting an order-of-magnitude mistake, which is what mental arithmetic is for. It is not accurate enough for anything that gets written into a configuration file and enforced.

The threshold for doing it properly is whether the number will be compared against another number. A figure quoted in a discussion can be approximate; a figure that a tool will check, or that will sit in a table next to a measurement from somewhere else, has to be the exact multiplication, because a discrepancy of a few kilobytes in a comparison is indistinguishable from a real regression. That is the practical cost of the shortcut: not a wrong number, but an hour spent investigating a change that never happened.

Convert MiB to kB: common questions

How many kB are in a MiB?

1,048.576, exactly. A mebibyte is 1,048,576 bytes and a kilobyte is 1,000. The intuitive answer of 1,024 is the KiB in a MiB, and using it here understates the file by 2.4 percent, which is small enough to survive a review and large enough to matter against a tight budget.

Why does my build tool say KiB when the budget says kB?

Because they are measuring different things for different reasons. A bundler reports what the file occupies and uses the binary units the filesystem counts in; a performance budget describes what goes over the network, where decimal units are the convention. Neither is wrong, and the 2.4 percent between them has to be converted rather than ignored.

Which size should a budget be written against — raw or compressed?

Compressed, because that is what the network transfers, and the gap between the two is far larger than any unit question: text assets commonly compress to a quarter or a fifth of their raw size. A budget written against raw bundle output is measuring a number no user ever waits for.

Does 4.9 percent of page weight actually change anything?

On its own, rarely. It matters because budgets are set near the point where they start to bind, so a systematic understatement moves the whole assessment: every asset appears to fit, the total appears to fit, and the measurement taken in the field does not agree. The problem is not the fifty kilobytes, it is that the report and reality drift apart in one direction.

Is transfer size the same as the file size on disk?

Usually not, and the difference is bigger than the units. What crosses the network is compressed and carries protocol overhead; what sits on disk is the raw asset. A report comparing one to the other will show a discrepancy that has nothing to do with kilobytes and everything to do with which stage of the pipeline was measured.

What is the safest way to write a budget so it is not misread?

State the number in bytes alongside the friendly unit, and say whether it refers to compressed or uncompressed bytes. Those two sentences remove both ambiguities at once, and they are the two that get re-derived incorrectly every time a budget is inherited by somebody who did not write it.

Going the other way: Kilobyte to Mebibyte

One kB is 0.000953674 MiB. 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.