Kubernetes CPU and Memory Quantity Converter (250m, 1.5Gi)

Parses Kubernetes resource quantities exactly (no floating point) and shows cores, millicores, bytes, MiB, GiB and the canonical form.

Use the tool

Why this tool exists

Resource requests and limits mix suffixes: m for thousandths, k and Ki, M and Mi, G and Gi. Mixing 1G and 1Gi is a common source of wrong limits, because one is 10^9 and the other 2^30.

Paste values, one per line. CPU reads the number as cores. Memory reads it as bytes. Parsing uses integer arithmetic, so there is no rounding error, and amounts below 1m round up as Kubernetes does.

How to use it

  1. Paste quantities, one per line.
  2. Read the cores and millicores for CPU values.
  3. Read bytes, MiB and GiB for memory values.
  4. Use the canonical column to see how Kubernetes would print it.

Frequently asked questions

What is the difference between G and Gi?

G is 1,000,000,000 bytes. Gi is 1,073,741,824 bytes. The binary suffix is about 7 percent larger.

What does the m suffix mean?

Thousandths. 250m is 0.25 of a core, or 0.25 of a byte for memory.

What is canonical form?

The largest suffix that keeps the value a whole number. 1.5Gi becomes 1536Mi and 1.5 becomes 1500m.

Does it size my nodes?

No. Use the Kubernetes resource and node sizing calculator for that.