Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
The UPC-A barcode symbology is used for identification of retail goods at point of sale inside of the US. It usually carries a GTIN-12.
Also known as: UPC, UCC-12, Universal Product Code.
- UPC-A+2 is an extension of UPC-A that includes a two-digit add-on.
- UPC-A+5 is an extension of UPC-A that includes a five-digit add-on.
- UPC-E is a barcode symbology derived from UPC-A that is designed for small packaging.
- UPC-A Composite is a variant of UPC-A that should be used when a CC-A or CC-B GS1 composite 2D component is required.
- A UPC-A symbol can be converted to an EAN-13 symbol by prefixing the GTIN-12 with 0 to make the equivalent GTIN-13.
Standards: ISO/IEC 15420, BS EN 797, GS1 General Specifications.
Data and Options
- The data field for a UPC-A may contain eleven or twelve digits, optionally followed by a space then two or five digits if an EAN-2 or EAN-5 add-on is required.
- Alternatively, the data field may contain seven or eight digits of a UPC-E to produce the equivalent UPC-A symbol.
- If eleven digits of primary data are supplied then the check digit is calculated automatically. Otherwise the provided check digit will be verified.
- The includetext option should normally be supplied.
Identical symbols, input provided with and without a check digit:
Data: 788581014974 Options: includetext Encoder: upca
Data: 78858101497 Options: includetext Encoder: upca
A symbol that includes a five-digit add-on:
Data: 788581014974 54499 Options: includetext guardwhitespace Encoder: upca