Barcode Generator
Barcodes as SVG and PNG — no watermark, no sign-up.
Rendered in your browser — no watermark, no accountGenerate 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
| Format | Characters | Length | Typical use |
|---|---|---|---|
| EAN-13 | Digits only | 13 (12 + check digit) | Retail products worldwide — the barcode on almost everything sold outside the US and Canada |
| UPC-A | Digits only | 12 (11 + check digit) | Retail products in the US and Canada; scanners read it as an EAN-13 with a leading 0 |
| Code 128 | Printable ASCII: upper- and lowercase letters, digits, symbols | Variable | Shipping labels, inventory, asset tags, serial numbers — the default for anything internal |
| Code 39 | A–Z, 0–9, space and - . $ / + % (lowercase becomes uppercase) | Variable | Older 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
- Take the first 12 digits: 5 9 0 1 2 3 4 1 2 3 4 5.
- Multiply them alternately by 1 and 3, starting with 1: 5, 27, 0, 3, 2, 9, 4, 3, 2, 9, 4, 15.
- Add the products: 83.
- 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.
- 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 → 0036000291452GS1 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:
| Prefix | Assigned to |
|---|---|
| 000–019, 060–139 | GS1 US (United States, including Puerto Rico) |
| 020–029, 040–049, 200–299 | Restricted circulation — in-store and internal codes such as weighed produce; not unique worldwide |
| 300–379 | GS1 France |
| 400–440 | GS1 Germany |
| 450–459, 490–499 | GS1 Japan |
| 500–509 | GS1 UK |
| 690–699 | GS1 China |
| 750 | GS1 Mexico |
| 840–849 | GS1 Spain |
| 977 | Serial publications (ISSN) |
| 978–979 | Books (ISBN — “Bookland”) |
Common mistakes that make a barcode fail
| Mistake | Why it fails | Fix |
|---|---|---|
| Cropping the white margin | Scanners 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 PNG | Scaling 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 small | Below 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 bars | Laser 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 digit | An 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 products | Retailers 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.