Free Barcode Generator

Generate high quality barcodes and QR codes in seconds, with live preview and check digit validation. Supports Code 128, UPC-A, EAN-13, Code 39 and QR Code. Download as PNG, JPG or SVG.

Variable length alphanumeric

Download options
SVG stays sharp at any size, so use it for print. PNG and JPG export at 3x for labels.
Live preview
Enter valid input to see your barcode preview.

Supported barcode types

Generating a UPC or EAN symbol does not assign you the number. Barcodes sold through retailers must use a GS1 company prefix, so use these for internal stock and labelling unless the number is already licensed to you.

How the Barcode Generator works

  1. Step 1. Choose your barcode typeCode 128 and Code 39 take free text, UPC-A and EAN-13 take fixed-length numbers, and QR takes anything.
  2. Step 2. Enter your dataEach format has its own rules. The field checks length, character set and check digit as you type.
  3. Step 3. Check the live previewThe symbol renders the moment your input is valid, so you can confirm it before downloading.
  4. Step 4. Download your fileSave as PNG, JPG or SVG. Choose SVG for anything going to print, since it never pixelates.

The Shopify Loyalty Program Growing Brands Trust

See how Mage helps Shopify brands lift repeat purchase rate with loyalty, referrals and store credit.

Frequently asked questions

Use Code 128 for internal stock, shipping and warehouse labels, since it is compact and takes any text. Use UPC-A for retail products sold in North America and EAN-13 for the rest of the world. Use Code 39 for older industrial or automotive systems that require it. Use QR when you want a phone camera to open a link.

Code 128 is a high density barcode that encodes the full ASCII character set at variable length. It automatically switches between three subsets to keep the symbol short, and the start character, checksum and stop character are all added by the encoder, so you never enter them yourself. It is the most common choice for logistics and internal inventory.

They are close relatives. UPC-A is 12 digits and is used mainly in the United States and Canada. EAN-13 is 13 digits and is the international standard. A UPC-A code is effectively an EAN-13 with a leading zero, and modern scanners read both.

The check digit is the final digit of a UPC or EAN code, and it is calculated from all the digits before it. Scanners recalculate it on every scan, so if a digit is misread the maths fails and the scan is rejected. It is what stops a smudged label from ringing up the wrong product.

Because the last digit does not match what the preceding digits produce. Either a digit was mistyped, or the final digit was chosen rather than calculated. This tool tells you exactly which digit it should be, so you can correct the last character and continue.

Take the first 11 digits. Multiply the digits in odd positions by 3 and those in even positions by 1, then add the results. The check digit is whatever takes that total up to the next multiple of ten. For 03600029145 the total is 58, so the check digit is 2, giving 036000291452.

The same method as UPC-A but with the weights reversed: the first 12 digits are multiplied alternately by 1 and 3, starting with 1. For 400638133393 the total is 89, so the check digit is 1, giving 4006381333931.

If you are selling through retailers or on most major marketplaces, yes. GS1 issues the company prefix that makes a UPC or EAN number uniquely yours, and generating a symbol here does not register the number to you. For internal use such as stock control, shelf labels or your own warehouse, you can use any number you like.

Code 39 is an older variable length format supporting A to Z, 0 to 9, space and the characters minus, full stop, dollar, slash, plus and percent. It does not support lowercase. The asterisk acts as the start and stop delimiter and is added automatically. It produces wider symbols than Code 128 but remains common in defence, automotive and healthcare systems.

Error correction adds redundant data so a QR code still scans when partly damaged or obscured. Level L recovers about 7%, M about 15%, Q about 25% and H about 30%. Higher levels make the code denser and reduce how much data fits, so M is a sensible default for screens, while H suits packaging, stickers or anything that may scuff.

A UPC-A or EAN-13 symbol is designed to print at about 37mm wide by 26mm tall, and should not go below roughly 80% of that. Always leave the quiet zone, the clear white margin either side, since scanners need it to find the symbol edges. Download the SVG so the bars stay crisp at whatever size you place them.

SVG for anything printed, because it is vector and stays sharp at any size. PNG for screens and documents, since it is lossless and keeps clean edges. JPG only when something specifically requires it, as its compression can soften the bar edges and make scanning less reliable.

Yes. Shopify has a barcode field on every product variant, and Code 128 works well for internal SKU labelling with Shopify POS. If you are selling wholesale into retailers, use a GS1 issued UPC or EAN instead.

Yes. No signup, no watermark, no limit on how many codes you generate, and everything is created in your browser rather than sent to a server. It is built by Mage Loyalty, a loyalty, referrals and store credit app for Shopify.

Turn one-time buyers into repeat customers.

Mage is a loyalty, referral and store credit app built for Shopify. Reward repeat purchases, run VIP tiers, and give customers a reason to come back, without writing a line of code.