📊

Barcode Generator

Generate barcodes in multiple formats (Code128, EAN, UPC, Code39) online for free

⚙️ Settings

👁️ Preview

📖 Format Reference

Format Use Case Supported Characters
Code 128Shipping, logisticsAll ASCII
EAN-13Retail products (global)12 digits + check
EAN-8Small products7 digits + check
UPC-ARetail products (US/Canada)11 digits + check
Code 39Military, automotiveA-Z, 0-9, special
ITF-14Shipping containers14 digits
PharmacodePharmaceutical industry3-131070
CodabarLibraries, blood banks0-9, -, $, :, /, +, .

Embed this tool on your website

× px

                        

💡 Integration Tip

Copy the embed code and paste it into your website HTML. The responsive version adapts to all screen sizes automatically.

🔥 Popular Tools

No more tools to show
Explore All Tools

💡 Use Cases

Small retailers labelling own-brand products with an EAN-13 or UPC-A code before putting them on the shelf.
Warehouse and logistics teams printing Code 128 or ITF-14 labels for cartons, pallets and shipping containers.
Developers and QA testers who need valid sample barcodes to check a scanner, POS system or inventory app.
Libraries, laboratories and blood banks producing Codabar labels for books, samples and specimens.
Packaging and pharmaceutical staff generating Pharmacode marks for print-control checks on the production line.

📋 How to use

1

Choose a barcode symbology from the format dropdown in the settings panel: Code 128, EAN-13, EAN-8, UPC-A, Code 39, ITF-14, MSI, Pharmacode or Codabar.

2

Type the value to encode in the data field; changing the format loads a valid example such as 5901234123457 for EAN-13, so overwrite it with your own data.

3

Drag the bar width slider between 1 and 4 px and the height slider between 30 and 200 px until the barcode matches the label size you need.

4

Set the bar colour and background colour with the two colour pickers, and use the checkboxes to show or hide the text under the bars or to switch to flat bars.

5

Watch the preview redraw as you type; a red message appears when the data is invalid for the chosen symbology, for example letters inside an EAN-13 code.

6

Save the barcode with the PNG or SVG button, or press Copy to put the SVG markup on your clipboard.

💎 Pro Tips

  • Download the SVG rather than the PNG when the barcode will be printed: vector bars stay sharp at any label size, while a scaled-up PNG blurs and can fail to scan.
  • Keep the bars dark and the background light. Scanners read contrast, not colour, so light-on-dark or low-contrast pairs are often unreadable.
  • Leave the human-readable text switched on for retail labels: cashiers need it to type the number by hand when a barcode refuses to scan.
  • Give the symbol a quiet zone. Leave empty light-coloured space of at least ten bar widths on the left and right when you place the barcode in your layout.
  • EAN-13 and UPC-A expect a real GS1 company prefix. Numbers you invent will scan, but they may clash with a genuine product in a retailer's database.

Frequently Asked Questions

Code 128 is the safest default for internal and logistics labels: it encodes any ASCII character and stays compact. Use EAN-13 (or EAN-8 for small packs) for retail products sold outside North America, UPC-A for the US and Canada, ITF-14 for shipping cartons, Code 39 or Codabar for asset, library and laboratory labels, and Pharmacode for print control in pharmaceutical packaging.

Enter 12 digits for EAN-13, 7 for EAN-8 and 11 for UPC-A. The generator calculates and appends the final check digit for you, so you do not type it yourself. If you paste a complete 13-digit code, the check digit is validated instead.

The barcodes scan perfectly, but retail EAN and UPC numbers have to be bought from GS1 so that the number is registered to your company. A self-invented number may already belong to somebody else's product. For internal stock, warehouse or asset labels no registration is needed.

Use SVG whenever the barcode will be printed or resized: it is a vector, so the bars stay perfectly sharp at any size. PNG is convenient for screens, email and documents that cannot handle vector files.

The usual causes are too little contrast between the bars and the background, a symbol printed too small, a missing quiet zone (empty margin) on either side, or a blurry image from enlarging a PNG. Print the SVG with a wider bar width, keep dark bars on a light background, and leave clear space around the barcode.

No. The barcode is drawn in your browser with JavaScript, so the product codes, batch numbers and reference numbers you type never leave your device. Once the page has loaded, the generator keeps working even without an internet connection.

FreeWebTools AI
Powered by free AI models · Full chat →