Barcode Generator

Barcodes as SVG and PNG — no watermark, no sign-up.

Rendered in your browser — no watermark, no account

Generate EAN-13, UPC and Code 128 barcodes with no watermark

About this barcode generator

Quick answer: type your number, pick the format, and download SVG or PNG — free, no watermark. Which format: EAN-13 (13 digits) for retail products sold outside the US and Canada, UPC-A (12 digits) for US and Canadian retail, Code 128 for anything with letters (shipping labels, inventory, asset tags), and Code 39 only for older systems that require it. One catch before you print product labels: a retail EAN or UPC number has to be licensed from GS1 — this tool draws any number, but stores and Amazon check it against GS1’s registry.

Enter text or numbers, pick a barcode format, and get a crisp barcode rendered as SVG. Download it as SVG for print (infinite resolution) or as PNG for digital use. Four standard formats are supported: Code 128 (all ASCII characters), EAN-13 (retail products worldwide), UPC-A (retail products in North America), and Code 39 (logistics, inventory, ID badges).

Check digits for EAN-13 and UPC-A are calculated automatically using the standard modulo-10 algorithm with alternating weights of 1 and 3. You can enter 12 digits for EAN-13 or 11 for UPC-A and the tool appends the correct check digit, or enter the full code and the tool verifies it.

Code 128 is the most versatile format — the standard can encode all 128 ASCII characters, and this generator accepts every printable one (upper- and lowercase letters, digits, spaces and symbols — codes 32 to 126), which covers shipping labels, inventory systems, and healthcare. Code 39 is older and limited to uppercase letters, digits, and a few symbols, but remains widely used in manufacturing and military applications because it is self-checking.

All barcode encoding is done in pure JavaScript with no external library. The barcode is generated as an SVG element, then optionally rasterized to a canvas for PNG export. Bar height is adjustable, and the encoded text can be shown or hidden below the bars. Everything runs in your browser — no data is sent to a server.

Most free barcode sites watermark the image, cap the resolution, or hold the vector file behind a sign-up wall — the SVG download is usually the paid feature. Here there is no watermark on any format, no account, and no email: the same crisp SVG you see in the preview is the file you download, free, every time.

Which barcode format to use

FormatCharactersLengthTypical use
EAN-13Digits only13 (12 + check digit)Retail products worldwide — the barcode on almost everything sold outside the US and Canada
UPC-ADigits only12 (11 + check digit)Retail products in the US and Canada; scanners read it as an EAN-13 with a leading 0
Code 128Printable ASCII: upper- and lowercase letters, digits, symbolsVariableShipping labels, inventory, asset tags, serial numbers — the default for anything internal
Code 39A–Z, 0–9, space and - . $ / + % (lowercase becomes uppercase)VariableOlder manufacturing, automotive and defense systems, ID badges; wider than Code 128 for the same text

Rule of thumb: if the barcode goes on a product a store will sell, it is EAN-13 or UPC-A and the number comes from GS1. If it only has to be scanned inside your own business, use Code 128 — it is the most compact of the four for mixed text, and your own numbering needs no registration. QR codes are a different animal (2D, for URLs and longer text); the QR code generator handles those.

EAN-13 and UPC check digit — calculate it yourself

  1. Take the first 12 digits: 5 9 0 1 2 3 4 1 2 3 4 5.
  2. Multiply them alternately by 1 and 3, starting with 1: 5, 27, 0, 3, 2, 9, 4, 3, 2, 9, 4, 15.
  3. Add the products: 83.
  4. The check digit is what brings the total up to the next multiple of 10: 90 − 83 = 7. If the sum already ends in 0, the check digit is 0.
  5. Full code: 5901234123457. For UPC-A use 11 digits and weights 3, 1, 3, 1… — 03600029145 gives a check digit of 2 (036000291452).
Excel / Google Sheets — EAN-13 check digit for the 12 digits in A1
(format A1 as text so leading zeros survive):
=MOD(10-MOD(SUMPRODUCT(MID(A1,{1;3;5;7;9;11},1)*1)+3*SUMPRODUCT(MID(A1,{2;4;6;8;10;12},1)*1),10),10)

Python:
def ean13_check(d12: str) -> int:
    s = sum(int(c) * (3 if i % 2 else 1) for i, c in enumerate(d12))
    return (10 - s % 10) % 10

ean13_check("590123412345")   # 7

UPC-A → EAN-13: put a 0 in front; the check digit does not change.
036000291452  →  0036000291452
The same modulo-10 rule this tool uses to append or verify the check digit.

GS1 prefixes — what the first digits mean

The first two or three digits of an EAN-13 are the GS1 prefix. They identify the GS1 member organization that licensed the company prefix — not the country where the product was made — and a few ranges are not countries at all:

PrefixAssigned to
000–019, 060–139GS1 US (United States, including Puerto Rico)
020–029, 040–049, 200–299Restricted circulation — in-store and internal codes such as weighed produce; not unique worldwide
300–379GS1 France
400–440GS1 Germany
450–459, 490–499GS1 Japan
500–509GS1 UK
690–699GS1 China
750GS1 Mexico
840–849GS1 Spain
977Serial publications (ISSN)
978–979Books (ISBN — “Bookland”)

Common mistakes that make a barcode fail

MistakeWhy it failsFix
Cropping the white marginScanners need a blank quiet zone on both sides — at least 10 module widths, 11 on the left of an EAN-13 — to find where the code starts.Keep the margin that comes with the download, and never place text or a border against the bars.
Resizing a PNGScaling a bitmap resamples the pixels, so bars that should be identical end up different widths — enough to break a scan.Use the SVG whenever the size will change; it scales mathematically.
Printing too smallBelow 80% of standard size, the thinnest bars and spaces merge on ordinary printers.EAN/UPC: 80–200% of 37.3 × 25.9 mm. For Code 128 and Code 39, scale up rather than down and test-scan a printout.
Colored or reversed barsLaser scanners use red light, so red, orange and yellow bars look white to them; light bars on a dark background are not allowed for retail EAN/UPC.Black (or very dark) bars on a white background.
A wrong or invented check digitAn EAN or UPC whose last digit fails the modulo-10 check is rejected at the scanner.Enter 12 digits (11 for UPC-A) and let the tool append the check digit.
A made-up EAN on retail productsRetailers and marketplaces check the number against GS1’s registry; unlicensed or resold numbers get listings blocked.License a company prefix from your local GS1 organization.

FAQ

Does the barcode have a watermark?

No. The SVG and PNG downloads are clean — no watermark, no logo, no branding, at any size. There is also no account or email gate: the download button works immediately, and the vector SVG is free like everything else.

Which format should I use?

Code 128 for general purpose (shipping, inventory, any ASCII text). EAN-13 for international retail products. UPC-A for North American retail. Code 39 for legacy systems, manufacturing, or military applications.

Are the barcodes scannable?

Yes. The barcodes follow their respective ISO/IEC standards exactly. Generated barcodes scan correctly with any standard barcode reader.

Is my data sent anywhere?

No. All barcode encoding runs locally in your browser using pure JavaScript. Nothing is uploaded.

Can I use this to make a UPC or EAN for my product?

You can draw the barcode here, but the number itself must come from GS1 if the product will be sold in stores or on Amazon. GS1 licenses a company prefix to your business, and retailers check product barcodes against GS1’s registry — a made-up or resold number can get a listing rejected. For internal use (inventory, warehouse bins, asset tags, tickets) no registration is needed: use Code 128 with your own numbering.

How is the EAN-13 check digit calculated?

Multiply the first 12 digits alternately by 1 and 3, add them up, and the check digit is whatever brings the total to the next multiple of 10. For 590123412345 the weighted sum is 83, so the check digit is 7 → 5901234123457. UPC-A works the same with weights 3 and 1. This tool does it for you: enter 12 digits (11 for UPC-A) and it appends the right one.

What size should I print a barcode?

For EAN-13 and UPC-A the standard (100%) size is about 37.3 × 25.9 mm, and it may be scaled anywhere from 80% to 200%. Use the SVG for print — it scales without blurring. The PNG has 4 pixels per module (the narrowest bar), which comes out at almost exactly 100% when placed at 300 dpi. Do not squash the height or crop the white margins on either side.

Does the prefix show which country a product comes from?

No. The first digits (the GS1 prefix) show which GS1 member organization issued the company prefix — 750 is GS1 Mexico, 690–699 GS1 China — not where the product was made. A US brand that manufactures in Vietnam still carries a US prefix. The guide below lists the common prefixes.

Related tools