Barcode Generator

EAN, UPC, Code 128 and more as SVG or PNG.

About Barcode Generator

A barcode generator for EAN-13, EAN-8, UPC-A, Code 128, Code 39, ITF-14, MSI, Pharmacode and Codabar. It renders as you type and downloads as SVG or PNG.

How to use

  1. Choose a format. The hint under the value field tells you what that format accepts.
  2. Type the value. The barcode appears as you type; invalid input for the format shows an error instead.
  3. Adjust bar width, height, text size, margin and colours, or hide the printed value.
  4. Download SVG or Download PNG.

Formats

Format Input
Code 128 (auto, A, B, C) Any ASCII; set A limits to upper case and control characters, set C needs an even number of digits
EAN-13 12 digits; the check digit is added
EAN-8 7 digits; the check digit is added
UPC-A 11 digits; the check digit is added
Code 39 Upper-case letters, digits and - . $ / + % space
ITF-14 13 digits; the check digit is added
MSI Digits only
Pharmacode A number from 3 to 131070
Codabar Digits and - $ : / . +, optionally wrapped in A to D

Defaults: bar width 2, height 100 px, text size 20, margin 10, black bars on white, value shown under the bars. Rendering uses the JsBarcode library, which rejects values that do not fit the chosen format.

The tool does not register or validate GS1 numbers; a retail EAN or UPC must come from GS1 to be accepted by shops.

Example

Format: EAN-13 · Value: 590123412345
→ barcode encoding 5901234123457 (check digit 7 added)

Privacy

Everything is rendered in the browser. No request is made, and nothing is stored.

Frequently asked questions

What is the difference between EAN-13 and UPC-A?
Both are GS1 retail barcodes that encode a product number. UPC-A has 12 digits and is used mainly in North America; EAN-13 has 13 digits and is used worldwide. A UPC-A code is the same as an EAN-13 code with a leading zero, and most scanners read both.
How is the EAN-13 check digit calculated?
Multiply the first 12 digits alternately by 1 and 3 starting from the left, add the products, and take the amount needed to reach the next multiple of 10. For 590123412345 the sum is 83, so the check digit is 7.
Which barcode format should I use for text, not just numbers?
Code 128 encodes the full ASCII set and is compact, so it is the usual choice for shipping labels and internal tracking. Code 39 also accepts letters but only upper case and a few symbols, and it produces wider codes.
Can I sell a product with a barcode made here?
The image is a valid barcode, but the number inside it must be licensed from GS1 for retailers to accept it. Any number you make up will scan but will not be linked to your product in retail databases.