Recommendations

Uppercase (smaller barcode)

If a QR code contains only uppercase letters, it may reduce its size compared to if it contained lowercase letters. This feature results from the way the data is encoded into the QR code. The QR code has 4 standardized modes of data encoding: numeric, alphanumeric, binary, and kanji. The 'problem' is that the alphanumeric mode only supports numbers, selected uppercase letters (without diacritics) and selected special characters (%, $, /, ...). If you store lowercase or accented letters in the QR code, the data encoding mode switches to binary (which is able to encode them). The difference in the physical size of the barcode comes from the number of bits needed to encode a single character. Alphanumeric mode needs 5.5 bits per character. Binary mode needs 8 bits per 1 character.

This 'technique' of reducing the physical size of the barcode has its pitfalls. The protocol, subdomain, domain and top-level domain are not case-sensitive and therefore switching between upper and lower case is safe. For example, HTTPS://ID.GS1SK.ORG/01/08580000000047 and https://id.gs1sk.org/01/08580000000047 are equivalent and safe. It doesn't matter whether you use upper or lower case in these links, both links are valid and lead to the same website. However, if you also have a URL path in the URL, depending on the server, it may change the destination where you will be redirected. This means that, for example, HTTPS://ID.GS1SK.ORG/RESOLVER/PRODUCTS/01/08580000000047 may or may not lead to the same destination as https://id.gs1sk.org/resolver/produkty/01/08580000000047.

Another obstacle in this 'technique' may be the use of batches and dates. If you are encoding a batch into a barcode that contains lowercase letters or disallowed characters, then the use of uppercase letters at the beginning of the string is meaningless because the entire string will be encoded in binary mode anyway. The same is true if you use dates or other URL query strings, which will cause the resulting string to contain characters not allowed (&, ?) for alphanumeric mode.

Either way, it's an interesting technique that can make your QR code significantly smaller. That's why we decided to apply it on this page for all QR codes with GS1 Digtial Link. We have also used it in strings containing batch and date data, so that the jump in code size can be clearly seen. You can also see this jump in the following examples:

Data:

HTTPS://ID.GS1SK.ORG/01/08580000000030

Data:

https://id.gs1sk.org/01/08580000000030

Data:

HTTPS://ID.GS1SK.ORG/01/08580000000030/10/emental

Data:

https://id.gs1sk.org/01/08580000000030/10/emental

Pre-printing of labels

GS1 Digital Link (GS1 DL) can also be used if the manufacturer uses pre-printed labels. This is a replacement of the information carrier. Instead of the EAN-13 barcode, a QR barcode with data in GS1 DL format is used. In both cases, the barcodes contain only static data that does not change: the product identifier GTIN. The added value of this change is that in the QR GS1 DL the product identifier is part of the web URL. When scanned at checkout or by another scanner, the URL will yield the same information as the EAN-13 code, i.e. the product identifier. When scanned by phone, the user can choose to be redirected to the encoded URL that redirects the user to the product page (or other page as determined by the brand and site owner).

Example:

QR code:

(01) 08580000000016

EAN-13 code:
8580000000016>
Encoded data:
(01) GTIN 08580000000016
Resolving URL paths

When creating a custom resolver, you may run into the problem of resolving all URL path reads. A GS1 DL URL path can be simple, e.g. 01/08580000000009, but can also consist of multiple components, e.g. 01/08580000000009/22/Cpv22/10/Lot10.

With a URL path that consists of only the product identifier (01/08580000000009), redirection is easy. It is handled by only one identifier.

For a URL path that consists of multiple components (01/08580000000009/22/Cpv22/10/Lot10), the redirection can be resolved in several ways:

  1. Redirect by the main identifier (01) and discard the others.
  2. Redirect by the main identifier (01) and append the others to the URL query string. (Recommended)
  3. Redirection depending on the whole path.

While redirecting by the full URL path is the most accurate, it adds to the complexity of the resolver and one has to ask whether I want to have a separate page for each batch (GS1 identifier 10) or for each consumer variant of the product (22).

A more practical approach is to redirect by the main identifier (GTIN 01) and append the other parameters to the URL query string. From there, the parameters can be retrieved, displayed and evaluated on the page, e.g. to check the expiration date or batch recall.

Example:

QR code:
Encoded data:
(01) GTIN 08580000000078
(22) Consumer product variant Var12
(10) Batch/Lot Sarza01
(11) Production date 250909
(15) Best before date 290205