What is a barcode generator?
A barcode generator is a tool that turns a value, such as a product number or employee ID, into a pattern of bars and spaces that a scanner can read. You choose the format (symbology), enter the value and download an image to print.
A one-dimensional (1D) barcode stores data across its width only. A scanner sweeps across the bars, measures the width of each bar and space, and decodes the result into characters that it sends to the till, library system or access controller as if someone had typed them.
The parts of a barcode
- Quiet zones: blank margins on both sides that tell the scanner where the code starts and ends.
- Start and stop patterns: fixed patterns that mark the edges of the data.
- Data characters: the encoded value.
- Check digit or character: a calculated value that lets the scanner catch misreads.
- Human-readable text: the value printed underneath, so a person can type it in if needed.
Why the format matters
Scanners and the systems behind them expect specific formats. A supermarket till looks for EAN-13 or UPC-A. A warehouse or access-control reader is often set up for Code 128. Picking the right symbology is the most important decision you make, and the next section explains how.
Which barcode format should I use: Code 128, EAN-13 or UPC-A?
Use Code 128 for anything internal, such as employee IDs, asset tags, tickets, library cards and shipping labels. Use EAN-13 or UPC-A only for retail products that carry a GS1-issued number.
Code 128
- Encodes all 128 ASCII characters: uppercase and lowercase letters, digits and symbols.
- Compact, with a built-in check character.
- Read by virtually every modern 1D scanner.
- Best for: staff and student IDs, asset tags, tickets, internal SKUs, shipping references.
- Learn more on the Code 128 barcode generator page.
EAN-13
- Exactly 13 digits, the last being a check digit.
- The international retail standard managed by GS1, scanned at checkouts worldwide.
- Best for: consumer products sold through retailers internationally (North American scanners read it too), and books (ISBN as EAN-13).
- See the EAN-13 barcode generator.
UPC-A
- Exactly 12 digits, the last being a check digit.
- The retail standard in the United States and Canada, administered by GS1 US.
- Best for: products sold mainly in North American retail.
- See the UPC-A barcode generator.
Quick decision
- Will the item be sold through a retailer's till? Use EAN-13 or UPC-A, with a number from GS1.
- Is it an internal identifier that may include letters? Use Code 128.
- Do people with phones need to open a page? Use a QR code instead.
Do I need GS1 numbers for retail barcodes?
Yes. To sell products through most retailers and marketplaces, the number inside your EAN-13 or UPC-A barcode must come from GS1, the not-for-profit organization that manages these standards. CardDeck generates the barcode image from the number you provide; it does not issue product numbers.
How GS1 numbers work
- You join your local GS1 member organization and receive a GS1 Company Prefix, or buy individual numbers where GS1 offers them.
- You assign the remaining digits to each of your products as the item reference.
- The last digit is a check digit, calculated from the others. CardDeck calculates it for you.
- The resulting number is a GTIN (Global Trade Item Number). EAN-13 holds a GTIN-13; UPC-A holds a GTIN-12.
What about cheap resold barcodes?
Some sellers resell old numbers that were originally issued to other companies. Major retailers and marketplaces can check the number against GS1's registry, and a mismatch can cause listings to be rejected. If retail is your goal, get your numbers directly from GS1.
When you do not need GS1
For anything that never passes through a retail checkout, such as internal stock, asset tags, staff IDs or event tickets, you do not need GS1 numbers. Use Code 128 with any value that suits your system.
How do I create a barcode with CardDeck?
Choose a format, type the value, check the preview and download. The free tool works in your browser with no sign-up; an account lets you save barcodes, generate them in bulk and place them on cards.
Step by step
1. Pick the format. Code 128, EAN-13 or UPC-A. 2. Enter the value. - Code 128: letters, numbers and symbols, up to 40 characters. - EAN-13: the first 12 digits. CardDeck adds the 13th (check) digit. - UPC-A: the first 11 digits. CardDeck adds the 12th (check) digit. 3. Read the validation message. If the length is wrong or a character is not allowed, CardDeck tells you before you export. 4. Choose the color. Black on white is safest. Dark colors work; red bars do not, because many laser scanners use red light and cannot see them. 5. Download SVG for print, or PNG for documents and screens. 6. Test with your actual scanner before printing a full run.
Making many barcodes
For product ranges, asset registers or member lists, use the bulk barcode generator. Upload a CSV or Excel file and get one barcode per row, named from your ID column.
Adding a barcode to a card
In the card designer, add a barcode field to any template and map it to a column such as employee number. Every employee ID card or membership card in the batch then carries its own scannable number.
How do you print barcodes that scan reliably?
Print barcodes in solid black on a white or light background, keep the quiet zones clear, respect the format's minimum size and test with the scanner that will actually read them.
Size and the X-dimension
The X-dimension is the width of the narrowest bar or space. Every other bar is a multiple of it, so it controls the whole barcode's size.
- Larger X-dimensions are easier to scan, especially from a distance or on rough surfaces.
- Very small X-dimensions need high-resolution printing and a good scanner.
- For EAN-13 and UPC-A, GS1 specifies a nominal X-dimension of 0.33 mm (100% magnification), with an allowed range of roughly 80% to 200%.
Quiet zones
- Code 128: at least 10 times the X-dimension on each side.
- EAN-13: 11X on the left and 7X on the right.
- UPC-A: 9X on each side.
Do not let text, borders or packaging folds run into these margins.
Bar height
Do not squash barcodes to fit a tight space. For retail codes, GS1 discourages truncating the bar height, because shorter bars are harder to scan at an angle.
Printing tips
- Use SVG so bar edges stay crisp; scaling a small PNG blurs them.
- Thermal label printers work well; set the X-dimension to a whole number of printer dots so bars are not uneven.
- Avoid printing across seams, curves or glossy laminate glare.
- Check the human-readable text matches the encoded value.
What is the difference between a barcode and a QR code?
A barcode stores a short line of data in one dimension and is read by dedicated laser, LED or camera scanners. A QR code stores much more in two dimensions and is read by phone cameras. Use a barcode when an existing scanner needs a number; use a QR code when people need to open a page.
Key differences
- Capacity. A Code 128 barcode on an ID card typically holds a short ID. A QR code can hold a full URL, contact card or WiFi login.
- Readers. Tills, library desks, warehouse guns and access gates are built for 1D barcodes. Phones read QR codes natively.
- Orientation. Most laser scanners need the barcode roughly lined up. QR codes can be read at any angle.
- Error correction. QR codes can rebuild damaged areas; 1D barcodes rely on a check digit to detect errors.
Using both
Many cards use both. An employee ID might carry a Code 128 barcode for the door reader and a QR code that opens a verification page. A product label can have an EAN-13 for the till and a QR code for setup instructions. The QR code generator makes the second half, and our article on barcode vs QR code covers the choice in more depth.
Can I add barcodes to ID cards, membership cards and badges?
Yes. Every CardDeck card template can include a barcode field, filled per person from your data, so each ID, membership card or badge carries its own scannable number.
Common setups
- Employee IDs: the employee number as Code 128 for time clocks, door readers or canteen tills.
- Student IDs: the roll or admission number for library checkout and attendance scanners.
- Membership cards: the member number for front-desk check-in or point-of-sale discounts.
- Event badges: a ticket or registration code for compatible check-in scanners.
How it works
- Add a barcode element to the template and choose the format, usually Code 128.
- Map it to a column such as employee_id.
- Import your spreadsheet. Each card gets its own barcode.
- Print on PVC card stock in the CR80 size (85.6 × 54 mm) or share cards digitally.
Check with your access-control or library vendor which format their scanners expect; most read Code 128 out of the box. Retail and stock teams can find more workflows under retail and inventory.
Tips for barcodes on cards
- Place the barcode where card holders do not cover it with a thumb.
- Keep it away from the card edge and any hole punch for a lanyard.
Is the barcode generator free?
Yes. Static barcodes are unlimited on every CardDeck plan, including Free, and the free browser tool needs no sign-up and adds no watermark. Paid plans add larger batch jobs and card features.
What each plan adds
- Free: unlimited barcodes, batch jobs of up to 25 rows.
- Pro ($8/month, or $6 billed yearly): batch jobs of up to 500 rows.
- Team ($6 per seat/month, or $5 billed yearly, minimum 3 seats): 2,000 rows per job and employee ID cards.
- Business (from $199/month, or $149 billed yearly): 25,000 rows per job, student IDs, event badges and membership cards.
Privacy
The free tool generates barcodes in your browser. Nothing you type is stored unless you create an account and save it.
When to upgrade
Most people stay on Free for one-off barcodes. Upgrade when you need larger spreadsheets in one job, barcodes placed on branded ID or membership cards, or a team workspace where several people manage the same templates. Static barcodes never expire and never depend on your plan, so a barcode you printed on Free keeps scanning if you change plans later.
Basic online barcode makers vs CardDeck
| Without CardDeck | With CardDeck | |
|---|---|---|
| Check digit | Calculate by hand or hope it is right | Calculated and validated automatically |
| Bulk creation | One at a time | Thousands from a CSV or Excel file |
| On ID and member cards | Separate tool, then paste in | Built into card templates |
| Export quality | Low-resolution images | Vector SVG, sharp at any size |
| Cost | Often limited or watermarked | Unlimited static barcodes on every plan |