Barcode Generator

Barcodes are the quiet workhorse of shops, warehouses, and shipping desks: a pattern of black bars that a scanner reads in a fraction of a second, turning a physical item into a number in a computer system. Every product on a supermarket shelf, every parcel in a delivery van, and every book in a library carries one. This free barcode generator creates a printable barcode for you in seconds, with no sign-up and no software to install. Enter the text or number you want to encode, choose a format — CODE128 for general use, CODE39 for warehouse labels, or EAN13 for retail products — and the barcode appears on the page instantly. You can then download it as an SVG file, which stays sharp at any size, from a small price sticker to a large shipping label. The barcode is generated entirely in your browser, so your product codes and inventory numbers are never uploaded or stored anywhere.

Your Barcode

Encoded value—
Format—
Valid characters—
Advertisement space — AdSense ads will appear here after approval.

How to Use This Barcode Generator

  1. Enter the text or number to encode. Use numbers for EAN13, and uppercase letters and numbers for CODE39. CODE128 accepts almost any text.
  2. Choose a format. CODE128 is the safest default. Choose EAN13 only for retail products, and CODE39 only when the system you are printing for asks for it.
  3. Tap Generate Barcode and check the preview. If you see an error, the text contains a character the chosen format does not support — change the format or the text.
  4. Tap Download SVG to save the barcode, then print it with a clear white margin on both sides and test it with a scanner before printing in bulk.

Which Barcode Format Should You Choose?

CODE128 is the best choice for most people. It encodes the full ASCII character set, including lowercase letters, numbers, and symbols, and it packs data tightly, so even a long code stays a reasonable width. CODE39 is an older format that only encodes uppercase letters, numbers, and seven symbols, and it produces wider barcodes, EAN13 is different again: it is the standard retail barcode, a fixed 13-digit number in which the final digit is a check digit calculated from the first twelve. Shops and their stock systems expect EAN13 numbers to be registered through GS1, the organisation that issues company prefixes, so a number you invent yourself will scan fine on your own equipment but may be rejected by a retailer. When in doubt, use CODE128 for anything internal, and use a properly registered EAN13 only for products you sell through shops.

Tips for Printing Barcodes That Scan

A barcode is only useful if a scanner can read it, and printing is where most failures happen. Print in pure black on a clean white background, because low contrast is the single most common cause of failed scans. Keep a quiet zone — a blank white margin — of at least a few millimetres on both ends of the bars, and never let text, borders, or other graphics touch the bars. Print at a reasonable size: a barcode narrower than about 3 centimetres is hard for many scanners to read, while a very wide barcode wastes label space without helping. The SVG file this tool downloads is a vector image, which means it stays perfectly sharp at any size, unlike a photograph or a low-resolution picture that blurs the thin bars.

Worked Example

Suppose you run a small online shop and want a barcode for a product with the stock code 123456789012. You enter that number, leave the format on CODE128, keep "show human-readable text" ticked, and tap Generate Barcode. The tool draws a barcode of black bars with the number printed underneath, and the results panel confirms the encoded value and the format. You tap Download SVG and save the file as barcode.svg, then place it on your product label at about 4 centimetres wide with a clear white margin. A scanner at your packing desk reads it first time, and the stock system records the product without any typing. If you had chosen EAN13 instead, the same twelve digits would produce a retail barcode with a check digit added automatically — but you would need a registered GS1 number before a shop would accept it.

Frequently Asked Questions

What is the difference between CODE128, CODE39, and EAN13?

CODE128 encodes all ASCII characters and is the best general-purpose choice for labels and inventory. CODE39 encodes uppercase letters, numbers, and a few symbols, and is common in warehouses and older systems. EAN13 is the 13-digit retail barcode printed on products sold in shops, and it only accepts numbers, with the last digit as a check digit.

Is this barcode generator free?

Yes. This barcode generator is completely free, with no sign-up and no watermark. The barcode is generated in your browser and you can download it as an SVG file, ready to print on a label, a price tag, or a product package.

Can I use a generated barcode on a product I sell?

You can use CODE128 and CODE39 barcodes freely for your own inventory and labels. For EAN13 retail barcodes, shops usually require a genuine GS1 company prefix and a unique product number, so a self-made EAN13 number may be rejected by retailers. Check with your retailer or GS1 before printing EAN13 codes for products you sell in stores.

Why does my barcode show an error?

Each format only accepts certain characters. EAN13 accepts only numbers, and needs 12 or 13 digits. CODE39 accepts uppercase letters, numbers, and the symbols dash, dot, space, dollar, slash, plus, and percent. CODE128 accepts almost any text, so switch to CODE128 if your text contains lowercase letters or other symbols.

What size should I print a barcode?

Print barcodes at least 3 centimetres wide for reliable scanning, with a clear white margin on both sides. The downloaded SVG scales without losing sharpness, so you can enlarge it for a shipping label or shrink it for a small price tag. Always test the printed barcode with a real scanner before printing a large batch.

Disclaimer: This tool runs entirely in your browser. Generated passwords and codes are never uploaded or stored.