Barcode generator

A free barcode generator for barcodes your scanners already read

The CardDeck barcode generator makes Code 128 barcodes for IDs, asset tags, tickets and shipping labels, and EAN-13 and UPC-A barcodes for retail products, with the check digit calculated for you. Download a crisp SVG, or add the barcode to an ID, membership card or badge.

NWL-0428 · Code 128
QUICK ANSWER

What is a barcode generator?

A barcode generator converts a number or text into a one-dimensional barcode that laser, LED and camera scanners can read. CardDeck generates Code 128 for IDs, assets and tickets, plus EAN-13 and UPC-A for retail products with automatic check digits, and exports vector SVG files. Static barcodes are unlimited on every plan.

Updated October 2026 · 10 min read · By the CardDeck team
Key takeaways
  • Code 128 for IDs, asset tags, tickets and labels; letters, numbers and symbols
  • EAN-13 and UPC-A for retail products, with the check digit calculated automatically
  • Vector SVG export keeps bar edges sharp at any print size
  • Generate thousands at once from a CSV or Excel file
  • Unlimited static barcodes on every plan, including Free

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

  1. Will the item be sold through a retailer's till? Use EAN-13 or UPC-A, with a number from GS1.
  2. Is it an internal identifier that may include letters? Use Code 128.
  3. 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

  1. Add a barcode element to the template and choose the format, usually Code 128.
  2. Map it to a column such as employee_id.
  3. Import your spreadsheet. Each card gets its own barcode.
  4. 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

AspectWithout CardDeckWith CardDeck
Check digitCalculate by hand or hope it is rightCalculated and validated automatically
Bulk creationOne at a timeThousands from a CSV or Excel file
On ID and member cardsSeparate tool, then paste inBuilt into card templates
Export qualityLow-resolution imagesVector SVG, sharp at any size
CostOften limited or watermarkedUnlimited static barcodes on every plan
Try Barcode Generator free — no credit card required.Start free

How it works

  1. Choose a format

    Code 128 for text and internal IDs; EAN-13 or UPC-A for registered retail product numbers.

  2. Enter or import the data

    Type one value, or upload a spreadsheet to generate one barcode per row.

  3. Check and download

    CardDeck validates the value and adds the check digit. Download SVG for print or PNG for screens.

  4. Use it anywhere

    Print on labels and packaging, or place the barcode on an ID, membership card or badge template.

What’s included

Code 128

Letters, numbers and symbols, up to 40 characters per barcode.

EAN-13

Retail product codes from 12 digits, with the 13th check digit calculated for you.

UPC-A

12-digit product codes for the US and Canada, with automatic check digit.

Input validation

Wrong length, letters in numeric formats and unsupported characters are caught before export.

Vector export

SVG stays sharp at any print size; PNG for documents and screens.

Bulk generation

One barcode per spreadsheet row through the batch generator.

On any card

Add a barcode field to ID cards, membership cards, badges and labels.

Unlimited

Static barcodes are unlimited on every plan.

POPULAR WITHRetail & InventoryEnterpriseSchoolsMembership Organizations

Use cases

Retail products

EAN-13 or UPC-A from your GS1 numbers for packaging and shelf-ready labels.

Inventory and assets

Code 128 tags for laptops, tools, equipment and bins.

Employee and student IDs

A barcode with the ID number for door readers, time clocks and libraries.

Membership cards

Member numbers that front desks and tills can scan.

Tickets and events

A unique code per ticket or badge for check-in scanners.

Shipping and returns

Order or reference numbers on labels and packing slips.

Frequently asked questions about barcode generator

Do I need to register EAN-13 or UPC-A barcodes?

To sell products through retailers you need numbers issued by GS1. CardDeck generates the barcode image from the number you provide.

Which scanners read Code 128?

Virtually all modern 1D laser, LED and camera-based barcode scanners read Code 128. Some are configured to accept only certain formats, so test with your own scanner.

Can I generate barcodes in bulk?

Yes. Use the batch generator to create one barcode per CSV or Excel row: up to 25 rows per job on Free, 500 on Pro, 2,000 on Team and 25,000 on Business.

What is a check digit?

A check digit is a final digit calculated from the others. Scanners recalculate it to catch misreads. CardDeck adds it automatically for EAN-13 and UPC-A.

Can I make a barcode with letters?

Yes, with Code 128, which encodes uppercase and lowercase letters, digits and symbols. EAN-13 and UPC-A are numbers only.

What file format is best for printing barcodes?

SVG, because it is vector and keeps bar edges sharp at any size. Use PNG only for screens and documents.

Can barcodes be printed in color?

Dark bars on a light background can work, but black on white is the safest. Avoid red bars, because many laser scanners use red light and cannot see them.

Can a phone scan a barcode?

Some phone apps can read 1D barcodes, but the default camera is built mainly for QR codes. If people will scan with phones, use a QR code.

Can I put a barcode on an employee ID card?

Yes. Add a barcode field to any CardDeck card template and map it to the employee number column.

Works well with

All products →
Codes

Bulk Barcode Generator

Bulk barcode generator: create hundreds of barcodes from Excel or CSV

Codes

QR Code Generator

A free QR code generator for codes that look like your brand and scan every time

Cards

Employee ID Cards

Employee ID card maker for IDs your security team can trust

Cards

Membership Cards

Digital membership cards that renew themselves

Try Barcode Generator free with CardDeck.

Create your Card