Skip to content

Menu

Kubernetes Resource Quantity Converter

Convert Kubernetes CPU millicores and memory quantities (Ki, Mi, Gi, k, M, G), see the canonical form, and check that requests do not exceed limits.

Runs entirely in your browserDevOpsFree, no sign-up
Loading tool

01What is Kubernetes Resource Quantity Converter?

Kubernetes writes CPU and memory amounts as quantities: a number followed by an optional suffix. The Kubernetes quantity reference and the apimachinery source define the suffixes. Binary suffixes Ki, Mi, Gi, Ti, Pi and Ei are powers of 1024. Decimal suffixes k, M, G, T, P and E are powers of 1000, and n, u and m are billionths, millionths and thousandths. You can also use an exponent, as in 129e6. Type a CPU request and limit and a memory request and limit. Each value is parsed with exact integer math, not floating point, so large and tiny values keep their precision. For CPU you see cores and millicores. For memory you see exact bytes plus KiB, MiB, GiB, kB, MB and GB rounded to three decimals. Each value also shows its canonical form, the way Kubernetes writes it back: 1.5 becomes 1500m and 1.5Gi becomes 1536Mi. The tool flags the mistakes the Kubernetes docs warn about. The resource management guide says CPU precision finer than 1m is not allowed, so a value such as 0.0005 is marked as an error. Negative values are errors too. A lowercase m on memory means millibytes, so 400m is 0.4 bytes, and you probably meant 400Mi or 400M. A memory value that is not a whole number of bytes gets a warning. Binary suffixes on CPU get a warning because they are unusual. Suffixes Kubernetes does not accept, such as MB or GiB, are rejected with a hint, and so is a space between the number and the suffix. The request and limit check compares each pair exactly. A request greater than its limit is an error, which the API server rejects. A request below the limit shows as a percentage. If you set only a limit, the tool notes that Kubernetes copies the limit as the request when no default request applies. If you set only a request, it notes that the container can use more when the node has room. Note that 1Gi is larger than 1000M, a common surprise. Here is a worked example. Set the CPU request to 250m and the limit to 1. The tool shows 0.25 cores and reports the request as 25.0% of the limit. Set the memory request to 400Mi and the limit to 1Gi. The request shows as 419430400 bytes, 400.000 MiB and 419.430 MB, and the pair check reports 39.1% of the limit. You can copy a resources block in YAML with the canonical values. Limits: the tool does not know your LimitRange, ResourceQuota or node sizes, and it covers CPU and memory only, not ephemeral storage or extended resources. Everything runs in your browser.

Platform engineers, SREs and developers writing or reviewing Kubernetes pod and deployment manifests. The tool runs entirely in your browser, so your data never leaves your device.

02How to use Kubernetes Resource Quantity Converter

  1. Enter a CPU request and limit, such as 250m and 1.
  2. Enter a memory request and limit, such as 256Mi and 512Mi.
  3. Read the conversions, canonical form and any warnings under each value.
  4. Check the request and limit results for each resource.
  5. Copy the canonical YAML resources block into your manifest.

03Worked examples

Input: CPU 250m / 1, memory 256Mi / 512Mi
Result: resources: requests: cpu: 250m memory: 256Mi limits: cpu: "1" memory: 512Mi CPU: request is 25% of the limit. Memory: request is 50% of the limit. 256Mi = 268435456 bytes = 268.435 MB
A typical web app sizing. Plain numbers like 1 are quoted in the YAML so they stay strings.
Input: CPU 0.5 / 500m, memory 1Gi / 1000M
Result: CPU 0.5 canonical: 500m CPU: request equals limit. Memory: request 1Gi is greater than limit 1000M. The API server rejects this.
1Gi is 1073741824 bytes but 1000M is 1000000000 bytes, so mixing binary and decimal suffixes puts the request over the limit.
Input: CPU request 0.0005, memory request 400m, memory limit 1.5Gi
Result: 0.0005: CPU precision finer than 1m (0.001 CPU) is not allowed. 400m: "m" means millibytes, so 400m is 0.4 bytes. Did you mean 400Mi or 400M? 1.5Gi canonical: 1536Mi
Two common suffix mistakes. Lowercase m on memory is valid syntax but almost never what you meant.
Input: CPU 2 / 4000m, memory 1e9 / 2G
Result: 4000m canonical: 4 1e9 canonical: 1G (953.674 MiB) 2G = 1907.349 MiB CPU: request is 50% of the limit. Memory: request is 50% of the limit.
Exponent notation and decimal suffixes are normalised to their shortest canonical form.
Input: CPU request 100m, memory request 128Mi, no limits
Result: CPU: no limit set. The container can use more than its request when the node has capacity. Memory: no limit set. The container can use more than its request when the node has capacity.
Requests without limits are allowed. The tool reports it as information rather than an error.

04Common use cases

  • Checking that a pod's memory request is not higher than its limit before applying a manifest
  • Converting a memory limit from Mi to bytes to compare it with metrics or OOM messages
  • Catching a lowercase m on a memory value before it requests a fraction of a byte
  • Translating fractional CPU like 0.25 into millicores for consistent manifests
  • Comparing a binary value such as 1Gi with a decimal one such as 1000M

05Tips

  • Use millicores below one CPU. The docs note that 0.5m is easier to spot as invalid than 0.0005.
  • Use Mi and Gi for memory unless you really mean powers of 1000. 512Mi is 536870912 bytes, while 512M is 512000000.
  • Suffixes are case sensitive. M is mega, m is milli, and Ki is valid while ki is not.
  • Leaving out a memory limit means the container has no upper bound from its spec, though a namespace LimitRange can set a default.

06Related concepts

resource requests, resource limits, millicores, mebibyte, resource.Quantity, LimitRange.

Frequently Asked Questions

What is Kubernetes Resource Quantity Converter?

Kubernetes Resource Quantity Converter is a free, browser-based developer tool on AIDToolStack. Convert Kubernetes CPU millicores and memory quantities (Ki, Mi, Gi, k, M, G), see the canonical form, and check that requests do not exceed limits. It requires no installation or sign-up and works entirely in your browser.

Is Kubernetes Resource Quantity Converter free to use?

Yes. No sign-up, no fees and no usage cap.

Does Kubernetes Resource Quantity Converter store my data?

No. It runs in your browser; nothing is uploaded.

Cheat sheet

Related Tools

Reviews and commentsShow

Reviews

Sign in to leave a review.

Loading reviews…

Comments

Sign in to leave a comment.

Loading comments…

What changed in AI dev tools, once a month

Renames, shutdowns, pricing changes and new MCP setups, each with a source.

Subscribe