Skip to content
UPC Maker

GS1-128 Barcode Generator

GS1-128 carries more than a product number: lot, expiry date, serial number and weight can all sit in one barcode. Type each element with its application identifier in brackets and download a barcode a warehouse system can break apart.

Your barcode appears here.

Free, no sign-up, no watermark. Barcodes are drawn in your browser and nothing you type is uploaded.

How to write GS1-128 data

A GS1-128 barcode is a chain of elements. Each one starts with an application identifier (AI) that says what follows. Type the AI in round brackets, then the value, with no spaces:

(01)10012345000017(17)271231(10)LOT42

That single barcode says: this is GTIN 10012345000017, it expires on 31 December 2027, and it is from lot LOT42. The brackets appear in the readable text under the bars so a person can follow it. They are not encoded in the bars.

GS1-128 barcode carrying a GTIN, an expiry date and a lot number, with the application identifiers shown in brackets underneath
GTIN, expiry date and lot number in one GS1-128 barcode.

The application identifiers you are most likely to need

AIMeaningFormat
(00)SSCC, the serial number of a pallet or parcel18 digits
(01)GTIN of the item or case14 digits
(02)GTIN of the items inside a pallet14 digits
(10)Batch or lot numberUp to 20 characters
(11)Production dateYYMMDD
(13)Packaging dateYYMMDD
(15)Best before dateYYMMDD
(17)Expiry dateYYMMDD
(21)Serial numberUp to 20 characters
(37)Count of items, used with (02)Up to 8 digits
(3103)Net weight in kilograms, three decimals6 digits
(400)Customer purchase order numberUp to 30 characters

Rules that trip people up

  • The GTIN in (01) is always 14 digits. Pad a UPC or EAN with zeros on the left. This tool checks the length and the check digit and tells you the correct last digit if it is wrong.
  • Dates are always six digits. Year, month, day, with no separators. Use 00 for the day when only the month is known.
  • Fixed-length elements go first. Put (01), (11), (15) and (17) before (10) and (21). A variable-length element in the middle needs an invisible separator after it, which makes the barcode wider.
  • (02) must be followed by (37). Content GTIN and count travel together.
  • Weights carry the decimal position in the AI. (3103) means three decimal places, so 001250 is 1.250 kg. (3102) would make the same digits 12.50 kg.

GS1-128 or ITF-14 on a carton?

If the carton only needs to say what product is inside, ITF-14 is simpler and prints better on brown board. Choose GS1-128 when the receiver needs traceability data, which is standard for food, drink, pharmaceuticals and anything with a shelf life. GS1-128 needs a white label or a clean printed panel, because its bars are finer than ITF-14.

Keeping the barcode scannable

GS1-128 grows quickly. The standard caps one barcode at 48 data characters and 165 mm including quiet zones. If your data runs longer, split it across two barcodes on the same label, with the GTIN in the first. For very small items where even a short GS1-128 will not fit, the same data can go in a Data Matrix. For barcodes that carry only your own text with no GS1 structure, use plain Code 128.

Frequently asked questions

What is an application identifier?

It is a two to four digit code in brackets that says what the data after it means. (01) is a GTIN, (10) is a batch or lot, (17) is an expiry date, (21) is a serial number. The brackets are printed in the text under the bars but are not encoded in the bars themselves.

How do I write a date in GS1-128?

Always six digits as YYMMDD. The last day of 2027 is 271231. If only the month matters, use 00 for the day, so December 2027 is 271200.

My GTIN is only 12 or 13 digits. What do I enter in (01)?

Pad it with zeros on the left to 14 digits. A UPC 036000291452 becomes 00036000291452. The check digit does not change.

In what order should the elements go?

Put fixed-length elements first, such as (01) GTIN and (17) expiry date, and variable-length ones like (10) lot or (21) serial last. That keeps the barcode as short as possible, because a variable-length element in the middle needs a separator character after it.