Free Code 128 Barcode Generator

Type a stock code, a label text or any other text of up to 80 plain letters, digits, spaces and basic symbols, and download it as a Code 128 barcode in PNG or SVG, or paste a list and get one ZIP, with no sign-up.

Barcode type

Code 128

This tool draws the barcode for a number you already have. It does not give you a registered product number. To sell in stores or on marketplaces, you need GTINs from GS1.

This is an example code: type yours to download.

Letters, digits, spaces and basic symbols. Up to 80.

Code 128 barcode: WH-A12-0345
Printed size
55.9 × 27.1 mm
Bar width
0.339 mm

SVG is for print and design software.

Size, color and file

Print

Paper

In the print window, choose Scale 100% (Actual size) and turn off Fit to page. The ruler on the page should measure 50 mm.

What is a Code 128 barcode?

Code 128 is the barcode type on this page that takes letters, digits, spaces and basic symbols, so a label can carry a text such as WH-A12-0345 and not only a number. GS1 US describes a 1D barcode, such as a UPC, as a series of vertical lines and spaces (GS1 US); Code 128 is drawn the same way, as bars and not as a grid. The other three types of Varnip's barcode generator, UPC-A, EAN-13 and EAN-8, take digits only.

How do I create a Code 128 barcode?

To create a Code 128 barcode, type your text in the Data box, check the preview and the Printed size, and choose Download PNG or Download SVG.

SVG is for print and design software and is a vector file sized in millimeters; PNG is 600 dpi by default, with 300 dpi optional, and the dpi is stored in the file. Under Size, color and file you can also choose the bar height, millimeters or inches, the bar color and a transparent background, or hide the text under the bars. There is no watermark and no account.

What characters can a Code 128 barcode hold?

On this page a Code 128 barcode holds up to 80 characters: letters, digits, spaces and basic symbols, and any other character is refused and named.

What the Data box accepts for Code 128
Part of your textAccepted
LettersA to Z, capitals and lowercase
DigitsAny digit, 0 through 9
Spaces and basic symbolsPrintable ASCII, from the space (32) to the tilde (126), such as - . / # _
Length1 to 80 characters
Anything elseRefused, and the page names the character, for example an accented letter or an emoji

Spaces at the start and the end of a value are trimmed, and in Bulk a blank line is skipped.

Does Code 128 have a check digit?

Code 128 has no check digit for you to type: this page takes your text as it is, while on UPC-A, EAN-13 and EAN-8 it adds the check digit for you.

If you need a UPC or EAN number with its check digit, choose UPC-A or EAN-13 on the barcode generator.

Code 128A, 128B or 128C: which one do I pick?

You do not pick one: this page has no menu for Code 128 A, B or C, and it chooses by itself how to encode your text.

How wide is a Code 128 barcode, and will it fit my label?

A Code 128 barcode grows wider with every character: at the 100% Size a text of 20 letters is 93.1 mm wide and a text of 80 letters is 316.7 mm, wider than an A4 page.

Width of a Code 128 file in millimeters, quiet zones included, as the page's engine draws it at 600 dpi with the text under the bars
CharactersLetters, Size 80%Letters, Size 100%Letters, Size 200%Digits only, Size 100%
1041.955.9111.837.3
2069.893.1186.355.9
40125.7167.6335.393.1
80237.5316.7633.3167.6

A text of digits only takes less room: from four digits on, they are drawn in pairs, so 40 digits are as wide as 20 letters. Printed size shows the width of the file before you download it, and a Code 128 wider than A4 (210 mm) gets a warning.

For Code 128 the Size menu offers 80%, 100% and 200% of the 0.33 mm bar, which come out at 0.254, 0.339 and 0.677 mm. The GS1 Canada size table cited on the barcode page is for UPC-A and EAN-13 (GS1 Canada, EAN/UPC Symbol Reference, 2018), so it is not a size guide for Code 128: ask whoever scans your labels which bar width they read.

Can I create a bulk Code 128 barcode from a list?

To create Code 128 barcodes in bulk, open the Bulk tab, put one value on each line, and download a ZIP of up to 1,000 SVG or 100 PNG files.

Each line can be a different text of up to 80 characters, such as a list of shelf labels or SKUs. The page checks every line first, and a line with an error stops the download and is named, for example Line 3. Inside the ZIP each file is named for its place in the list and its value, such as 0001-WH-A12-0345.svg.

Paste the list, because there is no CSV or Excel import. The Print button next to Download ZIP lays the whole list on A4 or US Letter pages, up to 40 pages.

How do I print a Code 128 label at its true size?

To print a Code 128 label, choose Print at true size, pick A4 or US Letter and the number of copies, then print at Scale 100% (Actual size) with Fit to page turned off, and check that the ruler measures 50 mm.

In our test of the print PDF made in Chromium the ruler measured 50.0 mm, but the size on paper depends on your print window, so check the ruler on yours.

What is the quiet zone of a Code 128 barcode?

The quiet zone is the blank margin to the left and right of the bars, and every Code 128 file from this page includes 10 bar widths of it on each side.

At the 100% Size that is 3.39 mm on each side, so do not crop it when you place the barcode on a label. A transparent background keeps the margin but has no color of its own, so place the file on a light background.

Will my Code 128 barcode scan?

This page cannot promise that every scanner reads your label: on one Android phone, a reader app read a downloaded Code 128 PNG, and that is the only test of a barcode on a device that we have.

At every build our tests draw Code 128 at each size and resolution as PNG and SVG, in Chromium, Firefox and WebKit, then read every file back with a software decoder. Scanning a printed label and handheld scanners are not tested, so scan one printed label before you print many. The page warns when the bar color is too light or has much red in it, and it makes barcodes; it does not read or repair one you already have.

Is there a Code 128 font?

This page does not give you a font: it draws the barcode itself and gives it to you as a PNG or SVG image.

In the SVG file the text under the bars is outlines, not a font.

Should I use Code 128 for inventory, SKUs or a 3PL?

Code 128 suits your own labels that need letters, such as stock, warehouse and SKU codes, while products sold in stores take UPC-A or EAN-13.

For internal labels, such as stock or warehouse SKUs, use whatever code your scanner or 3PL (third-party logistics provider) accepts; Code 128 encodes letters and numbers, which UPC and EAN cannot. Confirm with whoever scans your labels which code they read.

Is a Code 128 barcode a registered product number?

No: a Code 128 barcode from this page carries the text you type, and it is not a registered product number.

To sell in stores or on marketplaces, you need GTINs from GS1. In GS1's words, a GTIN is a unique number for an item that may be priced, ordered or invoiced (GS1), and GS1 US says a UPC is a barcode that represents a GTIN (GS1 US). To draw a UPC-A or EAN-13 barcode for a number you already have, use Varnip's barcode generator.

Does this page make Code 39 or GS1-128 barcodes?

No: this page makes Code 128 and does not make Code 39 or GS1-128 barcodes.

GS1 says a barcode with variable information such as serial numbers, expiry dates or measures uses GS1-128, GS1 DataBar or a GS1 2D symbol, which this page does not make (GS1). Varnip's barcode generator makes four types: Code 128, UPC-A, EAN-13 and EAN-8.

What happens to the text I type?

What you type is encoded in your browser and is not sent to our servers. The barcode is drawn in your browser, and the file you download is made on your device. Varnip does count how the generators are used, such as which format was downloaded, never what you type. The privacy page has the details.

Last updated

See how we test this generator.

Which standards and sources does this page rely on?

This generator relies on these documents from GS1, GS1 US and GS1 Canada for what a GTIN is, how a 1D barcode is described, and which symbols this page does not make: