Batch barcodes & label printing

Generate Code 128/39/93, EAN, UPC, ITF and Codabar, then export images or label PDFs in batches.

  • Runs locally
  • Free

Use the tool

Your files are processed in your browser and are not uploaded to a server.

About this tool

Generate Code 128, Code 39/93, EAN-13/8, UPC-A/E, ITF-14 and Codabar barcodes in bulk, with check digits calculated or validated, then export PNG/SVG images or A4 label PDFs.

Typical uses

  • Print barcode labels for products or inventory
  • Create Code 128 barcodes for shipping documents
  • Check whether an EAN-13 check digit is correct

How to use

  1. Choose Code 128/39/93, EAN-13/8, UPC-A/E, ITF/ITF-14 or Codabar. Enter one value per line or import UTF-8 CSV/TSV and map values, names, filenames and copy counts.

  2. Check format-specific rules, the WeChat scan result type and all validation results. Export SVG/PNG/ZIP or A4 label PDF; print at actual size (100%) and test on the target device.

Good to know

Up to 1 MB, 300 records, 50 columns and 300 printed labels; fix every invalid record. Code 39/93 are never silently uppercased. EAN, UPC and ITF-14 check digits are completed or validated. Scanned Codabar results may omit start/stop guards; verify the target device. Quiet zones are 12 modules per side and PDF bars at least 0.25 mm. Unsupported caption glyphs prompt changes or disabling captions. Covers common WeChat one-dimensional barcodes, not every special symbology; generation does not register product numbers or create WeChat mini program codes. Presets store options only.

What each of the ten formats accepts

“Barcode format” sets the input rules, and the tool never rewrites your value: lowercase is not uppercased, short numbers are not zero-padded, and a wrong check digit is an error rather than a silent fix. “Example” below is what the Load example button inserts, “Encoded” is what is actually drawn, and “Modules” is the number of narrowest bar/space units computed by JsBarcode, plus 12 quiet-zone modules on each side.

FormatAccepted inputExampleEncodedModules
Code 1281–128 printable ASCII characters (space to ~); leading and trailing spaces keptDOC80-12345DOC80-12345145 + 24
Code 39Uppercase A–Z, digits, space and - . $ / + %, up to 128; no check character addedDOC80-12345DOC80-12345208 + 24
Code 93Same character set as Code 39DOC80-12345DOC80-12345136 + 24
EAN-1312 digits (check digit added) or 13 (check digit verified)590123412345590123412345795 + 24
EAN-87 or 8 digits96385079638507467 + 24
UPC-A11 or 12 digits; leading zeroes kept0360002914503600029145295 + 24
UPC-E6 digits (prefix 0 assumed) or 8 digits starting with 0/1; 7 digits always rejected4252610425261451 + 24
ITF6–128 digits, even count; no check digit added1234567890123456789099 + 24
ITF-1413 or 14 digits100123456789010012345678902135 + 24
CodabarStarts and ends with A–D, digits or - $ : / . + inside; uppercase onlyA123456AA123456A81 + 24

The same content can differ a lot in width. Code 128 uses JsBarcode’s automatic mode, which packs runs of digits two per symbol: 20 digits take 145 modules, exactly as many as the 11-character DOC80-12345 (145), while the same 20 digits in Code 39 need 352. Unless a partner specifies a format, Code 128 is the compact choice for internal IDs.

Check digits: the calculation, UPC-E expansion and common errors

EAN-13, EAN-8, UPC-A, UPC-E and ITF-14 use the same check digit method: starting from the rightmost digit, multiply by 3, 1, 3, 1 … , add everything up, and take the distance to the next multiple of ten. For 590123412345 the weights from left to right are 1 3 1 3 1 3 1 3 1 3 1 3, the weighted sum is 83, and the check digit is (10 − 83 mod 10) mod 10 = 7, giving 5901234123457.

  • Typing the 13 digits 5901234123458 shows “Incorrect check digit; expected 7”, so the message tells you the correct last digit.
  • Typing only 11 digits (59012341234) is a length error: “The number of digits does not match this format. Check the format instructions below.”
  • The six UPC-E digits 425261 get prefix 0, and the check digit is computed on the expanded UPC-A body, giving 04252614. The matching UPC-A 04210000526 completes to 042100005264, with the same check digit. Seven digits such as 0425261 could mean prefix + payload or payload + check digit, so the tool refuses to guess.
  • ITF-14 1001234567890 completes to 10012345678902. Plain ITF adds no check digit, and an odd count such as 12345 needs a leading zero that you add yourself.
  • Drawing an EAN or UPC does not allocate or register a product number; retail numbers come from GS1.

Print size: module width and the 0.25 mm floor

In the PDF the whole barcode, quiet zones included, is exactly “Barcode width incl. quiet zones (mm)” wide, so one module = barcode width ÷ (modules + 24). Below 0.25 mm the label PDF is refused with “Bars would be too narrow (minimum 0.25 mm). Increase barcode width or shorten the value.”. The three preset buttons give these grids on portrait A4 (switching the default label to landscape gives 2 × 4):

LabelColumns × rowsBarcode width × heightMax modules
90 × 40 mm2 × 6 = 1276 × 18 mm280
60 × 32 mm3 × 8 = 2452 × 14 mm184
190 × 45 mm1 × 5 = 5170 × 22 mm656
ValueModules76 mm52 mm170 mm
Code 128: DOC80-123451450.45 mm0.308 mm1.006 mm
Code 128: 123456789012345678901450.45 mm0.308 mm1.006 mm
Code 39: 123456789012345678903520.202 mm (too thin)0.138 mm (too thin)0.452 mm
Code 128: https://example.com/p/123453210.22 mm (too thin)0.151 mm (too thin)0.493 mm
EAN-13: 5901234123457950.639 mm0.437 mm1.429 mm

At the default 76 mm a Code 128 holds at most 44 digits (an odd count needs an extra code-set switch, so 43 digits do not fit) or 22 uppercase letters. A URL is too dense for the 52 mm labels; use the 190 × 45 mm strip preset, or put only the ID in the barcode and the URL in a QR code. Print at actual size / 100% and scan a plain-paper test print first.

CSV batches: record numbers, copies and file names

Choose CSV / TSV, tick “First row is a header”, then map “Value column”, “Printed name column”, “Filename column” and “Copies column”. This file, processed as Code 39:

CSV line
sku,name,file,copies
A-001,Bolt M4,,2
(blank line)
A-001,Bolt M4 spare,bolt,1
a-002,Washer,,1
A-003,"Nut, M4",nut,0
RecordValuePrinted namePNG fileLabels
1A-001Bolt M4barcode-1.png2
2A-001Bolt M4 sparebolt.png1
  • Record numbers are not spreadsheet row numbers: the header is not counted and blank lines are skipped. Lowercase a-002 is record 3 and A-003 with 0 copies is record 4; they report “Code 39 / 93 accept uppercase letters, digits, spaces and - . $ / + %. Lowercase is not converted automatically.” and “Copies must be an integer from 1 to 100.”. While any error remains, all three export buttons stay disabled; invalid rows are never dropped quietly.
  • Labels = copies column × “Multiply copies per record”, and this only affects the PDF. SVG / PNG export produces one file per record, so the repeated A-001 still gives two files.
  • An empty cell in a mapped filename column falls back to “barcode-<record>”; with no filename column the barcode value is used. Names are NFKC-normalised, illegal characters and spaces become -, duplicates get -2, -3 (ignoring case) and Windows device names get a leading underscore: A-001, a-001, CON, an empty name and “箱 1/2” become A-001.svg, a-001-2.svg, _CON.svg, barcode-4.svg, 箱-1-2.svg.
  • “Create SVG / ZIP”, “Create PNG / ZIP” and “Create label PDF” are the three exports. One record downloads directly; several are zipped as doc80-barcodes-svg.zip or doc80-barcodes-png.zip, and the PDF is doc80-barcode-labels.pdf. PNG width = (modules + 24) × “Narrow bar (px)”, height = “Bar height (px)” + 24, plus 28 when the value is shown: with default settings DOC80-12345 is 338 × 152 px, or 124 px high without “Show encoded value”.

Error messages

MessageCause and fix
Code 128 requires 1–128 printable ASCII letters, digits or symbols.Code 128 input contains non-ASCII characters, full-width symbols or a line break, is longer than 128 characters, or is only spaces.
ITF requires 6–128 digits in even length. Zeroes are not added automatically.The digit count is odd or below 6. ITF never pads; add the leading 0 yourself.
Names may have up to 120 characters, with no line breaks or control characters.The printed name is longer than 120 characters or contains a line break, tab or other control character.
Output exceeds 50 MB. Use fewer records or smaller images.The SVG / PNG archive or the PDF would exceed 50 MB, typically a large PNG batch with a 4 px narrow bar.
The number of digits does not match this format. Check the format instructions below.EAN, UPC-A or ITF-14 input is neither the length without the check digit nor the length with it, or contains non-digits.
Incorrect check digit; expected The last digit does not match; the message ends with the correct one. A lost leading zero after copying from a spreadsheet is a common cause.
Code 39 / 93 accept uppercase letters, digits, spaces and - . $ / + %. Lowercase is not converted automatically.Code 39 / 93 input contains lowercase, accented or non-Latin letters, or symbols such as # and &. Uppercase it or switch to Code 128.
UPC-E needs 6 digits (prefix 0 by default), or 8 digits including prefix 0/1 and a valid check digit.UPC-E input has 7 digits, or 8 digits not starting with 0 or 1.
Codabar requires A–D start/end characters, with digits or - $ : / . + between them.The A–D start/stop characters are missing or written as lowercase a–d.
A selected column is missing in this record. Check mappings or supply the missing cells.A row has fewer cells than the mapped columns, e.g. the last copies cell and its delimiter are missing.
Copies must be an integer from 1 to 100.The copies cell is not an integer from 1 to 100 (0, blank and decimals fail).
Bars would be too narrow (minimum 0.25 mm). Increase barcode width or shorten the value.One value would have modules under 0.25 mm at the current width. Widen “Barcode width incl. quiet zones (mm)” or shorten the value.
More than 300 labels. Reduce the records or copies.The labels of all records add up to more than 300.
Labels do not fit on A4, or the starting slot exceeds page capacity.Labels plus margins do not fit on A4, there would be more than 150 per page, or the first-sheet starting slot is beyond the page.
The barcode or text does not fit. Increase label size or reduce content dimensions.The barcode is wider than label width − 6 mm, or bars plus value and name text are taller than label height − 4 mm.
Choose dark bars with sufficient contrast against white.The bar colour is too light (relative luminance above 0.15) to contrast with white.
Correct every invalid record first. Invalid rows are never silently skipped.Errors are still listed; fix them before exporting.

Input or file up to 1 MB, 300 records, 50 CSV columns; each export up to 50 MB. Presets store settings only, never values.

Sources

Frequently asked questions

Does generating a barcode register a product number?

No. The tool only draws barcodes; retail product numbers must be obtained from a numbering organization such as GS1.

Why is my value marked invalid?

EAN, UPC and ITF-14 have fixed lengths and check digits, and Code 39/93 restrict characters. Fix every invalid record before exporting.

What if the printed barcode does not scan?

Print at actual size, keep bars at least 0.25 mm wide with clear quiet zones, and test with the target scanner.