Done
Free · Runs in your browser · No sign-up

Barcode Maker

Generate 12 barcode formats in your browser — Code128, EAN-13, UPC-A, Code39, ITF-14, MSI, Pharmacode, Codabar, and more. Customise size, colors, and text; download as SVG for print or PNG for digital use.

Last reviewed: August 24, 2026 By Khalil Rahman 100% browser-based
Barcode Generator
Try a sample:
Enter barcode data to preview
Customise Appearance
Format Guide
Code128 The most versatile 1D barcode. Encodes any ASCII character, making it ideal for internal SKUs, tracking numbers, and any alphanumeric content.

SVG export — vector, scales to any print size

Powered by JsBarcode — widely used open-source library

No uploads — generation runs entirely in your browser

Quick Tips
EAN-13 & UPC-A require 12–13 (or 11–12) digits. The final checksum is calculated automatically.
ITF-14 needs exactly 14 digits — used for shipping cartons. Add a leading zero if your GTIN is 13 digits.
For print use the SVG export — it stays crisp at any size.
Before you print
Test-scan first. Print one sample and scan it with a real scanner before printing a full run of labels. Small size, low contrast, or a trimmed quiet zone can all prevent scanning.
Privacy First

All barcodes are generated locally in your browser. Your data is never uploaded, logged, or transmitted to any server. The only third-party requests are the JsBarcode and Bootstrap Icons files, loaded from a public CDN.

Getting started

How to make a barcode

Pick a format

Use Code128 for general text and internal SKUs, EAN-13 or UPC-A for retail products, or ITF-14 for shipping cartons.

Enter your data

The barcode updates live as you type, and the tool validates length and character set for the selected format.

Download

Use SVG for print (scales to any size) or PNG for digital use. Test-scan before any mass print run.

What is a barcode, and how does it work?

A barcode is a machine-readable pattern of black bars and white spaces. A scanner shines a light at the pattern, reads the reflected light, and translates the bar widths into a string of characters. The result is a fast, error-resistant way to identify a product, a parcel, a document, or an internal asset without typing anything.

Almost all retail barcodes are 1D — the bars encode the data horizontally, and the height is only there so the scanner can find the bars. 2D barcodes (like QR codes) encode data in both dimensions and can hold far more information, but they are a different technology and are not generated by this tool. This page focuses on 1D barcodes because that is what retailers, shippers, and warehouses standardise on.

What each format is actually for

The most common mistake is picking a format because it looks familiar, rather than because it is what the receiving system expects. Here is a quick decision guide:

FormatBest forData rules
Code128Internal SKUs, tracking numbers, asset tags, shipping labelsAny ASCII character, variable length
EAN-13Retail products worldwide (except USA/Canada)13 digits (the last is a checksum)
EAN-8Small retail items — confectionery, cigarettes, tiny packaging8 digits
UPC-ARetail products in USA and Canada12 digits
Code39Automotive, defense, healthcare — legacy systemsA–Z, 0–9, and a few symbols
ITF-14Shipping cartons, pallets, GS1 logisticsExactly 14 digits
MSIInventory and shelf labelsNumeric only
PharmacodePharmaceutical packaging verificationNumber between 3 and 131070
CodabarLibraries, blood banks, courier servicesDigits and a few symbols

You cannot sell retail products with a barcode you generated yourself

This is the single most important thing on this page, and most "free barcode generator" sites bury it.

To sell products in a physical store or on Amazon, the barcode number itself must be registered with GS1 — the global standards body that manages product numbers. Registering with GS1 gets you a company prefix, which guarantees that every product code you use is unique across the entire world. A barcode image generated by a tool without a registered prefix will scan, but it is not a valid retail barcode and marketplaces, distributors, and retailers will reject it.

What this tool is genuinely good for:

  • Rendering a number you have already registered with GS1 into an EAN-13 or UPC-A image.
  • Internal barcodes for your own inventory, assets, documents, or warehouse — where a GS1 prefix is not required.
  • Prototyping packaging designs before you commit to a print run.
  • ITF-14 shipping labels on cartons you already use registered GTINs for.

If you are starting from zero, the correct sequence is: register with GS1 → receive your company prefix → allocate a GTIN → come back here to render the barcode image. Skipping the first two steps will save you nothing and cost you a lot when you try to list the product anywhere.

Print checklist — will your barcode actually scan?

Generating a barcode is only half of the problem. The other half is producing a label that a scanner will actually read. Follow these rules before you mass-print:

  • Contrast matters more than color. Dark bars on a light background. Black on white is the safest choice. Some scanners can read low-contrast labels, but many cannot — do not gamble on it.
  • Leave a quiet zone. At least 10× the narrow bar width on the left and right of the barcode. If your design trims that margin off, many scanners will fail to detect the barcode at all.
  • Print at 300 DPI or higher. Below 300 DPI, thin bars can blur into each other and the scanner reads the wrong character.
  • Do not stretch non-uniformly. If you resize the barcode to fit a design, scale it proportionally. Squashing it horizontally changes the bar widths and breaks it.
  • Use SVG for print. PNG is fine for digital use, but SVG is a vector format and stays crisp at any print size.
  • Test-scan a real sample. Every time. Even if the digital preview looks perfect, print one label and scan it with an actual scanner before you send the file to a printer.

Khalil Rahman

Full-stack developer and founder of SkillsInsider. I have printed more barcode labels than I would like to admit, and the ones that failed were almost always a contrast, quiet-zone, or DPI problem — never a problem with the barcode pattern itself. If a barcode you generated here does not scan after printing, send me a note with what you printed and I will help debug it.

Support

Frequently asked questions

Yes. The tool is free with unlimited generation and downloads. No account, watermark, or credit card required. The barcode library (JsBarcode) loads from a public CDN, and the rest of the page runs entirely in your browser.

Code128 (A, B, C variants), EAN-13, EAN-8, UPC-A, Code39, ITF-14, MSI, Pharmacode, and Codabar — twelve formats total. Each one enforces its own character set and length rules, and the tool will show a specific error when the input does not fit.

Not directly for retail. To sell in stores or on Amazon, you need a real GS1 company prefix so your barcode is registered and unique worldwide. Register at gs1.org (or your country's GS1 branch), receive your prefix, then use this tool to render your registered number as an EAN-13 or UPC-A image. Barcodes generated without a GS1 prefix may work technically but are not valid for retail and can be rejected by marketplaces and retailers.

Four rules: keep the bars black on a white background (contrast matters), leave a quiet zone of at least 10× the narrow bar width on both sides of the barcode, print at 300 DPI or higher, and do not stretch the barcode non-uniformly. Use the SVG export for print rather than PNG, since SVG scales without loss. Always test-scan a printed sample with a real scanner before you commit to a full print run.

EAN-13 is 13 digits and is used for retail products worldwide. UPC-A is 12 digits and is used in the USA and Canada. Modern scanners read both. If you sell worldwide, use EAN-13; if you only sell in the US and Canada, UPC-A is fine. Amazon accepts both.

EAN-13 requires either 12 digits (the tool calculates the 13th checksum digit for you) or a full 13-digit number (the tool validates the checksum). Any letter, space, or symbol will trigger an error. If your value has 13 digits but the checksum is wrong, the tool will reject it — recalculate the checksum or enter only the first 12 digits.

The most common causes: the barcode was printed too small (bars less than 0.25mm), the background is not white, the bar color is not dark enough, the quiet zone was trimmed off during layout, or the barcode was stretched non-uniformly. Try downloading the SVG, printing at 300 DPI or higher, and keeping the barcode at least 30mm wide for retail EAN-13.

No. Barcode generation runs entirely in your browser using JavaScript and the JsBarcode library. Your data is never uploaded, logged, or transmitted. The only network requests after page load are the JsBarcode and Bootstrap Icons files from CDN, and — if you accept the cookie banner — Google Analytics, which sees the page visit but never the data you type.

Code128 is denser and encodes the full ASCII set, so it produces a smaller barcode for the same data. Code39 is older, larger, and only encodes A–Z, 0–9, and a few symbols — but it remains standard in automotive, defense, and some healthcare contexts because older scanners required it. For new projects, use Code128 unless you have a specific reason to use Code39.

The quiet zone is the blank margin on the left and right of the bars. Scanners use it to detect where the barcode starts and ends. The rule of thumb is 10× the narrow bar width on both sides — for a standard retail barcode at typical width, that is about 3mm of blank space on each side. If your design trims the quiet zone (for example, because the barcode goes edge-to-edge on a label), many scanners will fail to read it.

⚡ More tools

You might also need