Barcode Generator

Generate 10+ barcode types: EAN-13, UPC-A, Code128, Code39, QR Code. Free PNG and SVG download.

✓ Free✓ No sign-up✓ Works in browser

Advertisement

Loading barcode engine...

Advertisement

How to Use This Tool

1

Enter Your Barcode Data

Enter the text or number to encode. For EAN-13 barcodes (retail products), enter a 12-digit number — the check digit is calculated automatically.

2

Select Barcode Type

Choose from 13 barcode types: Code 128, Code 39, EAN-13, EAN-8, UPC-A, UPC-E, ITF-14, and more.

3

Download Print-Ready Barcode

Download as PNG for digital use or PDF for print-ready output at the exact size your application requires.

Advertisement

Related Tools

Frequently Asked Questions

Which barcode type should I use?
Code 128: Most versatile, supports alphanumeric, used in shipping and logistics. EAN-13: Standard retail product barcode in Europe. UPC-A: Standard retail barcode in North America. Code 39: Older standard, used in automotive and defence industries.
What is the difference between a barcode and a QR code?
Traditional barcodes (1D) encode data as parallel lines and can only store numbers or limited text. QR codes (2D) store much more data in a grid pattern, including URLs, vCards, and long text.
Do I need a GS1 number for retail barcodes?
Yes. For official retail distribution (selling in stores), your EAN-13 or UPC-A barcode must use a GS1-registered company prefix. For internal tracking, any number can be used.
What size should my barcode be for retail packaging?
Retail barcodes should be at least 25×17mm at 100% magnification. Most retail scanners require barcodes to be no smaller than 80% of the standard size.

About Barcode Generator

Your warehouse just onboarded a new product line and needs 500 EAN-13 labels printed on Avery sheets by end of day, each encoding a unique GS1-assigned number. Or you are setting up an event check-in flow where guests scan a QR code linking to their unique registration URL. This generator produces EAN-13, UPC-A, Code 128, Code 39, ITF-14, and QR codes directly as SVG or PNG, with an honest check on the data you provide — EAN-13 and UPC-A have mandatory check-digit rules that our encoder enforces (enter 12 digits for EAN-13 and we compute the 13th), Code 128 has three sub-character sets (A, B, C) and we auto-select based on content, and QR codes have four error-correction levels (L/M/Q/H) with very different size-vs-robustness trade-offs. Batch mode accepts a CSV of values and renders one barcode per row into a single printable sheet, ready for laser printing and peeling.

When to use this tool

Generating retail EAN-13 codes for a small brand launch

A small food brand with a GS1 prefix just assigned 20 product SKUs. Enter each 12-digit product number, the check digit computes automatically, and the EAN-13 PNG at 300 DPI prints onto standard label stock that supermarket scanners read reliably. Each code must be unique and tied to a single SKU in your GS1 records.

Printing Code 128 labels for internal asset tracking

IT needs to label 200 laptops with serial numbers so a handheld scanner can log check-in and check-out. Code 128 handles alphanumeric content (unlike UPC-A which is digits-only) and packs tight — a 12-character serial fits in a label about 50mm wide. Print on a Brother QL printer for adhesive backing.

Generating a QR code that links to a registration page

An event badge includes a QR code with each attendee's unique check-in URL. Use error-correction level M (15% recovery) so a scratched badge still scans; include a logo overlay in the center if the level is Q or H (25–30% recovery, leaves room for a 200x200 logo in the center of a 1000x1000 code). Batch-generate from the attendee CSV.

Creating ITF-14 case labels for shipping

Shipping cartons in the retail supply chain use ITF-14 (14-digit Interleaved 2 of 5) to encode the Global Trade Item Number. The check digit is the 14th and our encoder computes it; the printed barcode is typically 32.5mm tall with bearer bars top and bottom to prevent mis-scans. Print on 100mm labels for the carton side.

Embedding WiFi credentials on a printable poster

A cafe wants guests to scan a QR code to join the WiFi without typing the password. Encode the WIFI: prefix format (e.g., WIFI:T:WPA;S:CafeGuest;P:Croissant2026;;) as a QR code at error-correction H so customer phones can read it from awkward angles on a laminated table-tent sign.

How it works

  1. 1

    Format-specific encoders per symbology

    Each barcode type has distinct encoding rules. EAN-13 and UPC-A use GS1 tables with a mandatory check digit computed as a modulo-10 weighted sum. Code 128 has three character subsets (A: control chars, B: ASCII, C: digit pairs) and can switch mid-code; our encoder auto-selects subsets to minimize bar width. Code 39 is simpler (43-character uppercase alphabet plus symbols) but generates 2–3x wider codes for the same payload. QR uses Reed-Solomon error correction and an elaborate matrix layout with finder patterns in three corners.

  2. 2

    SVG primary, PNG rasterized via canvas

    All barcodes render as SVG first — vector graphics are lossless and scale to any print size without pixelation. For downstream tools that require raster (some label-printer drivers, image-embed workflows) we render the SVG to a canvas and export PNG at the requested DPI. 300 DPI is standard for most label printers; 600 DPI for small codes or high-density 2D symbologies where each module needs to be several pixels wide for reliable scanning.

  3. 3

    QR error-correction levels trade size for robustness

    QR codes support four error-correction levels defined by the QR spec: L (7% recovery), M (15%), Q (25%), H (30%). Higher correction means the code can still decode after more damage (scratches, stickers, logo overlays) but requires more modules, making the code physically larger for the same data payload. For posters or badges use M or Q; for logo-embedded branded QR use H (logo occupies up to 30% of the area without breaking decode). Pure-text digital use can use L safely.

Pro tips

EAN-13 and UPC-A are different lengths; do not use them interchangeably

UPC-A is 12 digits, used primarily in North America. EAN-13 is 13 digits (the thirteenth is a check digit), used globally including North America where it is supplanting UPC-A. UPC-A codes are valid EAN-13 codes with a leading zero — a UPC-A of 012345678905 equals EAN-13 of 0012345678905. Selling internationally? Use EAN-13 to avoid regional compatibility issues. Selling only in the US? Either works, but GS1 has been migrating everyone to EAN-13 for years, so starting with EAN-13 is the lower-risk choice.

QR codes for URLs should always use HTTPS

Printing a QR code with an http:// URL bakes the insecurity into a physical object that cannot be updated without reprinting. Browsers flag http URLs as insecure and modern phone scanners may warn the user before opening. Always use https and a URL you control (ideally a short dedicated domain like yourco.link/event rather than a 100-character analytics URL), so you can change the destination server-side later if needed. Using an unshortened ugly URL burns permanent real estate in the code and makes it physically larger than necessary.

Print at the right density for your scanner and use-case

Retail POS scanners (supermarket belts, handheld) want EAN-13 at the standard 37.29mm wide with 50% height-to-width ratio. Print too small and the laser cannot resolve individual bars; too large wastes label real estate. Industrial 2D scanners can read QR at very small sizes (down to 10mm at close range), but phone cameras need at least 20mm for reliable decode at arm's length, and 30mm+ for decode from across a room. Test with the actual scanners you will deploy before printing 10,000 labels at the wrong size.

Frequently asked questions

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

Different symbologies for different purposes. EAN-13 (European Article Number, 13 digits) is the global retail standard for consumer products, used in supermarket checkouts worldwide. UPC-A (Universal Product Code, 12 digits) is the older North American equivalent; UPC-A codes are valid EAN-13 with a leading zero. Both are numeric-only and require GS1-assigned prefixes for commercial use. Code 128 is a general-purpose alphanumeric barcode for internal logistics, asset tracking, and industrial applications where you control both ends of the supply chain and do not need GS1 registration. Choose retail symbologies for retail, Code 128 for internal use.

Do I need to register with GS1 to use EAN codes?

For commercial retail use, yes. Real retailers (Walmart, Amazon, Target, supermarkets) scan barcodes against the GS1 GTIN registry and will reject or flag products with codes not assigned through GS1's prefix allocation. The GS1 registration fee varies by country and volume (roughly US$250/year for a small company in the US, with tiered fees for larger prefix blocks). For internal use, demo/testing, or closed-loop applications where you control the scanners, you can generate and use any valid-format EAN code freely — but those codes will collide with real products and must not be sold through general retail channels.

Which QR error-correction level should I choose?

Depends on your physical context and data size. L (7% recovery) is for digital-only use (displayed on screens, fresh prints on clean paper) where no damage is expected; produces the smallest code for a given payload. M (15%) is the common default for print — handles minor smudges, scratches, and ink spread gracefully. Q (25%) for outdoor or high-wear contexts like event badges, stickers that may be partially covered, or anywhere dust/water exposure is likely. H (30%) specifically when you want to overlay a logo in the center — the QR can lose up to 30% of its modules and still decode, so the logo displaces error-correction bits not data bits. Larger correction means larger codes; pick the lowest that serves your reliability needs.

Can I embed a URL in a Code 128 or only in a QR code?

Technically Code 128 can encode any ASCII text including URLs, but it would produce an extremely wide 1D barcode (roughly 30mm per 5 characters of Code 128C or 20mm per 5 characters of Code 128B). A 50-character URL would be 200+mm wide, far too long for practical label application. Use Code 128 for short alphanumeric identifiers (5–20 characters) like serial numbers or internal asset tags. Use QR for URLs, WiFi credentials, vCards, or any payload longer than about 20 characters where you want a compact 2D code. 1D barcodes are for short identifiers; 2D codes are for data payloads.

Why do some of my printed barcodes fail to scan?

Print quality is the usual culprit. Common failure modes: inkjet printers bleed ink which merges thin bars (EAN-13 bars at small sizes can fuse together and lose the digit encoding); toner banding on a dying laser cartridge introduces gaps inside what should be solid bars; glossy paper produces glare that blinds the scanner laser; scaling a barcode in your page-layout tool with non-proportional scaling distorts the bar widths so the decoder sees invalid ratios; excessive compression when embedding the barcode as an image introduces JPEG artifacts that destroy the sharp edges. For production use: laser print at 600 DPI on matte label stock, keep barcodes as SVG or high-resolution PNG (no JPEG), and never scale non-proportionally.

Honest limitations

  • · Commercial retail use of EAN/UPC codes requires a GS1 company prefix and allocated SKU numbers — we do not assign or validate against GS1 authoritative registries; you must obtain the prefix from GS1 directly.
  • · Some industry-specific symbologies (GS1 DataMatrix with AI prefixes, PDF417 for shipping labels, Aztec for tickets) are not currently included; the generator covers the most common retail and general-purpose formats.
  • · Printed barcode scannability depends heavily on print quality and material — laser printing on matte label stock scans reliably; inkjet on glossy paper often produces bleeding bars that fail to read.

Barcode generation often complements a broader asset or inventory workflow. qr-code-generator is the specialized tool when you only need QR (this barcode generator covers QR as one format among many, but the dedicated QR tool has more WiFi, vCard, and event-specific templates). For customer-facing materials where the barcode ends up on a printed invoice, invoice-generator accepts the barcode PNG as an embed. resume-builder sometimes includes a QR code linking to an online portfolio. For retail packaging where you need the barcode on a folded or printed box design, image-converter helps resize and format the generated barcode for the print template.

Advertisement