Home › Blog › Barcode generator
How to Generate a Barcode Online for Free
If you are wondering how to generate a barcode online for free, the honest answer is shorter than you expect: pick the symbology that matches your value, type the value once, export at print resolution, and protect the quiet zone around it. In one line: how to generate a barcode online for free comes down to symbology, resolution and margin, none of which need paid software or a font install. Everything after that is decoration, and most "barcode problems" people hit later are really one of those three things done casually.

What a barcode actually encodes
A linear barcode is not a picture of your number, it is a ruler: widths of bars and spaces stand for digits, plus a start pattern, a stop pattern and usually a check digit computed from the value itself. That is why a barcode that "looks right" can still fail a scanner: one wrong width, or a compressed quiet zone, and the pattern no longer decodes to what you typed.
This also explains the format rules you will meet. EAN-13 wants exactly 12 or 13 digits because it encodes retail GTINs. Code 128 accepts almost any keyboard text and compresses digits in pairs, which is why it is the default for internal labels, cartons, asset tags and courier IDs. QR is a different family entirely: a matrix that can hold URLs and long strings, readable from any angle.
Choosing a symbology without regret
- Internal IDs, mixed text and digits, variable length: Code 128. The safe default for anything you control end to end.
- Retail products sold through stores: EAN-13 (or UPC-A in North America), issued from GS1, not invented at home.
- URLs, Wi-Fi strings, menus, vCards: QR, because phones read matrices natively and linear codes cannot hold a link.
- Legacy Indian government or inventory specs sometimes name Code 39: wider, simpler, tolerant, but bulky; use it only when a spec demands it.
- Never mix: one label, one symbology, one value. A second barcode on the same label should earn its place.
If a portal or partner sent you a specification sheet, follow its named symbology exactly; scanners on their side are configured for it, and a prettier choice will simply not read.
Generating one in the browser, step by step
Open an in-browser barcode generator, choose the symbology, paste the value and watch the preview. Because the drawing happens on your device, nothing you type leaves the machine, which matters when the value is an internal order number, a patient reference or an unreleased SKU.
Export as SVG when the tool offers it: vectors scale to any print size without fuzz. If you must use PNG, export at least 300 DPI equivalent, meaning a bar module should be several pixels wide, never one. Generate the final file at the final size; stretching a small PNG in a label layout is the most common self-inflicted scan failure.
A barcode fails at print time, not at generate time. Export big, print exact.
Sizing, quiet zones and print reality
The quiet zone is the blank margin before the first bar and after the last one, typically ten times the narrowest module width. Layout tools love to pull artwork into that space; a logo kissing the bars is a decode failure waiting for a slightly dirty printer head.
Height matters more than people think: a linear code truncated to look elegant loses the redundancy scanners use when the label is scratched or curved. Keep the specified height, or at least 15 percent of the width for Code 128 in hand-scan use.
Then respect the substrate. On a glossy carton, dark-on-light with high contrast beats clever colour pairs; red bars on white read badly to some laser scanners because red reflects. Black on white remains the boring champion for a reason.
Checking it scans before it ships
Print one copy on the real printer, on the real material, at the real size, and scan it with the cheapest phone in the office plus the actual scanner model if you have one. Tilt it, curve it slightly, hold it at arm's length. Thirty seconds of this catches nine out of ten production surprises.
Keep a master sheet: value, symbology, export size and date, next to the artwork file. Six months later, when someone asks "which code was on the Diwali batch", the answer takes a glance instead of an archaeology dig. And when the same value needs a human-readable line under the bars, add it in the layout, never inside the encoded value.
For labels that also carry a photo or a logo, generate the code first, then compose the label around it so the quiet zone survives; pulling a finished barcode into a crowded template is where margins go to die. Pair it with a photo to text check when you also need the printed words machine-readable.
Frequently asked questions
Is Code 128 or EAN-13 right for my product?
EAN-13 only if the product carries a GS1-issued GTIN for retail. For anything internal, invoices, cartons, assets, Code 128 is the flexible, widely scanned choice.
Do I need to install fonts or paid software?
No. An in-browser generator draws the pattern from the value directly and exports PNG or SVG; fonts are only relevant if you typeset barcodes inside a design file.
Will a phone camera scan my printed barcode?
Yes, if modules are a few pixels wide at export, contrast is black on white, and the quiet zone is intact. Most failures come from stretching a small raster image.
We build and test free, in-browser PDF and image tools. Every guide is written from hands-on testing with real files, and updated whenever browsers or formats change.
Barcode Generator toolAll articles →Do it now, in your browser
Nothing is uploaded. The file is processed on your device and never leaves it.
Open Barcode Generator →