Symbologies

UPC-A barcode generator

A 12-digit GTIN with a valid check digit becomes a UPC-A image address.

A glass jar with a green lid

A UPC-A is the retail barcode for a 12-digit GTIN, the code on most products sold in the United States and Canada. Beepable draws one only when the check digit matches. Twelve digits are not an EAN-13 with a missing zero, and Beepable will not add a zero for you. The most common problem is a leading zero that a spreadsheet removed.

How do I generate a UPC-A?

  1. Copy all 12 digits, including a leading zero if the code has one. 036000291452 is a UPC-A.
  2. Format the column as text before you paste, so the zero stays.
  3. Put the code in A2, your picture key in Z1, and this formula in B2:
    =IMAGE("https://beepable.app/i/upca.png?v="&ENCODEURL(A2)&"&k="&$Z$1)
  4. To print the digits under the bars, use:
    =IMAGE("https://beepable.app/i/upca.png?v="&ENCODEURL(A2)&"&hrt=1&k="&$Z$1)
  5. Fill the formula down, then scan one barcode and check that the scanner returns 12 digits, not 11.

Where do people lose the first digit?

A number-formatted cell turns 036000291452 into 36000291452, which is 11 digits. Beepable then refuses it, because a retail barcode needs 8, 12, 13, or 14 digits. The same happens in an export to CSV from a number column, and in a JSON request that sends the code as a number.

WhereHow to keep the zero
Excel or Google SheetsFormat the column as text before you paste.
A CSV exportExport from a text column, then check the file in a text editor.
A JSON batchSend "036000291452" in quotes.
A PIMStore GTINs as text, and check the length is 12 before you send.

After a CSV upload, check that each image_url contains v=036000291452 and not v=36000291452.

What if the cell shows a card?

The cell showsWhyWhat to do
A retail barcode needs 8, 12, 13, or 14 digits. This has 11. Name code128 to encode it anyway.The cell has too few or too many digits, often because a leading zero was dropped.Format the column as text and type the code again.
Check digit is invalid for this GTIN. Name code128 to encode it anyway.The last digit does not match the other digits.Copy the code again from its source. Beepable never makes up a check digit.
UPC-A needs 12 digits. This has 13.The formula says upca, but the code is an EAN-13.Use auto, or the EAN-13 guide.
This barcode needs an API key.Z1 is empty, or the formula does not point at it.Paste your picture key in Z1, and keep both dollar signs in $Z$1.

A card is never a barcode. Fix the cell and recalculate.

What about a wrong check digit?

The check digit is the last digit, tested with weights of 3 and 1 from the right, the same way as an EAN-13. The card suggests code128 because Code 128 can draw any characters, but a Code 128 of those digits is not a UPC-A, and a retail till will not treat it as your product. Fix the digit at its source instead.

What about Sunrise 2027?

Keep the UPC-A and add a QR code of a GS1 Digital Link for the same product. The link pads the 12 digits to 14 with leading zeros, and the check digit stays the same. Build the pair on the Digital Link page, and place it as the dual-coding guide describes.

Frequently asked questions

How many digits does UPC-A need?

12 digits, including a valid check digit. 036000291452 is a UPC-A. Keep the leading zero.

Is UPC-A the same as EAN-13?

No. UPC-A has 12 digits and EAN-13 has 13. With auto, Beepable picks the type from the length.

Why did my code become 11 digits?

A number-formatted cell or a JSON number dropped the leading zero. Format the column as text, send JSON strings, and check that the address still has all 12 digits.

Can I print the digits under the bars?

Yes. Add &hrt=1 to the address before &k=.

What if the check digit is wrong?

There is no barcode. The cell shows: Check digit is invalid for this GTIN. Name code128 to encode it anyway.

Draw your first barcode

Create a free account