# Barcode Generator

> Barcode Generator creates scannable Code 128, EAN-13, UPC-A, and EAN-8 barcodes right in your browser. Enter numbers or product SKU codes to generate crisp vector SVG and pixel-perfect PNG downloads with automatic check digits, custom bar heights, integer module widths, and batch ZIP export. Processing runs locally with zero uploads, accounts, or watermarks.

**Canonical:** https://trydocsy.com/image/barcode-generator
**Last updated:** 2026-10-31
**Privacy:** Runs in your browser; the file is never uploaded.

---

Barcodes turn alphanumeric identifiers into machine-readable vertical bars that laser scanners and image sensors decode in milliseconds. TryDocsy Barcode Generator creates standard 1D barcodes for product tags, bin labels, logistics cartons, and internal asset tracking. Unlike online generators that rely on external server scripts or embed tracking parameters, all barcode encoding and image rendering execute inside your browser.

The tool supports the most common industrial and retail symbologies: Code 128 for alphanumeric inventory labels, EAN-13 for international retail products, UPC-A for North American point-of-sale items, and compact EAN-8 for small packaging. You can generate individual codes with real-time feedback or process up to 100 values in a single batch exported as a structured ZIP archive. To create matrix codes for website URLs or WiFi passwords instead, visit our [QR Code Generator](https://trydocsy.com/image/qr-generator).

## How it works

1. **Select your barcode symbology** — Choose Code 128 for general alphanumeric text and serial numbers, EAN-13 for global retail products, UPC-A for North American retail, or EAN-8 for compact packages.
2. **Enter your code value or paste lines** — Type your number in single mode or switch to batch mode to paste up to 100 values, one per line. For EAN and UPC codes, type 11 or 12 digits to let the tool compute the check digit automatically.
3. **Adjust bar height, module width, and colors** — Set bar height from 30 to 300 pixels and choose integer module widths from 1 to 6 pixels. Check the real-time contrast indicator to verify that your foreground and background colors scan reliably.
4. **Download SVG, PNG, or batch ZIP** — Download crisp vector SVG artwork for print packaging, export raster PNG files with exact pixel dimensions, or download all batch barcodes packaged into a single ZIP archive.

## When you'd use it

- **Warehouse inventory and bin storage labels** — Print durable Code 128 shelf stickers and pallet identifiers so warehouse operators can scan inventory items using handheld industrial barcode terminals.
- **Small business product packaging and labels** — Create crisp EAN-13 or UPC-A barcode images for retail packaging, merchandise tags, and box labels using your registered GS1 product numbering sequences.
- **Library books and equipment asset tags** — Generate unique sequential serial labels for office IT equipment, laboratory tools, and book collection management without uploading internal database keys.
- **Shipping manifests and carton tracking slips** — Produce batch barcode stickers for parcel dispatches and order packing slips by pasting order reference numbers directly into the multi-line batch encoder.

## Which barcode format should you select?

Code 128 is a high-density alphanumeric symbology defined by ISO/IEC 15417:2007. It encodes all 128 standard ASCII characters, including uppercase letters, lowercase letters, numbers, punctuation, and control symbols. Our encoder chooses between Subsets A, B, and C dynamically: runs of four or more consecutive digits are compressed into double-density numeric pairs in Subset C, keeping the final printed barcode as short as possible.

EAN-13 and UPC-A are linear retail symbologies governed by ISO/IEC 15420:2009. EAN-13 encodes 13 numeric digits and serves as the global standard for consumer products sold at supermarket checkout registers worldwide. UPC-A encodes 12 numeric digits and is primarily used across the United States and Canada. UPC-A is a mathematical subset of EAN-13 with a leading zero. For smaller items like cosmetic pens or chewing gum packets, EAN-8 provides an 8-digit compact alternative with shortened bar widths.

## Why do check digits and quiet zones matter for optical scanning?

A barcode that appears neat on screen can still fail under a physical scanner if quiet zones or check digits are omitted. Quiet zones are clear blank margins on the left and right sides of the symbol. Scanners rely on these blank spaces to detect the beginning and end of the bar pattern. Without them, nearby packaging text or graphic borders bleed into the scan line and corrupt the reading.

Both EAN and UPC barcodes require a mandatory Modulo 10 check digit at the final position. When you type 12 digits for EAN-13 or 11 digits for UPC-A, TryDocsy calculates this check digit for you using official GS1 weighting rules. If you paste a full-length code with a mismatched check digit, the tool alerts you with the correct digit rather than generating an unreadable barcode. To test whether existing image files scan properly, use our [QR Code Scanner](https://trydocsy.com/image/qr-scanner).

## Official GS1 registration limits for commercial retail sales

Generating an EAN-13 or UPC-A image does not give you a product number. It only draws the number you type. GS1 US says barcodes it issues uniquely identify a single retail product, and offers a Company Prefix or a single GTIN for that (checked 2026-10-31). If you sell through a retailer, ask which numbers it accepts before you print labels.

If you assign arbitrary numbers to retail goods without a GS1 license, store inventory systems may collide with existing commercial merchandise. For internal warehouse storage, membership cards, event ticketing, and office asset tags, you can assign custom numbering sequences freely using Code 128 without external registration.

## What we verified with automated tests on synthetic barcodes

We verify barcode generation using unit tests that compare rendered bar sequences against published ISO/IEC 15417:2007 and ISO/IEC 15420:2009 tables. In addition, our automated test suite decodes rendered barcode pixel grids using the independent ZXing open-source barcode reader library. Across Code 128, EAN-13, UPC-A, and EAN-8, 90 distinct test values decode with 100 percent accuracy.

Automated decoding tests run on synthetic raster bitmaps generated in Microsoft Edge 156 on Windows 11. Scanning printed physical labels with laser barcode wands and smartphone cameras has not been tested on paper for your specific printer model, so always print a sample test label and verify it with your hardware scanner before running large print batches.

*Automated independent decoding verification with ZXing, Microsoft Edge on Windows 11, 2026-10-31*

| Barcode Symbology | Standard Specification | Test Sample Count | Decoder Verification |
|---|---|---|---|
| Code 128 (Subsets A, B, C) | ISO/IEC 15417:2007 | 25 test values | 100% round-trip decode pass |
| EAN-13 (GS1 Modulo 10) | ISO/IEC 15420:2009 | 25 test values | 100% round-trip decode pass |
| UPC-A (GS1 Modulo 10) | ISO/IEC 15420:2009 | 25 test values | 100% round-trip decode pass |
| EAN-8 (Compact retail) | ISO/IEC 15420:2009 | 15 test values | 100% round-trip decode pass |
| Physical paper print scan | Hardware laser scanners | 0 printed sheets | Not tested on paper |

Source: [GS1 US: How to get a UPC barcode](https://www.gs1us.org/upcs-barcodes-prefixes/how-to-get-a-upc-barcode), checked 2026-10-31.

## Frequently asked questions

**Q: Can I use generated EAN-13 or UPC-A barcodes to sell products in retail stores?**
A: Only if the numbers are really yours to use, for example from GS1. This tool draws artwork for the number you type and registers nothing, so check what your retailer accepts first.

**Q: What is the difference between Code 128 subsets A, B, and C?**
A: Subset A encodes uppercase letters, numbers, punctuation, and control characters like tab and line feed. Subset B encodes standard uppercase, lowercase, numbers, and symbols. Subset C encodes pairs of numeric digits at double density. Our tool switches between subsets automatically to generate the shortest possible barcode.

**Q: Why does the tool show a check digit error when I type a 13-digit EAN code?**
A: The 13th digit of an EAN-13 barcode is a mathematical checksum calculated from the preceding 12 digits using the GS1 Modulo 10 algorithm. If you type a full code with an incorrect last digit, the tool shows the expected check digit so you can correct your inventory records.

**Q: Why must module width be a whole integer number of pixels?**
A: A barcode module represents the narrowest individual bar or space in the symbol. Fractional pixel widths like 1.5 pixels cause browser canvas rendering engines to anti-alias and blur bar edges, which prevents optical barcode scanners from detecting transitions cleanly.

**Q: Can optical laser barcode scanners read inverted or low-contrast barcodes?**
A: Standard laser barcode scanners project red light and measure light reflection, which requires dark bars on a light background. Light bars on a dark background or color combinations with contrast below 4.5:1 will fail on almost all handheld laser scanners.

**Q: How many barcodes can I generate at once in batch mode?**
A: You can paste up to 100 barcode values at a time, one per line. The tool validates every line individually, generates both SVG and PNG image assets, and packages all successful barcodes along with a summary manifest into a downloadable ZIP archive.

## Related tools

- [QR Code Generator](https://trydocsy.com/image/qr-generator)
- [QR Code Scanner](https://trydocsy.com/image/qr-scanner)
- [Image to Text (OCR)](https://trydocsy.com/image/ocr)
- [Compress Image](https://trydocsy.com/image/compress)

---

## About TryDocsy

TryDocsy is a free website of PDF, image and file-conversion tools that run entirely in your web browser, so your files are processed on your own device and never uploaded. It also includes photo and signature resizers preset to Indian government-exam specifications.

- Website: https://trydocsy.com
- Privacy Policy: https://trydocsy.com/privacy
- Terms of Service: https://trydocsy.com/terms
- Contact: https://trydocsy.com/contact
