How I Built a Free Barcode Generator for the Browser
I built the free Barcode Generator on ToolsOfWeb to solve a small, annoying problem: every online barcode maker I tried either forced a sign-up, watermarked the download, or sent my product codes to a server. So I built one that runs entirely in your browser — type a code, pick a format, and download a clean PNG or SVG, with nothing leaving your device.
The tool covers the formats small shops and sellers actually need — Code 128, Code 39, EAN-13, EAN-8, UPC-A and ITF — plus batch mode for making many barcodes at once. This is how it was built, and why each decision was made the way it was.
Try the free Barcode Generator
Use ToolsOfWeb's Barcode Generator to make a free barcode for products, stock, parcels or price tags — no sign-up, no watermark, in your browser.
Why build a barcode generator that runs in the browser?
Because a barcode usually encodes something private: your product SKUs, order numbers or stock codes. A server-side generator receives all of that. A browser-side generator never sends it anywhere, works the moment the page loads, and answers instantly because there is no round trip to a server. Privacy is the feature here, not a bonus.
There was a second reason: cost. A tool with no server work behind it costs almost nothing to run, which is why it can stay free and unlimited. No account system, no database, no per-barcode fee — just a page that does its job and gets out of the way. Small sellers printing their first labels should not need a subscription for that.
How does a barcode actually store data?
A barcode is binary drawn as stripes. Each bar and gap has a width, and the pattern of widths encodes digits or letters. A scanner shines light across the stripes, reads the light and dark pattern, and decodes it back into characters. The bars hold the code itself; the price lives in the shop's database, not in the bars.
The idea is older than most people expect. On June 26, 1974, a pack of Wrigley's Juicy Fruit chewing gum became the first product scanned at a supermarket checkout, at a Marsh store in Troy, Ohio (source: Smithsonian Magazine's history of the barcode, corroborated by GS1 US). Fifty years later the same principle runs warehouses, parcels and shop tills — only the scanners got smaller. For a gentler introduction to the tool itself, see the free barcode generator guide.
How do you turn typed text into bars and spaces?
The tool uses JsBarcode, an open-source library that takes your text and a format and returns the exact bar pattern, including the check digit most formats require. Before drawing anything, the tool validates your input and explains problems in plain words: EAN-13 needs 12 or 13 digits, ITF needs an even digit count, and Pharmacode only accepts numbers in a fixed range. A broken input produces a clear message, never a broken code.
That validation step matters more than it sounds. A barcode that looks fine but encodes the wrong digits fails at the till, and the failure shows up in front of a customer. Check digits exist to catch exactly that: a final digit calculated from the rest, so a single mistyped digit makes the whole code invalid instead of silently wrong. The tool adds or checks that digit for you, so what you print is what the scanner will read.
Why does the generator offer so many barcode formats?
Because different jobs need different codes, and picking the wrong format produces a code a scanner rejects. Code 128 is the all-rounder for labels, stock and parcels because it handles letters and numbers. EAN-13 and UPC-A are the retail shelf codes printed on packaged goods. Code 39 suits simple internal warehouse labels, and ITF fits outer cartons. The tool lists each format with its rules, so you choose by job instead of by guesswork.
If you need more data than a one-dimensional barcode can hold — a link, a Wi-Fi password or a full contact card — that is the point where a two-dimensional code takes over, and the QR Code Generator covers that job instead. One-dimensional barcodes stay best at what they were designed for: short identifiers read fast, at a distance, by cheap scanners.
How does the barcode get drawn on screen?
The live preview is an SVG, which stays sharp at any size, and downloads come as SVG for print or PNG for documents — both generated on your device. PNG export draws the same barcode onto a canvas and saves it, so the downloaded file matches the preview exactly, with no watermark added. You can also set the bar width, height and label text before downloading, so the file fits your label sheet instead of the other way round.
Batch mode was added for the same reason: sellers rarely need one barcode. Paste a list of codes and download each barcode as its own PNG or SVG file, ready to drop into a label template. Everything still happens locally, so a list of a hundred SKUs is no slower and no less private than a single code.
What makes a barcode actually scan first time?
Contrast, size and a quiet zone. Print black bars on white, keep the code big enough for the distance the scanner will read it from, and leave a blank margin around all four sides — scanners need that empty border to find the edges of the code. A barcode squeezed against other text, or printed too small for its scanner, fails no matter how correct the digits are.
Test before you print a batch. Scan the code with a phone camera or a handheld scanner, at the distance people will actually use, and on the material it will live on — a code that scans perfectly on screen can fail on glossy labels or curved packaging. If the artwork needs resizing for a label sheet first, the Image Resizer handles that step without re-encoding anything.
What did I leave out on purpose?
Accounts, uploads and a product database. A barcode generator does not need any of them, so the tool has none: no sign-up, no server copy of your codes, and no record of what you generate. What you type stays in your browser tab and disappears when you close it. Leaving features out is a design decision, not a missing piece.
The same honesty applies to the limits. This tool draws the bars; it does not register a retail number with GS1, and it cannot look up what product a barcode belongs to — that lookup lives in the retailer's own system. A free tool earns trust by doing one job properly and saying plainly where that job ends.
FAQs
Yes. You can generate unlimited barcodes without signing up, and every download is clean — no watermark, no logo, no expiry. The tool is free because it runs in your browser, so there is no server cost behind each barcode you make.
For general labels, stock and parcels, use Code 128 — it handles letters and numbers and is the safest default. For products sold in shops, use EAN-13 or UPC-A, the retail shelf formats. For simple internal warehouse labels, Code 39 is enough. The generator shows the rules for each format before you print.
No. Everything happens in your browser tab: the encoding, the preview and the download. Your product codes, SKUs and order numbers never leave your device, and closing the tab clears them. That is the whole point of building it this way.
Yes — download the SVG version for print, because it stays sharp at any size, and test-scan one label before printing a full batch. One honest caveat: if you sell through major retailers, your EAN or UPC numbers themselves must come from GS1; a generator draws the bars, it does not register the number.
Try the free Barcode Generator
Open the Barcode Generator and make a free barcode for products, stock, parcels or price tags — no sign-up, no watermark, in your browser.
