Generator · Free & no sign-up

Barcode Generator

Create a scannable barcode from any value — CODE128 for text, EAN-13 and UPC-A for retail — and download it as vector SVG or a print-ready PNG.

Advertisement

Any text for CODE128; digits only for EAN-13, EAN-8, UPC-A and ITF-14.

Retail formats validate length and calculate the check digit for you.

Pixels per narrow bar. 2 is standard on screen; 3 or more scans better in print.

Advertisement

About this tool

A one-dimensional barcode stores data in the widths of parallel bars, which is why a supermarket scanner can read a cereal box in a fraction of a second. This barcode generator renders nine common symbologies in your browser and exports them as SVG or PNG — no account, no watermark, no per-code charge.

Which format should you choose? CODE128 is the right default: it encodes the full printable ASCII set, packs tightly and is accepted by virtually every modern scanner. CODE39 is the older alphanumeric standard — uppercase letters, digits and a handful of symbols — kept alive by legacy inventory systems. EAN-13, EAN-8, UPC-A and ITF-14 are retail and carton formats that accept digits only. MSI and Codabar survive in warehousing and libraries, while Pharmacode is a niche format used on pharmaceutical packaging.

How to use it: type the value, choose a symbology, set the bar width and height, then press Generate barcode. The preview renders immediately, and a failure explains exactly what the format expects. Download SVG for print and design software, or PNG for documents and web use.

Check digits, handled: retail symbologies carry a final check digit computed from the preceding digits. For EAN-13 you can supply 12 digits and the generator adds the 13th; supply 13 and it verifies them. The same applies to EAN-8 (7 or 8), UPC-A (11 or 12) and ITF-14 (13 or 14). A wrong check digit is rejected with a clear message rather than silently printed, which is the failure mode that ruins print runs.

Worked example: EAN-13 for 590123412345. The weighted sum gives a check digit of 7, so the encoded code is 5901234123457. Type the 12 digits, choose EAN-13, and the tool produces that code with the digit printed beneath the bars.

Print settings that decide whether it scans: keep a quiet zone of at least ten narrow bars on each side — the renderer includes a margin, but cropping it will break scanning. Never stretch a barcode non-uniformly; scale both axes together. For EAN and UPC, respect the nominal size (the standard allows roughly 80% to 200% magnification) and print at 300 dpi or better, on matte stock with dark bars on a white background. Bar width 3 px at export size is a safer starting point than 1.

What it cannot do: these are plain, standards-correct symbols — they are not registered GTINs. To sell a product in retail you need a GS1 company prefix and the number issued by GS1, not merely a well-formed barcode. Likewise, CODE128 output here is not GS1-128: it does not insert Application Identifier element strings, so do not use it for GS1 logistics labels.

Questions readers ask

Q1Which barcode format should I use?
CODE128 for almost anything — it handles letters, digits and punctuation. Choose EAN-13 or UPC-A only when a retailer requires a retail GTIN, CODE39 for legacy systems that demand it, and ITF-14 for shipping cartons.
Q2Does the generator calculate the check digit?
Yes. Enter 12 digits for EAN-13, 11 for UPC-A, 7 for EAN-8 or 13 for ITF-14 and the check digit is computed. If you supply the full length, the digit is verified and a mismatch is reported.
Q3Can I use these barcodes on products I sell?
Technically they scan, but retail requires a GTIN issued under a GS1 company prefix — you cannot invent one. Use these for internal labels, inventory, assets, tickets and documents; buy real GTINs from GS1 for retail products.
Q4What size should I print a barcode?
For EAN and UPC respect the standard magnification range (about 80% to 200%). As a working rule, print at 300 dpi or higher, keep the quiet zone intact, and never scale width and height by different factors.
Q5Why does it reject my EAN-13 value?
EAN-13 is digits only, and the check digit must match the preceding twelve. If you typed letters, spaces or an incorrect 13th digit the format cannot be encoded — the error message names the expected length.
Q6Is my barcode data uploaded?
No. Rendering happens entirely in your browser with a local JavaScript library, so values never leave your device and nothing is stored.
Advertisement