Kubernetes Resource Quantity Converter

Turn Kubernetes CPU and memory quantities such as 250m, 1.5, 64Mi or 129e6 into cores and bytes, and add a list of container requests into one exact total.

CPU is counted in cores, memory in bytes.
One quantity per line. Add name = in front to keep track of which container it came from; lines starting with # are ignored.

A Kubernetes quantity is a fixed-point number with an optional suffix: m is one thousandth, k to E are powers of ten, and Ki to Ei are powers of 1024. So 250m and 0.25 are the same amount of CPU, and 1.5Gi is 1,610,612,736 bytes. Every figure here is computed exactly in whole units — no floating point — and the total is the sum of the lines as Kubernetes would store them, so a quantity with more than three decimal places is rounded up to the nearest 0.001 first. Nothing is sent or stored.