ForHosting KIT · Unit converters

Convert data storage units

One KB is 1,000 bytes but one KiB is 1,024, and the gap grows with every step up to TB. Pick the unit you have and the one you need, and the exact byte count is shown along the way. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Value
1.5
From
GB
To
MiB
You get
Result
1,430.5114746094
Bytes
1,500,000,000

Convert a data size between bytes and the most common decimal or binary storage units. Enter a non-negative value, choose its source unit, and select the target unit. Decimal KB, MB, GB, and TB use powers of 1000, while binary KiB, MiB, GiB, and TiB use powers of 1024. The result also includes the intermediate byte count, making each conversion easy to inspect, reproduce, and use in tests or automated workflows.

Choose the correct decimal or binary unit

Storage labels look similar, but their definitions are not interchangeable. Decimal units use powers of one thousand: one KB is 1,000 bytes, one MB is 1,000,000 bytes, one GB is 1,000,000,000 bytes, and one TB is 1,000,000,000,000 bytes. Binary units use powers of 1,024: one KiB is 1,024 bytes, one MiB is 1,048,576 bytes, one GiB is 1,073,741,824 bytes, and one TiB is 1,099,511,627,776 bytes.

Use B or bytes when the value is already expressed as an exact byte count. Use KB through TB when a disk manufacturer, network plan, cloud product, or file specification explicitly follows SI decimal notation. Use KiB through TiB when software reports IEC binary units or when a memory calculation is based on powers of two.

The distinction becomes more noticeable at larger scales, so copying a value while changing only its label can create a substantial error. This converter keeps every symbol explicit and never silently guesses that MB means MiB. Select the symbol that matches the original measurement, then select the unit needed by the receiving document, application, or comparison.

Unsupported spellings and units produce an error instead of an approximate or misleading result.

Understand how the conversion is calculated

Every conversion follows the same transparent two-step calculation. First, the entered value is multiplied by the fixed byte factor for the source unit. Second, that byte total is divided by the fixed byte factor for the target unit.

For example, converting 1.5 GB to MiB first produces 1,500,000,000 bytes, then divides that amount by 1,048,576. Using bytes as a common bridge avoids a growing collection of special-case formulas and ensures that a conversion from GB to MiB follows exactly the same definitions as a conversion from GB to bytes. Calculations use a fixed table and stable numeric normalization.

There are no network requests, current dates, random values, vendor-specific lookup tables, or stored state.

Apply conversions without losing the original meaning

A converted figure is most useful when its source convention remains clear. When comparing an advertised drive capacity with an operating system display, retain both the original decimal value and the binary conversion so readers can see why the numbers differ. When normalizing upload limits, cache sizes, backup quotas, or log rotation thresholds, store the canonical unit beside the numeric value rather than relying on a label such as megabytes that different systems may interpret differently.

The returned byte field can serve as a neutral interchange value between services, while the result field provides the requested presentation unit. For documentation, include enough meaningful digits for the decision being made, but avoid implying that a rounded display is more precise than the source measurement.

Compare advertised and displayed capacity

Convert decimal GB or TB figures to binary GiB or TiB before explaining differences in disk and system reports.

Normalize application limits

Turn file, cache, backup, or upload limits into bytes or a canonical unit shared by several services.

Is one KB equal to 1000 or 1024 bytes?

KB is exactly 1000 bytes here. Use KiB for exactly 1024 bytes.

Which units are supported?

B or bytes, decimal KB, MB, GB, TB, and binary KiB, MiB, GiB, TiB are supported.

Does the result account for filesystem overhead?

No. It performs unit arithmetic only and does not estimate formatting, metadata, redundancy, compression, or reserved capacity.

How many MiB is 1.5 GB?

1430.51147460938 MiB. The value is first turned into 1,500,000,000 bytes, then divided by 1,048,576, the number of bytes in one MiB. Every conversion follows those same two steps.

Why does my new drive show less space than the box says?

Because drive makers usually count in decimal units while many systems display binary ones. One GB is 1,000,000,000 bytes and one GiB is 1,073,741,824 bytes, so the same disk shows a smaller number in GiB. Keep both values when comparing.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/misc2/data-storage-unit-convert

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/misc2/data-storage-unit-convert \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"value":1.5,"from":"GB","to":"MiB"}'
{
  "value": 1.5,
  "from": "GB",
  "to": "MiB"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "misc2.data_storage_unit_convert",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Understand how the conversion is calculated

The response contains the normalized source and target symbols, the original value, the intermediate byte amount, and the converted result. This makes the arithmetic auditable and convenient for software tests. Inputs must be finite, non-negative JSON numbers; missing values, text in place of a number, negative sizes, Infinity, and unsupported unit names are rejected.

Apply conversions without losing the original meaning

This capability performs one conversion per request and charges $0.002 when called through the API; interactive browser use can support quick checks before automation. It does not estimate filesystem overhead, compression, transfer time, formatted disk capacity, redundancy, reserved blocks, or usable space. Those depend on additional system details. It only converts the stated magnitude according to exact SI and IEC factors. That narrow behavior makes it reliable for spreadsheets, support answers, procurement comparisons, configuration migrations, and code that needs a deterministic storage-unit conversion without maintaining its own factor table.

Create deterministic test fixtures

Produce repeatable expected values for parsers, formatters, billing rules, and storage configuration tests.

What happens with an unsupported unit?

The request returns an invalid_input error and lists the accepted unit symbols.

Can I convert a fractional size?

Yes. Any finite, non-negative JSON number is accepted, including fractional decimal values.

Read the full KIT documentation →