UPC-E converter
The UPC-E code 425261 expands to the UPC-A 042100005264: the zeros squeezed out for small packages are put back, manufacturer 42100 and product 00526, and the shared check digit 4 is worked out for you. Compression goes the other way. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Code
- 425261
- Calculation mode
- Expand
- Direction
- expand
- Code in
- 425261
- Number system
- 0
- Upc e
- 425261
UPC-E is the six-digit zero-suppressed form of a UPC-A retail barcode, used on small packages where a full twelve-digit symbol will not fit. Warehouse systems, label printers, and product databases almost always store the expanded UPC-A form, so operators constantly need a reliable way to convert between the two without guessing which zeros were suppressed. This UPC-E converter expands a valid UPC-E code to its full UPC-A equivalent, compresses an eligible UPC-A back to UPC-E, and always computes or verifies the shared check digit so a mistyped trailing digit is caught immediately. Auto mode picks the direction from the length of the digit string, while expand and compress force a single direction for scripts and forms.
How UPC-E expansion and compression work
A standard UPC-A code is twelve digits: a number system digit (0 or 1 for retail UPC-E), a five-digit manufacturer code, a five-digit product code, and a single mod-10 check digit computed with the usual left-to-right weights of three and one. UPC-E stores only six data digits by suppressing runs of zeros that appear in certain manufacturer and product patterns defined by GS1.
Expansion rebuilds the missing zeros from the sixth data digit: when that digit is 0, 1, or 2 the manufacturer code ends with that digit plus two zeros and the product code is 00 plus the middle three data digits; when it is 3 the manufacturer ends with two zeros and the product is 000 plus two digits; when it is 4 the manufacturer ends with one zero and the product is 0000 plus one digit; when it is 5 through 9 the full five-digit manufacturer is kept and the product is 0000 plus that final digit.
The number system is prepended, the eleven-digit body is check-summed, and the result is a canonical twelve-digit UPC-A. Compression is the inverse: only codes with number system 0 or 1 and a matching zero pattern can become UPC-E; everything else is reported as not compressible. No floating point, no random sampling, and no external tables are involved—only digit branches and a single weighted sum.
What you can enter and what you get back
Send a required code field containing the barcode digits. Spaces, hyphens, underscores, and dots are stripped so values copied from packaging still parse. Seven digits are either number system plus six data digits when the first digit is 0 or 1, or six data digits plus a check digit otherwise.
Eight digits are number system, six data digits, and check digit; a wrong check digit fails validation. Eleven digits are UPC-A without a check digit—the tool computes the check and then compresses. Twelve digits are full UPC-A with verification.
Thirteen digits are accepted only when the string is an EAN-13 form of UPC-A that starts with 0.
Where a UPC-E converter earns its keep
Retail operations teams paste short package codes from small cosmetics, candy, and electronics packs into inventory tools that only accept twelve-digit UPC-A, and need expansion that never invents zeros. Print shops and private-label manufacturers design zero-suppressed symbols for tight artwork and must compress a full catalog UPC-A into UPC-E only when the GS1 pattern allows it, failing loudly otherwise so a non-eligible SKU is not printed wrong. Quality-assurance scripts round-trip thousands of codes: expand then compress and assert equality, catching off-by-one check digits before a production run.
Pair this capability with general barcode check-digit validation or barcode image generation when you also need multi-symbology proofs or printable symbols, but keep UPC-E expand and compress on its own landing page so search intent stays single-purpose for people looking for a UPC-E converter. Prefer auto for paste-driven UIs, expand for bulk short codes, and compress for catalog exports that must become UPC-E only when eligible.
What you can do with it
Small-package retail receiving
Receiving clerks expand six-digit UPC-E symbols from compact product packs into twelve-digit UPC-A for WMS scan files that only store the full form.
Label design and private-label print
Designers compress catalog UPC-A values into UPC-E when the zero pattern allows, and get a clear error when a SKU cannot legally use zero suppression.
FAQ
What does this UPC-E converter do?
It expands UPC-E (6–8 digits) to full 12-digit UPC-A and compresses eligible UPC-A (or EAN-13 with leading 0) back to UPC-E, always computing or verifying the shared check digit.
Which number systems are supported?
UPC-E zero suppression applies to number system 0 and 1 only.
How does auto mode choose expand versus compress?
Auto expands codes of 6–8 digits and compresses codes of 11–13 digits. Force expand or compress when you need a single direction regardless of length.
Why can't my UPC-A be compressed to UPC-E?
Only codes with number system 0 or 1 whose manufacturer and product parts contain one of the zero patterns defined by GS1 have a six-digit form. Any other code is reported as not compressible rather than squeezed into a wrong label.
How are the missing zeros put back?
The sixth data digit decides. With 0, 1 or 2 the manufacturer code ends in that digit plus two zeros; with 3 it ends in two zeros; with 4 in one zero; with 5 to 9 the manufacturer stays whole and the product becomes four zeros plus that digit.
Related tools
For developers — API access
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.
API endpoint
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.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/enc/upce \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"code":"425261"}'const res = await fetch("https://api.kit.forhosting.com/enc/upce", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"code": "425261"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/enc/upce",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"code": "425261"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/enc/upce", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"code":"425261"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"code":"425261"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/enc/upce", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"code": "425261"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "enc.upce",
"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.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
Codes that are not compressible, carry a wrong check digit, or use an unsupported number system are rejected with a clear invalid_input error instead of a silent wrong label. Successful API calls cost the published $0.002 base price per item.
Inputs, modes, and response fields
Six digits are treated as UPC-E data under number system 0 by default, or under number_system 0 or 1 when you set that optional field. Mode auto (the default) expands lengths up to eight and compresses lengths eleven through thirteen; mode expand and mode compress force one direction and raise invalid_input when the length does not match. Aliases text, value, input, barcode, and upc are accepted for code; op, action, and direction may stand in for mode; ns, numberSystem, and system may stand in for number_system. A successful response always includes mode, direction, code_in, number_system, upc_e (six data digits), upc_e_full (eight digits with system and check), upc_a (twelve digits), manufacturer_code, product_code, check_digit, and valid set to true. Missing, empty, non-numeric, over-long, non-compressible, or check-digit-mismatched inputs fail with invalid_input and are not billed on the prepaid path. Pricing for successful calls is the published base of $0.002 per item.
Where a UPC-E converter earns its keep
E-commerce listings often show a six-digit style code from a supplier spreadsheet while the marketplace requires GTIN-12; converting through this endpoint keeps listing automation deterministic. Every successful call costs the published $0.002 base price with no model tokens and no outbound network; failed validation does not consume balance.
Integration use cases
QA fixtures and marketplace feeds
Pipelines round-trip expand and compress for golden tests, and convert supplier short codes into GTIN-12 for marketplace listing uploads without manual zero guessing.
Technical questions
What if my UPC-A is not compressible?
If the manufacturer and product digits do not match a GS1 zero-suppression pattern, the request fails with invalid_input explaining that the code is not compressible to UPC-E.
What does the UPC-E converter cost?
The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.