What is barcode generator?
A barcode is a machine readable pattern of bars that stores a number or short text. Shops, warehouses, libraries and parcel services use them to identify items quickly and without typing errors.
Code 128 is a flexible code for letters, digits and symbols, used in shipping and inventory. EAN 13 and UPC A are the retail product codes seen on packaging.
How to use the barcode generator
- Choose the barcode type.
- Type or paste your value.
- Download the barcode as PNG or SVG and print it at a clear size.
How the barcode generator works
Code 128 uses subset B, with each character encoded as a pattern of three bars and three spaces and a modulo 103 check character. EAN 13 and UPC A use fixed digit patterns with a check digit calculated from the other digits. The barcode is drawn as an SVG, and PNG is created from it in your browser.
Worked example
Common uses of the barcode generator
- Inventory and shelf labels.
- Asset tags for equipment.
- Library or event passes.
- Practice labels for software testing.
- Shipping and box labels.
Tips and common mistakes
Print with a quiet zone, which is blank space on each side of the code, and good contrast.
Do not use a made up EAN or UPC to sell products. Retail product numbers must be issued through GS1.
Test the printed barcode with a scanner or phone before you print many copies.
Background: what to know before you rely on it
Linear barcodes were first standardized in the 1970s for grocery stores, which led to the UPC in North America and the EAN in Europe. The numbers do not carry prices. They are keys that a shop system looks up in its own database. Code 128 appeared in the 1980s and packs data densely, which is why it is used for logistics. GS1 is the global organization that issues company prefixes and keeps retail numbers unique. A generator can draw any barcode, but only GS1 issued numbers are valid in global retail.
Private, free and fast
This tool runs entirely in your browser. What you type or choose is not uploaded to a server and is not saved after you close the page, which keeps it fast and private. It is free to use as often as you like. See more in all generators, or browse the full list of tools.
Field by field guide
- Barcode type: Choose one of: Code 128 (letters and numbers); EAN 13 (12 or 13 digits); UPC A (11 or 12 digits).
- Value: Type your value. The example is ITOOLSLAB 2026.
- Bar height (pixels): Enter a number. The example value is 90.
- Show the number below: Choose one of: Yes; No.
Change one field at a time to see how the result responds, and use the worked example above to check that you get the same answer.
Barcode numbers, EAN, UPC and Code 128 explained
If you are looking for barcode numbers, the format decides the length. EAN 13 has 13 digits, UPC A has 12 and Code 128 accepts letters and numbers. The last digit of EAN and UPC is a check digit that this tool calculates for you.
Download the barcode as PNG or SVG and print it at a clear size with quiet space around it. For links and menus use the QR code generator instead. See the barcode types guide to choose the right format.
Barcode formats at a glance
EAN 13 has 13 digits and is used for retail products worldwide, UPC A has 12 digits and is used mostly in North America, and Code 128 encodes letters and numbers for internal labels. Use the sample number to learn how a code is drawn, and use numbers that you own for products that you sell.
- Print on a light background with dark bars.
- Leave the white margins around the code.
- Test with a real scanner before printing a batch.
Frequently asked questions
Which barcode type should I use?
Use Code 128 for internal labels, shipping and inventory. Use EAN 13 or UPC A only for retail products with numbers issued by GS1.
Can I use any EAN number for my product?
For selling in shops and marketplaces, you need official numbers from GS1 or an authorized reseller.
What is a check digit?
A final digit calculated from the others that lets a scanner detect a misread.
Are the barcodes free to use?
Yes. The generator is free and works offline once the page is loaded.
How many digits does a barcode have?
It depends on the type. EAN 13 has 13 digits and UPC A has 12, both including the check digit. Code 128 has no fixed length and can carry letters as well as numbers.
Guides that go with this tool
Related tools
UUID Generator
A UUID is a 128 bit identifier written as 32 hexadecimal digits in five groups. This tool creates random...
GeneratorsQR Code Generator
Enter a link or text, pick a size and colors and the generator makes a QR code you can download as a PNG...
GeneratorsLorem Ipsum Generator
Choose how many paragraphs, sentences or words you need and the generator returns placeholder text you...
GeneratorsPassword Generator
Pick a length and character types and the generator makes strong random passwords with your browser's...
GeneratorsRandom Number Generator
Enter a minimum, a maximum and how many numbers you want. The generator returns fair random integers,...
GeneratorsRandom Name Picker
Enter one name per line, set how many winners you need and press the button. The picker draws fairly...
More free tools people use next
- VAT and GST Calculator: To add VAT or GST, multiply the net price by the rate and add it. To remove it, divide...
- Coin Flip and Dice Roller: Choose a coin or a die, set how many to flip or roll and press the button. The tool...
- Mortgage Calculator: Enter the home price, down payment, interest rate and term. The calculator shows your...
- JSON to CSV Converter: Paste a JSON array of objects to get CSV rows with a header, or paste CSV to get JSON....
- CSS Gradient Generator: Choose two colors, a gradient type and an angle. The tool shows a live preview and gives...
- Savings Goal Calculator: Enter your goal, current savings, yearly interest and time in years. The tool tells you...
- JPG to PDF Converter: Choose an image and the tool creates a PDF whose page matches the picture. The file is...
- PDF Splitter and Page Extractor: Choose a PDF and enter the pages you want to keep, for example 1 to 3 and 5. The tool...
- Time Calculator: Enter two durations in days, hours, minutes and seconds, choose add or subtract and see...
- Domain Availability Checker: Enter up to 12 domain names. The tool checks public DNS and tells you which are...
- BMR Calculator: Enter your sex, age, height and weight. The calculator estimates the calories your body...
- PDF Rotator: Choose a PDF, pick the angle and, if you like, the pages to rotate. The tool turns the...
- MPG Calculator: Enter the distance you drove and the fuel you used. The calculator shows MPG in US and UK...
- Spin the Wheel: Type your choices, one per line, and press Spin. The wheel turns and stops on a random...
- Degree Classification Calculator: Enter your module marks, credits and year weights. The calculator returns your weighted...
- Crypto Profit Calculator: Enter your buy price, sell price, the amount you invested and the fees. The calculator...
- CSS Formatter: Paste your CSS, choose an indent style and press Format. You get readable CSS with each...
- Logo Maker: Enter your brand name, choose a shape and colors, and press Make logo. You get a clean...
- Invoice Generator: Fill in your details, your client and the line items. The generator adds the totals and...
- Resume Builder: Fill in your details and press Build resume. You get a clean resume you can print or save...
Results are for information and education. For legal, financial, medical or security decisions, check with a qualified professional. Do not use online generators for regulated draws or critical security keys.