Barcode Generator
Make print-ready barcodes: Code 128, EAN, UPC, ISBN, ISSN, GS1-128, ITF-14, Code 39 and Data Matrix, with check digits, exact sizes and a scan test.
- Free, no sign-up
- Runs in your browser
- Sources cited
Barcode
12 characters
Preview
A scanner reads
OL-2026-0001
- Printed size
- 2.35 in × 0.95 in
- Modules
- 156 wide
- Module width
- 13.33 mil · 0.339 mm
- Printer dots per module
- 4
- Image at 300 dpi
- 704 × 285 px
- Code 128 check symbol (value)
- 50
Download
An image at the printer resolution above, with every module in whole pixels.
Print checks
Draws the barcode as it will be downloaded and reads it with an independent decoder, in your browser. Test printed barcodes with your scanner too.
- Passed: Strong contrast between bars and background (21:1).
- Passed: Under red light, as laser scanners see it, the bars stand out (100% difference).
- Passed: Quiet zones of 10 and 10 modules are included.
- Passed: Each module is exactly 4 dots at 300 dpi.
- Passed: The bars are 32% as tall as the barcode is wide.
Size and printing
Units
The narrowest bar. A mil is a thousandth of an inch.
- 72 dpi (screen)
- 96 dpi (screen)
- dpi.150
- 203 dpi (thermal label)
- 300 dpi (thermal or laser)
- 600 dpi (laser)
- 1200 dpi (press)
Every bar then prints at exactly its width.
Snapped to 4 dots: 13.33 mil.
Printed size: 2.35 in × 0.95 in
Text and design
Text
100%
Text position
Leave empty to show the encoded data.
A bold line above the barcode, such as a product name.
Colors
For placing the barcode on your own design, on a light area.
Quiet zones, bearers and rotation
Clear space at each end, which scanners need to find the barcode.
Narrows every bar to make up for ink spread. Ask your printer how much. 0% of a module.
Bearer bars
Rotation
Make many barcodes at once
How to use the barcode generator
Pick the barcode type
Choose by where the barcode will be scanned: UPC-A or EAN-13 for products sold in stores, ISBN for books, ISSN for magazines, ITF-14 for shipping cartons, GS1-128 or GS1 DataMatrix for GS1 data such as batch numbers and expiry dates, and Code 128 for your own labels, assets and inventory.
Enter the data
Type the number or text. For product, book and carton barcodes you can leave out the check digit and the generator adds it; if you type it, the generator checks it and tells you the right one when it does not match. GS1 data is written with each Application Identifier in parentheses.
Set the size for your printer
Choose inches or millimeters, the module width (the narrowest bar), the bar height and your printer’s resolution. With “Fit modules to whole printer dots” on, every bar prints at exactly its width. Product and book barcodes also have size presets from 80% to 200%.
Adjust text and design
Show or hide the human-readable text, resize it, put it above or below, replace it, or add a bold label such as a product name. Choose colors, quiet zones, bar width reduction for ink spread, bearer bars and rotation.
Check and test
The print checks look at contrast, how the colors read under a laser scanner’s red light, the quiet zones, printer dots per module and bar height. The scan test draws the barcode and reads it back with an independent decoder.
Download, print or make many
Download PNG, JPEG or WebP at your printer’s resolution, or SVG, PDF or EPS at the exact print size. Print several copies at true size, or make hundreds from a list or a numbered sequence, as a ZIP file or a PDF sheet of labels.
How barcodes work
A linear barcode is a row of dark bars and light spaces whose widths are multiples of one unit, the module, also called the X-dimension. Each symbology has its own table of patterns for its characters, start and stop patterns that tell a scanner where the symbol begins and ends, and usually a check character so a misread is caught.
| Type | What it holds | Check character |
|---|---|---|
| Code 128 | All 128 ASCII characters | Mod 103, always |
| GS1-128 | GS1 Application Identifiers and their data | Mod 103, plus GS1 check digits in the data |
| EAN-13 | 13 digits | GS1 mod 10 |
| UPC-A | 12 digits | GS1 mod 10 |
| EAN-8 and UPC-E | 8 digits | GS1 mod 10 |
| ISBN and ISSN | An EAN-13 starting 978 or 979 (books) or 977 (serials) | GS1 mod 10 |
| ITF-14 | 14 digits | GS1 mod 10 |
| Code 39 | Capitals, digits and - . space $ / + %, or all ASCII in pairs | Mod 43, optional |
| Code 93 | All ASCII | Two, always |
| Interleaved 2 of 5 | An even number of digits | Mod 10, optional |
| Codabar | Digits and - $ : / . + | None |
| Data Matrix | Text or bytes in a square or rectangular grid | Reed-Solomon error correction |
Code 128 has three character sets: A for capitals and control characters, B for capitals and lowercase, and C for pairs of digits. The generator chooses the mix of sets that makes the shortest symbol, switching to set C for runs of digits, so a long number takes about half the width it would in set B.
Product, book and carton barcodes share one check digit method. From the right, the digits are multiplied by 3 and 1 in turn and the products added; the check digit is what brings the total up to the next multiple of 10. The generator shows this working for every barcode that uses it. As the Library of Congress explains, the UPC is a subset of the EAN: a 12-digit UPC becomes a 13-digit EAN with a leading zero.
Books use an EAN-13 made from the ISBN. The Book Industry Study Group says the prefixes 978 and 979 were reserved for ISBNs, in what it calls the Bookland EAN, and that some retailers ask for a 5-digit add-on with the price: a leading 5 for US dollars, or 90000 when no price is encoded. An ISBN-10 is converted by dropping its check digit, adding 978 in front and working out a new check digit. Serials use 977: the Library of Congress describes an EAN structure based on the ISSN with the leading digits 977, agreed by the international EAN and ISSN agencies. The generator builds it from 977, the first seven digits of the ISSN, the two variant digits you choose and a new check digit, with an optional issue add-on.
Data Matrix stores data as codewords in a grid with a solid L-shaped border on two sides and alternating modules on the other two, plus Reed-Solomon error correction that lets damaged codes still be read. The generator writes digits in pairs, picks the smallest of its thirty square and rectangular sizes that fits, and stores text outside Latin-1 as UTF-8 marked with an ECI.
Everything is made in your browser. The scan test reads each barcode back with ZXing, an open-source decoder written independently of this generator. The JavaScript version of ZXing used here has faults that stop it reading UPC-E and the 2- and 5-digit add-ons, so for those the generator’s tests compare every module with a second, independent encoder instead.
Worked example: a book barcode with its price
A publisher has the ISBN-10 0-306-40615-2 and a cover price of $14.99. Choosing ISBN and entering it, the generator drops its last digit and adds 978 in front, giving 978030640615. Weighting those digits 1 and 3 from the left and adding the products gives 93, so the check digit is 7 and the ISBN-13 is 9780306406157.
The price add-on for $14.99 is 51499: a 5 for US dollars, then the price in cents. The barcode and its add-on together are 151 modules wide. At the 100% preset of 13 mil per module, the whole drawing, with quiet zones, the ISBN line above and the digits below, is 2.17 × 1.06 inches, with bars 0.75 inches tall.
Printed at 300 dpi, 13 mil is 3.9 printer dots, so some bars would print a dot wider than others. With modules fitted to whole dots, each module becomes 4 dots, or 13.33 mil, and the barcode is 2.23 inches wide, a PNG of 668 pixels. On a 203 dpi label printer the nearest whole number is 3 dots, 14.78 mil, which is 114% of the 100% size.
| Symbology | Modules | Width of the bars (in) |
|---|---|---|
| Code 128 | 156 | 2.03 |
| Code 93 | 145 | 1.89 |
| Code 39, ratio 3 : 1 | 223 | 2.9 |
Understanding the result, and common mistakes
- A scanner reads
- The exact data in the barcode, including check digits. For GS1 data, ⟨GS⟩ marks the separator a scanner sends between variable-length fields.
- Module width
- The width of the narrowest bar, in mil (thousandths of an inch) and millimeters. Every bar and space is a whole number of modules, or the wide-to-narrow ratio for Code 39, Interleaved 2 of 5 and Codabar.
- Printer dots per module
- How many dots your printer uses for each module. Whole numbers keep every bar its true width; fractions make some bars a dot wider than others.
- Magnification
- For product and book barcodes, the size against the 13 mil module the 100% preset uses. BISG says book barcodes may be printed between 80% and 200%.
- Check character
- The digit or character the symbology adds so scanners can catch misreads. The working shows how the GS1 check digit was found.
The print checks use ObjectiveLine’s own guidance. Contrast between bars and background is measured with the WCAG formula: below 4:1 the check warns and below 2:1 it fails. Laser and red LED scanners see only how much red light a color reflects, so the generator also compares the red channel of the bars and background: under 50% difference it warns, and under 25% it fails. Fewer than two printer dots per module gets a warning, and so do bars shorter than 15% of the barcode’s width, which are hard to scan at an angle.
- Red, orange or yellow bars. They can look fine on screen but vanish under a red scanning light. Use black, dark blue or dark green bars on white.
- No quiet zone. Text, a border or another barcode right next to the bars stops scanners finding the start and end. Keep the margins clear.
- Scaling an image after downloading. Stretching a PNG makes bars uneven. Download at your printer’s resolution, or use SVG, PDF or EPS.
- A wrong check digit. Retyping a product number with a typo gives a different, valid-looking barcode. Type it once without the check digit and let the generator work it out, or check the error it shows.
- Making up product numbers. EAN, UPC and ITF-14 numbers are meant to be unique worldwide, and stores look them up. For your own items, use Code 128.
- Cutting bar height too far. Short bars are hard to scan by hand. Keep the height the generator suggests where you can.
- Not testing. Run the scan test, then scan a printed copy with the scanner that will be used.
Choosing a size, a format and a printer resolution
PNG, JPEG and WebP
Images at your printer’s resolution, so one image pixel is one printer dot. PNG files carry the resolution, so design and print software open them at true size. JPEG cannot be transparent.
SVG
Vector, with its physical size in millimeters set in the file, for design software and websites.
PDF
Vector, on a page exactly the size of the barcode, for print shops and print layouts.
EPS
Vector, for packaging and prepress software that still asks for Encapsulated PostScript.
Printers differ in resolution, such as 203, 300 or 600 dots per inch; your printer’s settings or manual give its figure. Choose it and keep “Fit modules to whole printer dots” on: the generator then rounds the module width to the nearest whole number of dots, and wide bars to whole dots too, and shows the width it used.
Ink and toner spread a little on paper, which makes bars print wider than drawn. If your printer recommends it, set a bar width reduction: every bar is narrowed by that share of a module, evenly on both edges, while spaces widen to match.
For books, the Book Industry Study Group says the barcode is printed at the bottom of the back cover, about 1 inch high by 2-3/16 inches wide at 100% including the price add-on, with the ISBN above it in 9 point type or larger. To print many labels, open “Make many barcodes at once”, choose a PDF label sheet, and set the page, columns, rows and margin to match your label stock.
Frequently asked questions
Can I use these barcodes on products I sell in stores?
The barcodes themselves are correct and print-ready, but stores expect product numbers that were assigned to your company, so the number is unique worldwide. In the United States, those numbers come from GS1 US. Use the numbers you were given, and this generator to make the barcodes.
Which barcode should I use for my own inventory or assets?
Code 128 suits most such labels: it holds any letters, digits and symbols, is compact and always includes a check character. Check that your scanner has it turned on, and use a numbered sequence to make a label for each item.
Do I need to type the check digit?
No. For EAN, UPC, ISBN, ISSN and ITF-14, leave it out and the generator adds it. If you type it, the generator checks it and shows the correct digit when yours does not match.
Where do ISBN and ISSN numbers come from?
Not from this generator. In the United States, ISBNs are issued by the U.S. ISBN Agency and ISSNs by the U.S. ISSN Center at the Library of Congress, which says it does not provide barcodes to publishers. Once you have the number, enter it here.
Why does my barcode not scan?
Look at the print checks first. The usual causes are colors a red-light scanner cannot see, missing quiet zones, modules too narrow for the printer, short bars, or an image that was stretched after downloading. Run the scan test after each change.
What does the scan test check?
It draws the barcode the way it will be downloaded and reads it with ZXing, an independent decoder, then compares what it read with what you entered. A printed barcode can still fail if the printer or paper spreads the ink, so test a printed copy too.
Can I make many barcodes at once?
Yes, up to 1,000. Paste a list or set up a numbered sequence with a prefix, start, step and number of digits. Save them as a ZIP of files, or as a PDF label sheet for US Letter or A4.
Is my data sent anywhere?
No. Barcodes, files and label sheets are made in your browser, and nothing you type is uploaded.
Sources
- Barcoding Guidelines for the U.S. Book IndustryBook Industry Study Group · retrieved Nov 13, 2026
- International Standard Serial Number (ISSN) Bar Codes for SerialsU.S. ISSN Center, Library of Congress · retrieved Nov 13, 2026
- ZXing ("Zebra Crossing") barcode scanning libraryZXing project · retrieved Nov 13, 2026
About these results
- Barcodes are made in your browser. What you type is not sent to ObjectiveLine.
- This generator makes barcodes; it does not issue product numbers, ISBNs or ISSNs.
- Print checks are guidance. Always scan a printed barcode with the scanner that will read it before printing many.