Barcode Generator

Free barcode generator for Code 128, Code 39, EAN-13, EAN-8 and UPC-A. Auto-calculated check digits, SVG and PNG download, batch mode — everything runs in your browser.

FreeToolHQ-42

Runs entirely in your browser — the data you encode is never uploaded. Only your display options are saved locally.

Which barcode symbology should I use?

SymbologyBest forEncodesCheck digit
Code 128Shipping labels, logistics, internal SKUs/asset tagsAny ASCII text, most compactBuilt in (mod 103), always added
Code 39Inventory, asset tags, older industrial scannersA–Z, 0–9, - . $ / + % and spaceOptional (mod 43)
EAN-13Retail products sold internationally13 digitsRequired (mod 10)
EAN-8Small retail packaging with little label space8 digitsRequired (mod 10)
UPC-ARetail products sold in the US/Canada12 digitsRequired (mod 10)

Need a UPC/EAN specifically, with the check-digit math spelled out and a GS1 explainer? See the UPC generator.

Barcode generator examples

SymbologyYou typeEncoded asModules
Code 128SKU-48291SKU-48291134
Code 39 (with check character)BIN-42BIN-428143
EAN-13400638133393 (12 digits)400638133393195

Using barcodes for Shopify, Etsy and other marketplaces

Shopify's product editor has a "Barcode (ISBN, UPC, GTIN, etc.)" field. It stores a number — Shopify does not print or design the barcode graphic for you. Two situations:

  • Selling at retail, or a marketplace that validates the number (matches it to a real product registry): the number must be a genuine GS1-issued UPC/EAN. Making one up will pass basic checksum validation but is not a real product identifier — see the disclaimer above and the UPC generator's GS1 explainer.
  • Internal use only (your own warehouse, pick lists, inventory scans, Etsy where a real UPC isn't required): any Code 128 barcode with a SKU you choose works fine, and doesn't need to be issued by anyone.

Printing barcodes that actually scan

  • Keep the quiet zone — the blank margin the tool adds on both sides by default (10 modules for Code 128/39, 9 for EAN-13/UPC-A, 7 for EAN-8). Cropping it off is the most common reason a printed barcode fails to scan.
  • Print at 100% scale. Don't let a print dialog's "fit to page" or "shrink to fit" option resize the barcode — that changes the bar width ratio scanners depend on.
  • High contrast, matte finish. Solid black bars on plain white or light card stock; avoid glossy laminate, colored backgrounds, or bars printed in anything but a dark, opaque color.
  • Minimum bar width. For laser or thermal label printers, keep the narrowest bar at least 0.010–0.013 in (0.25–0.33 mm) — thinner than that risks ink bleed merging bars together.
  • Test-scan before a full print run with the actual scanner (or phone camera app) you'll use in production, at the actual print size.

Frequently asked questions

Which barcode type should I use?

Selling a physical product at retail (in a store or on a marketplace that requires one): EAN-13 or UPC-A, and the number must come from GS1 if it needs to scan at a real point-of-sale system — see the UPC generator for that. Shipping labels, logistics, or your own internal SKU/asset/inventory tracking where you control both ends: Code 128 (most compact, encodes letters, numbers and symbols) or Code 39 (older, less dense, but very widely supported by older scanners and label printers).

Can I use this for Shopify or Etsy product barcodes?

Shopify's product "Barcode (ISBN, UPC, GTIN, etc.)" field accepts UPC, EAN, ISBN and other GTIN formats — generate one with the UPC/EAN options here (or the UPC generator) and paste the digits into that field; Shopify itself doesn't print the barcode graphic on the product, only stores the number. If you only need a barcode for your OWN warehouse or inventory system (not for retail point-of-sale scanning), Code 128 with any SKU you choose works and doesn't need to be issued by anyone — that's what the "SKU-48291" example above encodes.

Do I need to buy a UPC/EAN number to use this tool?

No — this tool draws the barcode and calculates check digits for any digits you provide; it doesn't issue or register numbers. If the barcode needs to work at a real retail checkout (be recognized as belonging to your product, not just scan as a valid number), the number itself must come from GS1 (gs1.org or gs1-us.info), which licenses company prefixes. A barcode built from a made-up number will scan and validate perfectly here and on most scanners, but it won't be YOUR product in any retailer's or marketplace's system.

What is a check digit, and does this tool calculate it?

Yes. EAN-13, EAN-8 and UPC-A each end in a check digit computed from the other digits (odd positions x3, even positions x1, summed, subtracted from the next multiple of 10) so a scanner can catch a misread digit. Leave it off and this tool calculates it — e.g. EAN-13 payload 400638133393 gets check digit 1, encoding as 4006381333931. Type the full number including a check digit and the tool verifies it, flagging it clearly if it's wrong instead of silently drawing an invalid barcode.

Why did my barcode not decode value change from what I typed?

For Code 39 with the check character enabled, the tool appends one extra character after your text (so what you typed is still there, plus a checksum). For EAN-13/EAN-8/UPC-A, if you typed the data digits without a check digit, the tool appends the correct one. Nothing else is changed. Lowercase Code 39 input is automatically uppercased, since Code 39 has no lowercase letters.

What size should I print a barcode?

Keep the "quiet zone" (blank margin on both sides, set above in modules) intact — scanners rely on it to know where the barcode starts and ends; 10 modules for Code 128/39, 9 for EAN-13/UPC-A, and 7 for EAN-8 are the specified minimums, already set as this tool's defaults. Print at 100% scale (don't let your printer "fit to page" shrink it), use a bar width of at least 1 module = 0.010–0.013 inch (0.25–0.33 mm) for laser/thermal printers, and keep contrast high: black bars on a plain white or light background — avoid textured, glossy or colored backgrounds that reduce scanner contrast.

Can I generate many barcodes at once?

Yes — turn on "Batch mode", paste one value per line, and every line becomes its own barcode with an individual SVG download button. This is useful for a run of sequential SKUs or serial numbers.

SVG or PNG — which should I download?

SVG is a vector format: it stays perfectly sharp at any print size and is the better choice for professional printing (label software, InDesign, most label printers). PNG is a fixed-resolution raster image — simpler to drop into a Word document, spreadsheet or basic image editor, but it can look blurry or pixelate if scaled up much larger than the size you exported. Use the PNG scale option (2x/4x/8x) to export at a higher resolution if you need a larger PNG.

Is my data uploaded anywhere?

No — every barcode is generated and rendered entirely in your browser using plain JavaScript. Nothing you type is sent to a server, logged, or stored anywhere except your own browser's local storage (and only your display settings — bar size, symbology, quiet zone — never the data you encoded).

Does this support ITF-14 or QR codes?

Not currently — this tool covers the five linear (1D) symbologies most requested for general-purpose and retail use: Code 128, Code 39, EAN-13, EAN-8 and UPC-A. QR codes are a 2D symbology with very different encoding; if you need one, look for a dedicated QR code generator.

This tool draws barcodes and calculates check digits from the data you provide; it does not issue GS1/UPC/EAN numbers. A barcode built from a number you made up will scan as a valid number but is not registered to your product at any retailer. Spotted a wrong result? Tell us. Last reviewed .