Free Online Barcode Generator

🔒 Runs in your browser — nothing is sent to a server

Generate barcodes online for free in seconds — Code 128, EAN-13, EAN-8, UPC-A, Code 39, and ITF-14 formats are all supported. Fine-tune bar width, height, margin, rotation, and label font, or pick a Web / Print / Compact preset for instant results. Generate a single barcode or create a batch of up to 9 codes at once, then export each as PNG, SVG, or a ZIP archive. Everything runs 100% in your browser — your input is never uploaded or stored on our servers.

1. Select barcode type

2. Enter content and adjust style

Any text — e.g. Hello-123

Style

3px
100px
15px

3. Preview and download

No barcode yet — click Generate

Copied!
Copied!

Common use cases

Barcodes are everywhere: retail checkout (EAN-13 / UPC-A), shipping and logistics (Code 128, ITF-14 on shipping cartons), warehouse inventory, asset tagging for IT and office equipment, library books and archives (Code 39 is a legacy favourite), event tickets and gym access, lab sample tracking, and serialised internal part numbers. For any of these, Code 128 is typically the most efficient format unless you have a specific legacy or retail requirement.

Print quality tips

For a barcode to scan reliably when printed, keep three things in mind: resolution, bar width, and quiet zone. Print at 300 DPI or higher — lower DPI blurs the bars. Use a Bar width of at least 2 px (preferably 3) and do not shrink the printed barcode below about 80% of its generated size. Keep a generous Margin — scanners need empty space on both sides to locate the code. When in doubt, export SVG and scale it in your layout software rather than scaling a PNG, and always test-scan a printed sample before running a large print job.

FAQ

What is a barcode?

A barcode is a machine-readable representation of data, encoded as parallel bars of varying widths. 1D barcodes such as Code 128 or EAN-13 encode short strings and are used across retail, logistics, warehousing, libraries, and event tickets. First deployed commercially in the 1970s, barcodes remain one of the most reliable data-entry technologies in the world.

Which barcode type should I choose?

For products sold through retailers, use EAN-13 (or UPC-A in North America) and register the code with GS1 — see the commercial-use question below. For internal inventory, warehouse labels, asset tags, event tickets, or anything that does not need to scan at a retail till, Code 128 is almost always the right choice: it is compact, accepts any text or digits, and is readable by every modern scanner.

What is the difference between Code 128, EAN-13, and UPC?

EAN-13 and UPC-A are fixed-format retail barcodes that only encode digits and follow strict length rules (13 and 12 digits respectively). UPC is used primarily in North America, EAN almost everywhere else. Code 128, by contrast, is a general-purpose barcode that encodes any ASCII characters at variable length — the de facto standard for shipping labels, logistics, and internal inventory.

Can I use these barcodes for commercial products?

You can use any barcode generated here for internal use, asset tagging, packaging labels, and small-scale commerce. For products sold through retailers, however, EAN-13 and UPC-A codes must be officially allocated by GS1 (the global standards body for product identification) — an arbitrarily generated retail code will not be recognised at the till. Code 128 and other internal-use formats require no registration.

Why does my barcode say "invalid"?

Each barcode type has strict rules. EAN-13 requires exactly 12 or 13 digits, UPC-A requires 11 or 12, Code 39 only accepts uppercase letters, digits, and the characters "-. $/+%", and ITF-14 requires an even number of digits (13 or 14). The hint under the input shows the rules for the currently selected type. If your data does not match, the generator refuses to render an invalid code.

Can I generate multiple barcodes at once?

Yes. Switch to "Multiple codes" mode, paste a list of values (one per line), and the generator produces a separate barcode for each. You can preview every code individually, copy or download each one as PNG or SVG, or export the whole batch as a ZIP archive — useful for printing sheets of asset tags, ticket runs, or product labels.

Should I export my barcode as PNG or SVG?

Use SVG whenever possible. SVG is a vector format, so it scales to any print size without blurring and keeps bar edges razor-sharp — which is critical for scanners. PNG is a raster format — convenient for web or email, but loses fidelity when resized. For professional print runs, always choose SVG; for a quick on-screen mock-up, either works.

Will the generated barcode actually scan?

The underlying library (JsBarcode) is used in production worldwide and produces standards-compliant output. Real-world scanning also depends on physical factors: print resolution, bar width relative to scanner optics, quiet-zone margin, and lighting. For reliable printing we recommend bar width of at least 2 px (preferably 3) and generous margins. Always test-scan a printed sample with your target device before mass production.

Glossary

Code 128

A high-density, variable-length 1D barcode that can encode the full 128-character ASCII set (letters, digits, symbols). Introduced in 1981, Code 128 is the default choice for shipping labels, logistics, and internal inventory because of its compactness and flexibility. It automatically computes a modulo-103 check character for integrity.

EAN-13

The International Article Number — a 13-digit retail barcode used on consumer products almost everywhere outside North America. The first 2–3 digits identify the country/GS1 prefix, followed by the manufacturer code, the product code, and a single check digit. EAN-13 is a strict superset of UPC-A (a 12-digit UPC is an EAN-13 with a leading zero).

UPC-A

The Universal Product Code used primarily in the United States and Canada for retail products. UPC-A encodes exactly 12 digits: a GS1 company prefix, a product reference, and a check digit. Every UPC-A code has an equivalent EAN-13 representation (with a leading zero), so modern scanners read both interchangeably.

GS1

The non-profit standards organisation that administers global barcode numbering. To sell a product through retailers, brands must purchase a GS1 company prefix, which is then combined with product identifiers to form valid EAN-13 or UPC-A codes. GS1 prefixes ensure that every barcode on the planet resolves to a unique, traceable manufacturer.

Check digit

A calculated final digit that verifies the integrity of a barcode. For EAN-13 and UPC-A the check digit is derived by a weighted modulo-10 algorithm; scanners compute the expected value and compare it with the read digit. Mismatches indicate a corrupted read and prevent false positives. This generator computes check digits automatically when you supply 12 digits for EAN-13 or 11 for UPC-A.

Quiet zone

The mandatory clear margin on either side of a barcode with no printed content, bar, or text. Scanners use the quiet zone to isolate the barcode from surrounding artwork. The GS1 spec requires a quiet zone of at least 10× the narrowest bar width (the "X-dimension"). The Margin slider in this tool controls that zone directly — do not shrink it below 10 px for printed output.

Related tools