A barcode is only useful if it scans first time. This generator makes the common linear (1D) barcodes and, while you design, checks the things that usually stop them scanning: bars printed too thin, a quiet zone squeezed by text, bars cut short to fit a label, and colours a red scanner light can't tell apart. When you're happy, download a PNG, SVG or PDF that prints at the size you set.
How to make a barcode
- Pick the format. If a retailer, carrier or customer gave you a spec, use the format it names. If it's for your own use, Code 128 is a safe default.
- Type the value. For EAN, UPC, ITF-14 and ISBN you can leave off the last digit and the tool adds the check digit. If you type it, the tool checks it and tells you the correct one if it's wrong.
- Set the size. Choose a preset or type the bar width (the "module" or X-dimension) and the bar height. Pick your printer's DPI so each bar lands on whole printer dots.
- Read the scan quality checks. Each warning says what's wrong in one sentence. Fix the warnings before you print a batch.
- Download or print. PNG for documents and web pages, SVG for design software, PDF for printing at true size. Use Labels & sheets to place codes on a label or a full sheet.
- Test print one first. Print at 100%, measure it, and scan it with the device that will read it day to day.
Which barcode format should you use?
| Use | Format | Why |
| Products sold in shops (most of the world) | EAN-13, or EAN-8 on very small packs | Read at the checkout. Needs a GS1-licensed number. |
| Products sold in shops (USA and Canada) | UPC-A, or UPC-E on small packs | Same system as EAN-13 with a leading zero. Most scanners read both. |
| Books | ISBN-13 shown as EAN-13 | The ISBN is the number; EAN-13 is how it's drawn. |
| Magazines and periodicals | EAN-13 with an EAN-2 or EAN-5 add-on | The add-on often carries an issue number or price code. |
| Outer cartons of products | ITF-14 | Tolerates printing on corrugated board. Carries a 14-digit GTIN. |
| Shipping labels and pallets | GS1-128 with an SSCC, AI (00) | Carries the shipment ID plus dates, batch and counts. |
| Inventory, assets, tickets, documents | Code 128 | Compact, holds letters and digits, read by almost every scanner. |
| Older industrial or government systems | Code 39 or Code 93 | Common in older specs. Code 93 is shorter for the same data. |
| Libraries, blood banks, some labs | Codabar | Long-established in these fields; only digits and a few symbols. |
| Shelf labels and warehouse bins | MSI or Interleaved 2 of 5 | Digits only. Use what your existing scanners are set up to read. |
| Pharmaceutical packaging control | Pharmacode | Read on packaging lines to check the right material is used. Not a product ID. |
This tool makes linear barcodes only. For links, contact cards or Wi-Fi details, use our QR Code Generator.
How check digits work
A check digit is calculated from the other digits so a scanner can catch a misread, and so can you when typing a number. EAN, UPC, ITF-14, GTIN, SSCC and ISBN-13 all use the same GS1 method: starting from the rightmost digit (before the check digit), multiply digits alternately by 3 and 1, add the results, and the check digit is whatever brings the total up to the next multiple of 10.
- EAN-13, 590123412345: digits in the "times 3" positions are 9+1+3+1+3+5 = 22, so 66. The others are 5+0+2+4+2+4 = 17. Total 83, next multiple of 10 is 90, so the check digit is 7: 5901234123457.
- UPC-A, 03600029145: 0+6+0+2+1+5 = 14, times 3 is 42. Plus 3+0+0+9+4 = 16. Total 58, so the check digit is 2: 036000291452.
- EAN-8, 9638507: 9+3+5+7 = 24, times 3 is 72. Plus 6+8+0 = 14. Total 86, so the check digit is 4: 96385074.
- ITF-14, 1540014128876: 1+4+0+4+2+8+6 = 25, times 3 is 75. Plus 5+0+1+1+8+7 = 22. Total 97, so the check digit is 3: 15400141288763.
- ISBN-13, 978030640615: 7+0+0+4+6+5 = 22, times 3 is 66. Plus 9+8+3+6+0+1 = 27. Total 93, so the check digit is 7: 9780306406157. Type the older ISBN-10 (0-306-40615-2) and the tool converts it for you.
- SSCC, 10614141123456789: the "times 3" digits add to 40 (120), the rest to 23. Total 143, so the check digit is 7.
- Code 39 mod 43, CODE39: each character has a value (0-9 are 0-9, A is 10, B is 11 and so on). C=12, O=24, D=13, E=14, 3=3, 9=9, which adds to 75. 75 divided by 43 leaves 32, and the character with value 32 is W. The check character is optional in Code 39; turn it on only if your scanner expects it.
If a typed check digit doesn't match, the tool tells you what it should be. A wrong check digit usually means a typo earlier in the number, so check the source before you just accept the suggested digit.
GS1-128 explained simply
GS1-128 is Code 128 with rules on top. Each piece of data starts with an Application Identifier (AI), a short number in brackets that says what follows: (01) is a GTIN, (17) an expiry date, (10) a batch or lot, (00) a shipping container code (SSCC), (37) a count of items. A special character called FNC1 at the start tells the scanner to read it as GS1 data.
Some AIs always have the same length, so the scanner knows where they end. Others vary, like batch numbers, and need a separator after them when more data follows. The builder adds those separators and puts fixed-length fields first, as GS1 recommends, which keeps the barcode shorter. It also checks dates (YYMMDD, with day 00 allowed when only the month is known), check digits on GTIN and SSCC, allowed characters, and the GS1 limit of 48 data characters. The text under the barcode shows the brackets so people can read it; the brackets are not encoded.
Real GTINs and SSCCs come from GS1 or its authorised resellers. You can type any valid-looking number here, but only a licensed one belongs to your company.
Size, quiet zone and contrast rules
For GS1 barcodes the presets and checks follow the GS1 General Specifications, Release 26.0 (January 2026), section 5.12.3. Sizes are given as the module (X-dimension) and the bar height, which doesn't include the text.
| Barcode and use | Module (X) | Minimum bar height | Quiet zone | Source |
| EAN-13, UPC-A at the checkout | 0.264 to 0.660 mm, nominal 0.330 mm (80% to 200%) | 22.85 mm at 0.330 mm, scaling with X (18.28 mm at 0.264 mm) | EAN-13: 11X left, 7X right. UPC-A: 9X each side | Table 5-44 |
| EAN-8 at the checkout | 0.264 to 0.660 mm | 18.23 mm at 0.330 mm, scaling with X | 7X each side | Table 5-44 |
| EAN/UPC with a 2 or 5-digit add-on | Same as the main code | Same as the main code | 7X to 12X gap, 5X after the add-on | Table 5-44 |
| ITF-14 on cartons in distribution | 0.495 to 1.016 mm | 31.75 mm | 10X each side, plus bearer bars | Table 5-47 |
| GS1-128 shipping label (SSCC) | 0.495 to 0.940 mm | 31.75 mm | 10X each side | Table 5-51 |
| GS1-128 for asset and location IDs | 0.250 to 0.495 mm | 12.70 mm | 10X each side | Table 5-55 |
Below 0.264 mm, GS1 allows retail codes down to 0.249 mm only for on-demand thermal or laser printing. ITF-14 under 0.635 mm should not be printed straight onto corrugated board with plate printing. GS1-128 must stay within 165.10 mm in length. On ITF-14, bearer bars at least twice the module wide are required where printing allows, and plate printing calls for a 4.83 mm frame.
Code 128, Code 39, Code 93, Codabar, MSI and Pharmacode have their own ISO or industry specifications, which we haven't reproduced here. For those, the tool uses a 10-module quiet zone and suggests a bar height of at least 15% of the barcode width (the rule GS1 uses for very small logistics labels) as safe defaults.
On contrast: most scanners light the code with red light (GS1 specifies 660 nm), so red, orange and yellow bars can disappear, while dark blue or black bars on white, cream or yellow read well. The tool warns below a 7:1 contrast ratio. That number is our own cautious rule of thumb, not a figure from a barcode standard. Light bars on a dark background (inverted codes) get a warning too, because many scanners can't read them.
Printing tips
- Print at 100%. In the print dialog choose "Actual size" and turn off "Fit to page". Scaling by even a few percent can push a retail code out of range. The PDFs ask viewers not to scale, but the setting in your print dialog wins.
- Match the DPI. A printer can only make whole dots. At 203 DPI one dot is about 0.125 mm, so a 0.330 mm module becomes 3 dots (0.375 mm). Leave "snap to printer dots" on so every bar is the same number of dots.
- Thermal printers (common for shipping and product labels) give crisp bars. Print with the bars running in the direction the label feeds (a "picket fence" orientation) where you can, since bars across the print head blur more if the head has a worn element.
- Laser and inkjet printers work for office labels. Inkjet ink can spread on uncoated paper, which makes bars fatter, so use smooth label stock and avoid the smallest module sizes.
- Avoid glare. Glossy laminate, shrink wrap or a shiny metallic background can bounce the scanner's light straight back. Matte finishes are easier to read.
- Keep the quiet zone clear. Don't let label edges, folds, seams or other print run into the blank space on either side of the bars.
- Test print first. Download the test print page from the Size & print tab. Measure its 100 mm and 4 inch lines, then print a single label before a full run.
How to test a scan
Scan the printed label with the scanner or app that will actually read it, from the distance and angle people will use. Check that the value it shows matches exactly, including leading zeros. If your browser supports it, the Test scan tab can read the on-screen code, a camera view or a photo of your print, all on your device. A successful read is a useful sign. Phone cameras can read red or low-contrast bars that a red-light laser scanner misses, so test colour designs on the real scanner. A read also isn't a quality grade: retailers and logistics partners that require graded barcodes expect a test with a barcode verifier to ISO/IEC 15416.
Common mistakes
- Making up an EAN or UPC number for products you plan to sell in shops or on marketplaces.
- Shrinking a retail barcode to fit a small pack, or cutting the bars short. Height is tied to bar width for EAN and UPC.
- Placing text, a logo or the label edge in the quiet zone.
- Red or pastel bars, or a background in dark green, blue or brown.
- Saving a small PNG, then stretching it in another program. Use SVG or PDF, or export PNG at your printer's DPI.
- Using Code 39 with Full ASCII or a check character when the scanner isn't set up for it. The scan then returns odd characters.
Honest limits
A barcode generated here is a valid image of the number you enter. It does not register that number. For products sold in stores or on marketplaces you normally need numbers licensed through GS1 or an authorised reseller, so check what your retailer requires. This tool does not issue, license or register product numbers.
The quality checks review your settings, not a printed barcode, so they can't promise a scan. The browser scan test depends on your device and is not available in every browser. Bulk mode handles up to 100 values at a time. 2D codes such as QR, Data Matrix and PDF417 are not included. Bar patterns are drawn with the open-source JsBarcode library (version 3.12.3, MIT licence); everything else, including the PDF and ZIP files, is built in your browser by this page.
Related tools