Code 128 / EAN-13 / UPC-A / Code 39 — generate scannable 1D barcodes, export SVG or PNG, fully offline.
- Runs locally
- Category Generator
- Best for Starting from a blank page without committing to the first result.
Full ASCII, compact. Default for shipping & logistics.
What this tool does
A precise, fully client-side 1D barcode generator that implements the bar-and-space encoding itself — no external API, no upload, nothing leaves your browser. Four symbologies cover the overwhelming majority of real-world needs: Code 128 (compact full-ASCII, the default for shipping labels and internal SKUs), EAN-13 (the 13-digit retail standard used on products worldwide), UPC-A (the 12-digit North American retail code), and Code 39 (the rugged industrial code that reads A-Z, 0-9 and a handful of symbols without a checksum). For EAN-13 and UPC-A you can type just the data digits and the tool computes the mod-10 check digit for you, or paste the full code and it verifies and corrects the last digit. Every input is validated against the spec, so a wrong-length EAN or an out-of-charset Code 39 string gives you a clear error instead of a barcode no scanner will read. Render is true vector SVG: adjust the module (narrowest bar) width, bar height, foreground and quiet-zone colors, and toggle the human-readable text line underneath. Copy the SVG straight to your clipboard for Illustrator or InDesign, or download a crisp 3x PNG for slide decks and labels. The data and symbology live in the URL so a "share link" reproduces the exact barcode for a teammate; your style preferences are remembered locally between visits.
Tool details
- Input
- Files + Text + Numbers
- The page exposes text boxes, numeric controls, file pickers, or structured inputs depending on the tool.
- Output
- Live result + Copy + Download
- The result area focuses on usable output, with copy, download, or preview actions when supported.
- Privacy
- Browser-side processing
- The main tool logic does not call an external API, so inputs normally stay in the current tab.
- Save / share
- Shareable URL state
- Key settings are encoded in the URL so another person can reopen the same setup.
- Performance budget
- Initial JS <= 14 KB
- No WASM budget is declared, keeping the tool quick to open on mobile.
- Best fit
- Generator · Developer
- Category and role tags drive related tools, internal links, and quick fit checks.
How to use
-
1. Input
Paste or drop your content into the tool panel.
-
2. Process
Click the button. All processing is local in your browser.
-
3. Copy / Download
Copy the result or download to disk in one click.
How Barcode Generator fits into your work
Use it to get a strong first draft, starter asset, or structured output that you can edit before publishing.
Generation jobs
- Starting from a blank page without committing to the first result.
- Creating repeatable drafts, names, templates, or placeholder assets.
- Exploring options before choosing the one that fits the job.
Generation checks
- Review generated output before it reaches a customer, page, or document.
- Change defaults when you need a specific brand voice, format, or audience.
- Keep only the parts that match the real task.
Good next steps
These links move the current task into a more complete workflow.
- 1 QR Code Generator Generate QR codes from text, URL, WiFi or vCard — customize color and size, download as PNG or SVG. Open
- 2 UUID Generator Generate v4 random, v7 time-ordered, NIL, and Short UUIDs instantly — entirely in your browser. Open
- 3 Batch QR Code Decoder Drop a folder of QR images and get every decoded URL in one table — fast batch audit for packaging, posters, and print runs. Open
Real-world use cases
Inventory labels for a small warehouse
You're tagging 400 storage bins with internal IDs like BIN-A12-0033. Pick Code 128, type the ID, set bar width 2 px and height 60 px, turn the text line on so a human can read it if the scan fails. Copy the SVG into a label template in your label software (Brother P-touch, Dymo, or a sheet in InDesign), drop one per cell, and print on a 300 DPI label printer. Before the full run, print one bin label and scan it with the handheld you'll use on the floor — Code 128 is dense, so an under-resolved print is the usual failure, not the encoding.
Retail product barcode for a store listing
Your product needs an EAN-13 to go on a shelf. You already have the 12-digit number from your GS1 prefix (say 4006381333393). Pick EAN-13, paste the 12 digits, and the tool appends the check digit (…931) and shows the full 13-digit code split into the standard 1-6-6 groups under the bars. Export PNG at 3x for the packaging mock, or copy the SVG for the print-ready artwork at 100% of the nominal size. Hand the proof to your packaging vendor and have them verify it on a calibrated verifier, not just a phone.
UPC-A for a North American retail SKU
A US retailer asks for a UPC-A barcode on your unit carton. Take your 11-digit GTIN data (e.g. 03600029145), pick UPC-A, and the tool computes the 12th check digit (…2) automatically. The human-readable line prints in the UPC convention with the leading and trailing digits set slightly apart. Keep the symbol at 80-100% of nominal width and leave the quiet zones intact — the most common rejection at retail is a clipped left/right margin, not a bad code.
Event ticket / asset tag with a short code
You're printing 200 numbered passes (PASS-0001 … PASS-0200) and want a scannable code that maps to your check-in list. Use Code 39 for its simplicity and ruggedness, or Code 128 for tighter prints. Type each code, keep height around 50 px so it fits on a wristband or lanyard card, and turn on the readable text as a fallback for staff. Generate, screenshot/export, and drop into your ticket layout. Scan-test one against your check-in app before the batch.
Quick visual mock for a packaging design
A designer needs a placeholder barcode in a packaging comp before the real GS1 number is assigned. Pick EAN-13, type any 12 digits, let the tool add a valid check digit so the mock looks correct, set the colors to match the artwork (black bars on the package's base color rarely scan — keep bars dark on a light quiet zone). Copy the SVG into Figma or Illustrator. Flag clearly in the file that this is a placeholder so the real GTIN replaces it before production.
Common pitfalls
Printing the barcode too small or at low resolution so the narrowest bar collapses. Scanners read the relative width of bars; if the module is under about 0.33 mm in print, cheap scanners miss it. Export at 3x, target 300 DPI, and scan-test a real print before the run.
Clipping the quiet zone. The blank margin on each side of the code is part of the symbol — designers often crop it to "tighten" the layout, and then the barcode won't scan. Keep at least 10 modules of clear space left and right; this tool builds that margin in, so don't trim it.
Putting dark bars on a colored or dark background. Scanners need high contrast between bars and the quiet zone. Black bars on a light (ideally white) background is the safe default; reversed or low-contrast color combinations drop scan reliability sharply even when they look fine on screen.
Privacy
The encoding algorithms (Code 128 element table, EAN/UPC parity and mod-10 check digit, Code 39 9-element patterns) are plain JavaScript that runs entirely in your browser tab — no barcode data is ever sent to a server, logged, or used for analytics. One thing to know: the data and symbology are written into the shareable URL (e.g. ?type=ean13&data=...), so if you paste a "share link" into Slack or email, the destination server's access log will record that value. For a public product code that's fine; for a confidential internal SKU or an unreleased GTIN, copy the SVG/PNG manually instead of sharing the URL.
FAQ
Tool combos
Folks in your role tend to reach for these alongside this tool.
- 555 Timer Calculator Astable f = 1.44/((R1+2R2)C) + monostable t = 1.1RC — pick R1, R2, C in Ω/kΩ and µF/nF, read frequency, duty cycle and pulse width — browser-only
- Add Line Numbers Number every line of pasted text — set start, step and separator, zero-pad to align, skip blanks, or strip numbers back off — browser-only
- AES Text Encryptor Encrypt & decrypt text with a password — AES-256-GCM + PBKDF2 via WebCrypto — 100% in your browser, nothing uploaded
- Affine Cipher Encoder & Decoder Encrypt and decrypt the ax+b affine cipher with live modular-inverse check, browser-only