Step-by-step conversion guide

How to convert a UPC to a GS1 QR code

Turn the GTIN already carried by a UPC-A or EAN barcode into a standards-based QR Code with GS1 Digital Link.

Technical guide Updated September 18, 2026 7 min read

Convert a UPC or EAN to a GS1 QR code step by step: validate the check digit, pad the GTIN to 14 digits, build a GS1 Digital Link URI and generate the QR Code.

Before you convert: confirm what the number is

The digits printed below a UPC-A symbol are a GTIN-12. An EAN-13 carries a GTIN-13, and EAN-8 carries a GTIN-8. These can all be represented in a 14-digit field by adding leading zeroes. The original check digit remains the last digit.

A converter can validate format and check-digit arithmetic, but it cannot prove that your organization licensed the number or assigned it to the correct product. Confirm ownership and product assignment in your master data or with your local GS1 Member Organisation.

The four conversion steps

  1. Normalize the input.Read the 8, 12, 13 or 14 digits and remove presentation spaces. Do not discard meaningful leading digits.
  2. Validate the check digit.Use the GS1 modulo-10 calculation. A failed check digit usually means a transcription error or a number that is not a GTIN.
  3. Express it as GTIN-14.Add filler zeroes on the left until the value has 14 digits. Do not recalculate the check digit simply because filler zeroes were added.
  4. Build and encode the URI.Use https://your-domain.example/01/{gtin14}, then render that complete string in a QR Code suitable for the intended GS1 application.

Worked UPC-to-GS1-QR example

Worked example: the identifier stays the same
UPC-A number01234567890512 digits, including check digit 5
GTIN-14 representation00012345678905Two leading filler zeroes
Digital Link URI…/01/00012345678905AI 01 identifies the GTIN
Data carrierQR CodeThe URI is encoded as text
Resulting example URI
https://id.example.com/01/00012345678905

This example uses an IANA-reserved documentation domain, so it is safe to show but is not a live product link. In a real deployment, use a domain and path operated for your product-identification service, or a GS1 service that your organization is entitled to use.

You may add optional data only when it exists and your process controls it. Lot (10) and serial (21) are key qualifiers in the path; expiry (17) is a query attribute:

GTIN + lot + expiry
https://id.example.com/01/00012345678905/10/LOT123?17=271231

Choose a domain strategy deliberately

Brand-controlled domain

Best for long-term destination control. Your infrastructure must preserve the GS1 identifier path and provide reliable redirects or resolver behavior.

GS1 or partner service

Useful when provided by your GS1 organization or solution partner. Confirm entitlement, persistence, destination management and service terms.

No web domain

A GS1 element string can still be encoded in a GS1 QR Code or GS1 DataMatrix for scanner workflows, but it is not a Digital Link and will not behave like a normal website on a phone.

Common conversion mistakes

  • Inventing a GTIN: a valid check digit does not make an unlicensed number legitimate.
  • Using 12 or 13 digits in a new Digital Link: current GS1 syntax requires the 14-digit GTIN representation.
  • Putting the GTIN directly after the domain: AI 01 must identify what the number means.
  • Putting expiry in the path: AI 17 is informative data and belongs in the query string.
  • Testing only on screen: production print quality, size, contrast, quiet zones and packaging shape affect scanning.

Authoritative references