Back to Home

Barcode Generator

Generate barcodes in 8 formats — Code 128, Code 39, EAN-13, UPC-A, and more

Any text up to 80 characters

#000000
#ffffff

Preview

Select a format, enter a value, and click Generate

Format Reference

FormatCharactersUse Case
Code 128All ASCIIShipping, packaging, general use
Code 39A-Z, 0-9, symbolsAutomotive, defense, healthcare
EAN-1313 digitsInternational product identification
EAN-88 digitsSmall product packages
UPC-A12 digitsUS/Canada retail products
ITF-1414 digitsShipping containers, cartons
Pharmacode3-131070Pharmaceutical packaging
Codabar0-9, A-D, symbolsLibraries, blood banks, shipping

About This Tool

Generate Code 128, Code 39, EAN-13, EAN-8, UPC-A, ITF-14, Pharmacode, and Codabar barcodes in your browser, customize size and colors, and download them as PNG or SVG.

Create printable barcodes in eight formats

Linear barcodes are still the backbone of retail checkout, warehouse picking, library circulation, and asset tracking. This generator creates eight common symbologies, checks that your input fits the format before drawing it, and exports the result as a PNG image or a scalable SVG file. It is aimed at small businesses labeling stock, makers preparing packaging artwork, developers testing scanners, and anyone who needs a quick barcode without installing software.

Barcodes are drawn locally in your browser using the open-source JsBarcode library, so the values you enter are not uploaded anywhere.

How to make a barcode

  1. Select a Barcode Format from the list. The input hint underneath shows what that format accepts.
  2. Type the Value and click Generate Barcode. If the value does not fit the format, an error explains why.
  3. Fine-tune the Appearance: bar width (1 to 5 pixels per module), bar height (40 to 200 pixels), font size (8 to 28 pixels), line and background colors, and whether to show the human-readable text below the bars. The preview updates as you change these.
  4. Click Download PNG for a raster image, Download SVG for a vector file, or Copy to copy the SVG markup for pasting into code or a design tool.

Choosing the right symbology

FormatAcceptsTypical use
Code 128Any ASCII text, up to 80 characters hereShipping labels, internal inventory, general purpose
Code 39A-Z, 0-9, space and - . $ / + %Industrial, automotive, and government labeling
EAN-13Exactly 13 digitsRetail products in most of the world
EAN-8Exactly 8 digitsSmall retail packages
UPC-AExactly 12 digitsRetail products in the US and Canada
ITF-14Exactly 14 digitsOuter cartons and shipping cases
PharmacodeA number from 3 to 131070Pharmaceutical packaging control
CodabarDigits and - $ : / . +, starting and ending with A-DLibraries, blood banks, some courier systems

For your own internal labels, Code 128 is usually the best default: it is compact, supports letters and digits, and every modern scanner reads it. Code 39 is less dense but very tolerant of print quality, and this tool converts your input to uppercase automatically because Code 39 has no lowercase letters.

Check digits and retail codes

EAN-13, EAN-8, UPC-A, and ITF-14 end in a check digit, calculated from the other digits with a weighted sum, so a scanner can detect a misread. When you enter the full number, the generator verifies that the final digit is correct and reports an error if it is not. If you see an error on a number you believe is valid, double-check for a typo.

A barcode is only a picture of a number. To sell through retailers, your product numbers generally need to come from GS1, the organization that issues company prefixes for EAN and UPC codes. Inventing a 13-digit number may produce a scannable barcode, but it is not a registered product identifier and may clash with someone else's.

Printing tips

  • Prefer SVG for print. Vector output stays crisp at any size. If you need other raster sizes later, the SVG to PNG converter can render it.
  • Keep contrast high. Dark bars on a white or light background scan best. Red bars often fail because many scanners use red light.
  • Do not squash it. Scaling a barcode unevenly changes the bar ratios and can make it unreadable. Resize proportionally.
  • Leave a quiet zone of blank space on both sides of the bars.
  • Test with a real scanner or phone app before ordering a large print run.

FAQ

Can I encode a URL in a barcode?

Code 128 can hold a short URL, but phones handle 2D codes far better. Use the QR code generator for links.

Why does my UPC fail validation?

UPC-A needs exactly 12 digits including a valid check digit. Spaces or dashes are not allowed.

Can I generate many barcodes at once?

This tool creates one barcode at a time. For large batches, a spreadsheet plug-in or label software is more practical.