Map Extract
Free tool

Code 128 and GS1-128 barcode generator

Type a stock code, asset number or booking reference, or switch on GS1-128 and enter data with application identifiers in brackets. Set the narrowest bar width in millimetres and the tool draws the symbol, gives its printed size including the quiet zone, and exports files sized for print.

Runs in your browser. Nothing you enter is uploaded.

Making a print-ready barcode

  1. Start from a preset

    Stock or SKU label, asset tag, GS1-128 case label, or ticket and booking number. Each sets sensible text and bar width.

  2. Enter your data

    Plain text or numbers for ordinary Code 128. For GS1-128, tick the GS1 box and write each identifier in brackets followed by its value, such as (01) then a 14-digit GTIN.

  3. Set the bar width

    The slider sets the narrowest bar from 0.19 mm to 1 mm. The note says most handheld scanners read bars of 0.25 mm and up, and that GS1 recommends at least 0.495 mm for GS1-128 on cases and pallets.

  4. Choose whether to print the text

    Text under the bars adds the human-readable line people can type in if a scan fails.

  5. Export

    Download SVG, PNG at 300 dpi for documents, PNG at 600 dpi for labels and packaging, or a PDF at the exact size. Print at 100%, not fit to page.

Example: a case label for a wholesale customer

A small preserves maker supplying a regional wholesaler is asked to label each outer case with the product's GTIN, a batch number and a best-before date. She ticks GS1-128 and enters the line below.

The checker lists each field: (01) GTIN (product number) 05060001234564, (10) Batch or lot B0412 and (17) Expiry date 2027-11-30, all passing. When she mistypes the date as 271340, it reports that (17) needs a date as YYMMDD, such as 271231, before anything is drawn.

Input
GS1-128 ticked
(01)05060001234564(10)B0412(17)271130
Result
(01) GTIN (product number): 05060001234564
(10) Batch or lot: B0412
(17) Expiry date: 2027-11-30
Typing (17)271340 instead: (17) needs a date as YYMMDD, such as 271231.

Terms on this page

Code 128
A compact barcode for any printable ASCII text, widely used on shipping and stock labels.
GS1-128
Code 128 carrying data in GS1's standard format, with a special FNC1 character at the start and application identifiers that say what each value means.
Application identifier
A two to four digit code in brackets, such as (01) for GTIN, (10) for batch or (17) for expiry date.
Quiet zone
The blank margin either side of the bars that scanners need. The printed size shown includes it.
X dimension
The width of the narrowest bar, set with the slider. The rest of the symbol scales from it.

Questions people ask

What is the difference between Code 128 and GS1-128?

They use the same bar pattern. GS1-128 adds a start character and structured data with application identifiers, so a warehouse system knows which part is the product number, which is the batch and which is the date. Plain Code 128 just holds text that means whatever you decide.

What bar width should I use?

For office and stock labels read with handheld scanners, around 0.25 to 0.33 mm usually works. For GS1-128 on cases and pallets, the tool notes GS1's recommendation of at least 0.495 mm. Wider bars make a longer barcode, so check it fits your label.

Why print at 100% scale?

The files are made at an exact physical size so the bar width you chose is what ends up on paper. Fit to page or scaling options in the print dialogue change that, which can make bars too thin to scan or the barcode too long for the label.

Which application identifiers can I use?

Common ones such as (01) GTIN, (10) batch or lot, (17) expiry date, (21) serial number and others defined by GS1. The checker names each identifier it recognises and flags values in the wrong format, such as a date that is not YYMMDD.

Where your data goes

Barcodes are drawn in your browser by a WebAssembly encoder delivered with the page. The data you enter is not uploaded, and the SVG, PNG and PDF files are created locally.

Checked against the tool on

Top