Barcode Generator

Barcode Generator

Type a number or text, choose the barcode type and download a sharp SVG or PNG. Check digits are calculated (or verified) for you, quiet zones follow the standards, and the human-readable line is laid out like a real label. It all happens in your browser, with no account and no watermark.

Code 128: any letters, digits and symbols. EAN-13: 12 digits, UPC-A: 11, EAN-8: 7, ITF-14: 13 — the check digit is added.
Encoded dataINV-20261015
Check value (mod 103)21
Image size308 × 103 px
Barcode typeCode 128
Symbol width134 modules
Quiet zones (left + right)10 + 10 modules
Symbol charactersStart B · I · N · V · - · Code C · 20 · 26 · 10 · 15 · check 21 · Stop
Code sets usedB → C

Check value: the start value plus each symbol value times its position adds up to 1,463; 1,463 mod 103 = 21. The barcode is drawn in your browser; nothing is uploaded. Scan a test print before you print many.

Calculated on your device · formulas checked against known results · How we test

How to use the barcode generator

  1. Type the data. For product codes enter the digits without the check digit (12 for EAN-13, 11 for UPC-A, 7 for EAN-8, 13 for ITF-14) and it is calculated for you, or enter the full number and it is verified. Spaces and dashes are ignored.
  2. Choose the barcode type (see the table below). Code 128 is the safe choice for anything that isn’t a retail product number.
  3. Set the size. The narrow bar width is one module in pixels; every bar is a whole number of pixels, so the PNG stays sharp.
  4. Download the SVG for print and design software (it scales without blur) or the PNG for documents and label apps.

Your browser draws the barcode; what you type is never sent anywhere.

Barcode types

TypeEncodesLengthTypical use
Code 128Letters, digits, punctuation, spaceAny (up to 80 here)Shipping labels, inventory, asset tags, tickets
EAN-13Digits (a GTIN-13)13, last is a check digitRetail products worldwide
UPC-ADigits (a GTIN-12)12, last is a check digitRetail products in the US and Canada
EAN-8Digits (a GTIN-8)8, last is a check digitSmall packages with no room for EAN-13
Code 39A–Z, 0–9, space, - . $ / + %Any (up to 40 here)ID badges, industrial and older inventory systems
ITF-14Digits (a GTIN-14)14, last is a check digitCorrugated shipping cartons

Each type has a quiet zone, a blank margin the scanner needs to find the start and end. The images include it: 11 modules left and 7 right for EAN-13, 9 on each side for UPC-A, 7 for EAN-8 and 10 for Code 128, Code 39 and ITF-14, whose bearer frame sits outside the quiet zones. Don’t crop it, and keep other print out of it.

How the codes are built

Check digits (EAN, UPC, ITF-14). From the right, the digits are multiplied by 3, 1, 3, 1… and added; the check digit brings the sum up to the next multiple of 10, so a scanner can reject a misread.

Code 128 uses code set B for text and set C for digit pairs. It starts in C when the data opens with four or more digits and switches to C for runs of six or more digits (four at the end), the length-minimizing rules of ISO/IEC 15417. The check symbol is the start value plus each symbol’s value times its position, modulo 103.

Code 39 draws each character with nine bars and spaces, three of them wide (3 × narrow here); the optional check character is the sum of the character values modulo 43.

Worked examples

EAN-13 400638133393: from the right, 3·3 + 9·1 + 3·3 + 3·1 + 3·3 + 1·1 + 8·3 + 3·1 + 6·3 + 0·1 + 0·3 + 4·1 = 89, so the check digit is 1 and the code is 4006381333931. The leading 4 is not drawn as bars of its own; it sets the L/G pattern of the left half to LGLLGG.

Code 128 INV-20261015: Start B, I, N, V, -, Code C, 20, 26, 10, 15, check symbol, Stop. The check sum is 104 + 41·1 + 46·2 + 54·3 + 13·4 + 99·5 + 20·6 + 26·7 + 10·8 + 15·9 = 1,463, and 1,463 mod 103 = 21. Packing the date into pairs makes the code 134 modules wide instead of 167 in set B alone.

Retail numbers come from GS1

A generator can draw any number, but the number on a product you sell in stores or on marketplaces has to be yours. As GS1, the standards body behind EAN and UPC, puts it, every product sold online or in stores needs a unique identification number. You license a company prefix or a single GTIN from the GS1 office in your country (gs1.org; GS1 US in the United States), and that number identifies your company as the brand owner. Then this tool draws its barcode. For your own stock, equipment, library books or tickets, any Code 128 or Code 39 content is fine, because only your scanners read it.

Printing tips

Frequently asked questions

Can I put these barcodes on products I sell in stores or online?

The barcode itself, yes; the number, only if it is yours. EAN-13 and UPC-A numbers for retail must be licensed from GS1 (GS1 US in the United States). Enter your licensed GTIN here and download the barcode. Made-up numbers can belong to another company.

Which barcode type should I use?

For retail products, the one your market expects: UPC-A in the US and Canada, EAN-13 elsewhere, with a GS1 number. For inventory, assets, shipping and anything with letters, Code 128 is compact and read by practically every scanner. Use Code 39 only when an older system asks for it, and ITF-14 for GTIN-14 numbers on shipping cartons.

Why won’t my barcode scan?

The usual causes are a cropped quiet zone, bars printed too small or blurred, low contrast or colored bars, and a scanner that has that barcode type switched off in its settings. Print larger, in black on white, with the margins intact, and check the scanner settings.

What is a check digit?

The last digit of an EAN, UPC or ITF-14 number, calculated from the others with the 3-1-3-1 weighting described above. It lets a scanner catch a misread. This tool adds it to 12-, 11-, 7- or 13-digit input and refuses a full-length number whose last digit is wrong.

Should I download SVG or PNG?

SVG for anything printed or scaled: label software, Illustrator, Canva or a web page. PNG for Word, Excel, Google Docs or apps that only take images; set a larger bar width first so it needs no stretching.

Embed this calculator on your website

Free for any website or blog. Paste this code where you want the calculator to appear:

All free calculator widgets

Last updated: October 15, 2026

Menu

Categories

Finance Calculators29 calculatorsBusiness & Shopping Calculators8 calculatorsHealth & Fitness Calculators11 calculatorsMath & School Calculators22 calculatorsDate & Time Calculators16 calculatorsHoliday Countdowns17 calculatorsEveryday Tools30 calculatorsMic, Camera & Sound Tools6 calculatorsImage & PDF Tools7 calculators

CalcWorthy

AboutContactPrivacy PolicyTerms of Use

Language

Language
EnglishEnglishالعربيةArabicবাংলাBanglaDeutschGermanEspañolSpanishفارسیPersianFrançaisFrenchעבריתHebrewहिन्दीHindiBahasa IndonesiaIndonesianItalianoItalian日本語Japanese한국어KoreanBahasa MelayuMalayNederlandsDutchPolskiPolishPortuguêsPortugueseРусскийRussianไทยThaiTürkçeTurkishУкраїнськаUkrainianاردوUrduTiếng ViệtVietnamese简体中文Simplified Chinese