Privacy Policy updated What changed in the Privacy Policy

Free barcode generator: make one that scans the first time.

Type your data, check the printed size, download SVG or PNG. Which barcode do I need?

Letters, digits and common symbols (printable ASCII). Best general choice for internal labels. When to use Code 128

Ready.

The preview also updates as you type.

Preview · printed sizeScale in mm

Black on white only: colored bars and backgrounds are a common cause of scan failures. Everything is drawn in your browser; nothing you type is sent anywhere unless you press Save.

Printed size

The width of the narrowest bar. GS1 sets no size for internal codes; pick one your scanners read comfortably. Size and print settings explained

Download for your printer

SVG downloads at the printed size above, for design and label software. PNG for a 300 dpi printer (12 dots/mm): 4 printer dots per module, so X is 0.333 mm and the bars 12.83 mm tall; print it at 100% scale. Free for personal and commercial use, with no watermark. Test a printed sample with the scanner that will read it.

  • Free to use
  • No sign-up needed
  • No watermark
  • Personal and commercial use
  • Runs in your browser

How it works

How the generator works

Create UPC, EAN, ISBN, Code 128, GS1-128, ITF-14 and QR codes at the right printed size, right here in your browser: fourteen barcode types, GS1 sizes built in, and downloads ready for design software or a label printer. Then let the guides walk you through the number, the size and the printing, where most barcode problems start.

  1. Step 01

    Pick the barcode type for your job.

  2. Step 02

    Type the data and press Generate. For UPC, EAN and ITF-14 the check digit is added for you.

  3. Step 03

    Check the printed size. Defaults follow GS1, and out-of-range sizes are flagged.

  4. Step 04

    Download SVG for artwork or PNG for your printer, then test a printed sample.

barcode types, linear and 2D
14
plain-English guides with sources
44
printer resolutions with whole-dot PNGs
3
accounts required, file uploads or watermarks
0

Settings explained

What each generator setting does

The generator asks for four things: the type, the data, the size and the printer. Here is what each control changes and when it is worth touching.

1. Barcode type

Choose by where the barcode will be scanned, not by how it looks. UPC-A and EAN-13 go on products sold at a checkout, ITF-14 and GS1-128 on cartons and shipping labels, Code 128, Code 39 and Codabar on labels that stay inside your business, and QR on anything people scan with a phone. Data Matrix and GS1 DataMatrix need a 2D imager or camera scanner; PDF417, a stack of short rows, can also be read by rastering laser scanners. Changing the type resets the size fields to that type's defaults and fills in an example you can overwrite. Each type also has its own page with its rules, sizes and a worked example.

2. Data to encode

For UPC-A, EAN-13, EAN-8, UPC-E and ITF-14, type the number without its last digit and the generator calculates the GS1 check digit. Type the full number and it checks the last digit instead and, for every type except UPC-E, tells you which digit it expected if yours is wrong. ISBN takes an ISBN-13 (an ISBN-10 is converted), then optionally a space and the five-digit price add-on. GS1-128 takes Application Identifiers in parentheses, such as (01) before a GTIN and (17) before an expiry date written YYMMDD, and inserts the FNC1 separators itself; GS1 DataMatrix takes the same input. Data Matrix and PDF417 take any text. Code 39 has no lowercase letters, so your text is converted to capitals.

3. X-dimension, bar height and quiet zone

The X-dimension is the width of the narrowest bar, in millimeters. Every other bar and space is a whole multiple of it, so it sets the width of the whole symbol. The defaults come from the GS1 General Specifications: 0.330 mm for UPC and EAN, which is 100% magnification and sits inside GS1's checkout range of 0.264 to 0.660 mm, and 0.495 mm for ITF-14 and GS1-128, GS1's minimum for cartons scanned in distribution. Code 128, Code 39 and Codabar also start at 0.330 mm, but GS1 sets no size for internal codes, so use whatever your scanners read comfortably.

Bar height starts at GS1's figure for the type: 22.85 mm for UPC-A, EAN-13 and UPC-E, 18.23 mm for EAN-8 and 31.75 mm for ITF-14 and GS1-128. For UPC and EAN, GS1 ties the minimum height to X, so a bigger symbol needs taller bars. Raise X to 0.5 mm on a UPC-A without touching the height and the generator warns that bars shorter than 34.62 mm are truncated. Internal codes default to 12.7 mm (half an inch).

The quiet zone is the blank margin at each end, counted in modules. The defaults are GS1's: 9 on each side of a UPC-A, 11 on the left and 7 on the right of an EAN-13 (the field sets the left side and keeps the right in step), 7 on each side of an EAN-8, and 10 for ITF-14 and GS1-128. The generator also uses 10 for the internal types. A QR code always gets 4 modules on every side. Data Matrix starts at 1 module and PDF417 at 2, the minimums in their ISO specifications. For 2D codes the X-dimension field becomes “Module size”: the width of one square, or of PDF417's narrowest bar.

4. Text, bearer bars and downloads

“Show human-readable text” prints the data under the bars. GS1 says this text should sit next to any barcode that carries a GS1 number; it is what staff fall back on when a barcode fails to scan. Leave it on for retail and carton codes; on internal labels it is your call. For ITF-14, the bearer-bar frame is three modules thick with the quiet zones inside it. GS1 makes bearer bars mandatory wherever they are feasible: at least twice the narrow bar, top and bottom, for printing without plates (a thermal label, for example), and a full frame 4.83 mm thick when the symbol is printed with plates, as on corrugated board.

SVG downloads at exactly the size you set, for packaging artwork and label software; place it at 100%. PNG is made for one printer, so choose 203, 300 or 600 dpi first. The generator rounds each module to the nearest whole number of printer dots, counting 203 and 300 dpi heads as 8 and 12 dots per millimeter as GS1 does, scales the bar height to match, writes the resolution into the file, and tells you the X-dimension you will actually get.

Choosing a size for your printer and label

On a label printer, start from the X-dimensions the printer can make exactly, then check the label.

  • Retail UPC and EAN. GS1's table of sizes that thermal printers can make shows that a 203 dpi head gives 0.375 mm (about 114%) with 3 dots per module and 0.500 mm with 4, and a 300 dpi head gives 0.333 mm with 4, the closest to 100% (GS1 lists it as 100.01%; the generator rounds 0.333 ÷ 0.330 to 101%). Two dots at 203 dpi, 0.250 mm or about 76%, is below the normal 80% minimum. GS1 accepts 75 to 80% only from on-demand printers, and only when the space set aside is at least that of an 80% symbol and the bars are not cut short.
  • Cartons (ITF-14 and GS1-128). The 0.495 mm minimum rounds to 4 dots at 203 dpi or 6 dots at 300 dpi, 0.500 mm either way, and GS1 allows up to 1.016 mm. A GS1-128 symbol may be no longer than 165.10 mm (6.5 in), so a long data string limits how large you can go.
  • Internal codes. No GS1 rule. Pick a whole number of dots that fits the label, then test with your own scanners.

Then hold the printed size in the readout against the label, leaving a margin to its edges. A UPC-A is 95 modules plus two 9-module quiet zones, 113 modules in all, so at 0.375 mm it needs 42.4 mm of width. An ITF-14 at the default 0.495 mm, with its frame and digits, comes to about 79.7 × 41.6 mm.

Common mistakes and how to avoid them

  • Making up a retail number. The generator will draw any 12 digits with a correct check digit. Stores and marketplaces need a number licensed to your company through GS1; see how to get UPC barcodes.
  • Resizing the download. Scaling the file in a layout program or word processor changes X and knocks a PNG off the printer's dot grid. GS1 US says not to shrink or enlarge barcode art but to re-create it at the size you need: here, change X and download again.
  • Trimming the bars to fit. GS1 US calls this truncation and warns that it can cause incorrect scanning. Use a smaller X with its matching height, or find more room.
  • Crowding the quiet zone with text, a border, a fold or the edge of the label.
  • Printing a PNG on a different printer, or with “fit to page” switched on. A 300 dpi file sent to a 203 dpi printer is resampled, and the whole-dot rounding is lost.
  • Picking the type by looks. A checkout reads the GTIN in a UPC or EAN symbol, not a Code 128 SKU, and UPC cannot hold letters, so internal codes with letters need Code 128 (or Code 39 if an older system requires it).

Worked example: a bin label on a 2 × 1 inch label

  1. Choose Code 128 and type BIN-A12-0042. That is 156 modules of bars plus a 10-module quiet zone at each end: 176 modules.
  2. At the default X of 0.330 mm, the readout shows 58.1 × 17.3 mm. The label is only 50.8 mm wide.
  3. Select 203 dpi. The PNG would round X up to 3 dots, 0.375 mm, and the code would grow to 66.0 mm. Wider still.
  4. Set X to 0.25. That is exactly 2 dots on a 203 dpi head (and 3 on a 300 dpi one), so the readout drops to 44.0 × 16.3 mm: about 3.4 mm to spare at each side and plenty of room in the 25.4 mm height.
  5. Download the PNG, print it at 100% and scan it with the scanners you actually use. If it reads poorly, shorten the code or move to a wider label rather than shrinking X again.

The same order works for any type: start from the printer's dots, check the readout against the label, then test a printed sample. Quiet zones, colors and testing are covered in depth in how to print barcodes that scan.

Sources

  1. GS1: GS1 General Specifications Standard (Release 26.0) (accessed )
  2. GS1 US: Barcode Placement & Printing Guidelines (accessed )

Start from the job

Which barcode do you need?

Retail checkout and trading-partner labels follow GS1 rules. Labels that never leave your building can use any numbering you like.

Still unsure? The barcode type decision guide walks through five questions.

Before you print

Three things no barcode generator can do for you

Drawing the bars is the easy part. These three decide whether the barcode works in the real world.

  1. Give you a number a retailer accepts

    Any generator will draw a valid-looking UPC for any 12 digits. For stores and large marketplaces, the number itself has to come from GS1. How to get UPC numbers.

  2. Choose the right printed size

    Retail barcodes have a standard size and a limited range. Shrinking one, or cutting its height, is a common reason it fails at the register. Size and print settings.

  3. Prove it scans where it matters

    A phone reading your screen says little about a worn label under a warehouse scanner. Test the real label with the real scanner. Troubleshooting checklist.

About

An independent site, written for people who print labels

Plain Barcode is run and edited by an independent publisher in the United States. The tools are free and run in your browser, and the guides cite the standards and documentation they rely on, mainly GS1 and ISO.

Read who runs the site and how guides are written and corrected.

A small, tidy stockroom with grey steel shelving, plain cardboard boxes and clear bins in window light

Plain Barcode

Questions, corrections or a tool that misbehaves: hello@plainbarcode.com