How to Batch-Generate Cards, Badges and Codes from a CSV or Excel File
Prepare your spreadsheet, map columns, match photos by filename, fix flagged rows and export print-ready PDFs or individual files in one job.
To bulk-generate cards from a CSV, prepare a CSV or XLSX file with one row per person and one column per field, upload it to a batch generator, map columns to template fields, attach photos by filename, fix any flagged rows, then issue cards digitally or export print-ready PDFs. Keep a unique ID column for future updates.
- One row per card, one column per field, headers in the first row
- A unique ID column lets you match photos and update cards later
- Save as CSV UTF-8 or upload XLSX so accented names stay intact
- Name photo files after the ID for automatic matching
- Review flagged rows before issuing anything
What can you batch-generate from a spreadsheet?
Anything where each row of a list becomes one item with the same layout. A batch generator reads your spreadsheet and creates one card, badge or code per row, with each row's data in the right place.
Common batch jobs
- Employee ID cards from an HR export, with photo, title, department and a verification QR code. See the employee ID card maker.
- Student ID cards from a class list, with class, section and roll number.
- Event badges from a registration export, with role colors and check-in QR codes. See the event badge maker.
- Digital business cards for a whole sales team, imported in one go.
- Membership cards with member numbers, tiers and expiry dates.
- QR codes only: one code per row for product links, table numbers or asset pages, via the bulk QR code generator.
- Barcodes only: one barcode per row for SKUs, asset tags or labels, via the bulk barcode generator.
What you get per row
Depending on the template, each row produces a card with that person's data, a unique QR code, an optional barcode and, for digital cards and IDs, a private link. You can export everything as one print-ready PDF or as individual files in a ZIP.
How should you structure the CSV or Excel file?
Use a simple table: headers in the first row, one row per card, one column per field, and nothing else on the sheet. The cleaner the file, the faster the mapping and the fewer flagged rows.
Example layout
Header row and two data rows, as they would appear in the file:
- id, first_name, last_name, title, department, valid_until, photo
- NWL-0428, Daniel, Okafor, Platform Engineer, Engineering, 2027-06-30, NWL-0428.jpg
- NWL-0431, Priya, Nair, Account Executive, Sales, 2027-06-30, NWL-0431.jpg
Rules that prevent problems
- Headers in row 1, short and lowercase if possible. No blank header cells.
- No merged cells, subtotals, notes or blank rows within the data.
- One value per cell. Split first and last names; do not put phone and email in one cell.
- Consistent formats. Dates in one format (2027-06-30 is unambiguous), phone numbers with country code if you have international staff.
- Only one sheet, or make sure you know which sheet to import from an XLSX workbook.
Saving the file
Upload XLSX directly, or save as CSV UTF-8. Plain CSV in some versions of Excel uses a regional encoding that turns names like Tomás, Zoë or non-Latin scripts into garbled characters. UTF-8 keeps them intact.
Why does a unique ID column matter?
A unique ID column gives every row a permanent identity. It is how photos are matched, how duplicates are caught and how a later re-import updates existing cards instead of creating new ones.
What a good ID looks like
- Unique: no two rows share it, ever.
- Stable: it does not change when someone changes name, role or department.
- Already in use: an employee number, student admission number, member number or ticket reference from your existing system.
Names make poor IDs because they change and repeat. Two people called Priya Nair in one company is not unusual.
What the ID column enables
- Photo matching: NWL-0428.jpg goes to the row with id NWL-0428.
- Duplicate detection: the importer flags two rows with the same ID before you issue two cards.
- Updates: next month, upload a new export. Rows with existing IDs update those cards; new IDs create new cards.
- Codes: the ID can be encoded in a barcode, and each row's QR code links to a record tied to that ID.
Worked example
A school imports 1,200 students using admission numbers as IDs. In October, 30 students change section. The admin exports the class list again and re-imports it. Only those 30 cards change; nobody else's card or QR code is touched.
How do you match photos to rows?
Name each photo file after the row's ID, put them all in one folder, compress the folder to a ZIP and upload it with the batch. Photos are matched to rows by filename automatically.
Steps
- Collect photos in one folder.
- Rename each file to the person's ID, such as NWL-0428.jpg.
- Make sure the photo column in your sheet contains the same filename, or leave it to the ID-based match.
- Zip the folder and upload it in the photo step.
- Check the preview for rows flagged "No photo".
Photo quality guidelines
- Front-facing, head and shoulders, plain background.
- Same aspect ratio for every photo, such as 3:4 portrait.
- At least about 300 pixels wide for the photo area so prints are sharp.
- JPG or PNG.
Common photo problems
- Extension mismatch: .JPG versus .jpg, or .jpeg versus .jpg.
- Hidden spaces: "NWL-0428 .jpg" will not match.
- Leading zeros lost: Excel may turn 000428 into 428 if the column is formatted as a number. Format ID columns as text before typing or importing.
- Group photos or photos with heavy filters that make faces hard to check.
How do column mapping and validation work?
Column mapping tells the generator which spreadsheet column fills which template field. Validation then checks every row against the template's rules and flags problems before anything is issued.
Mapping
CardDeck suggests a mapping by matching your headers to field names, for example "first_name" to First name and "dept" to Department. You confirm or change each one, mark required fields, and save the mapping. Next time you upload a file with the same headers, the saved mapping is applied automatically.
What gets flagged
- Missing photos for templates that include a photo.
- Duplicate IDs across rows.
- Empty required fields, such as a name or employee number.
- Values too long for the layout, such as a long job title that would overflow.
- Bad formats, such as an invalid date or an EAN-13 number with the wrong number of digits.
Fixing flagged rows
You can fix a row directly in the preview, or fix it in your spreadsheet and re-upload. If you fix the source sheet, the next export from your HR or registration system will also be clean.
Do not skip the preview
Look at the first, last and longest rows in the preview before generating. It takes a minute and catches layout problems that validation rules cannot, like an awkward line break in a name.
How do you export or issue the batch?
Choose between digital issue, a print-ready PDF or individual files, depending on how the cards will be used. Many organizations use more than one.
Export options
- Print-ready PDF: cards imposed onto sheets for a CR80 card printer, A4 or Letter card stock, or badge sheets, with bleed and crop marks where needed.
- Individual files: one image or PDF per card, or code-only output, delivered as a ZIP. Useful for sending files to a print service or using codes in another system.
- Digital issue: each person receives their card or ID by private link, to open on their phone.
Printing tips
- Print one sheet of samples first and check alignment, spelling and photo matching.
- Check that QR codes and barcodes scan from the printed sample, not just on screen.
- For double-sided cards, print a test sheet to confirm the back lines up with the front.
- Print in a sensible order, such as alphabetical by last name, so distribution is quick.
Codes for every row
If your template includes a QR code or barcode, each row gets its own. For QR codes, that is usually a unique link; for barcodes, the encoded value is typically the ID column. See the batch generator for the full list of supported outputs.
How many rows can you import, and how do you update a batch later?
Batch rows per job are 25 on Free, 500 on Pro, 2,000 on Team and 25,000 on Business. To update a batch later, re-import with the same ID column and only the changed rows are updated.
Working within row limits
- Split larger lists into several jobs, for example by department or year group.
- Use the same saved mapping for each part so the results are identical.
- Remember that ID cards are plan-dependent: employee IDs are on Team and above; student IDs, event badges and membership cards are on Business.
Updating an existing batch
- Export the current list from your source system.
- Upload it with the same saved mapping.
- Rows with existing IDs update those cards in place. New IDs create new cards.
- Deactivate cards for people who have left; removing a row from the sheet should not be your only offboarding step.
- Print only the new or changed cards.
A monthly routine for HR or admin teams
Once a month, export new starters and changes, re-import, print the handful of new cards and deactivate leavers. It becomes a 15-minute task instead of an annual project.
If you are starting from Excel and wondering whether you need a tool at all, our guide on making ID cards from Excel compares mail merge with the batch route.
What mistakes should you avoid when batch-generating cards?
Most batch problems come from the spreadsheet, not the generator. Check these before you upload.
Pre-upload checklist
- Headers in row 1, no blank or duplicate headers.
- No merged cells, blank rows, notes or totals.
- A unique, stable ID column, formatted as text so leading zeros survive.
- Names trimmed of extra spaces and consistently capitalized.
- Dates in one unambiguous format.
- File saved as XLSX or CSV UTF-8.
- Photos named after IDs, zipped together.
Common mistakes
- Using names as IDs, which breaks when two people share a name or someone changes theirs.
- Generating and printing in one step without previewing.
- Ignoring flagged rows and printing blank photo boxes.
- Changing the template between batches, so cards printed in March look different from cards printed in September.
- Keeping the only copy of the sheet locally. Store the source file where the next admin can find it.
- No plan for leavers. Batch generation makes issuing easy; make sure deactivation is just as routine.
FAQ
How many rows can I import in one batch?
Free allows 25 rows per job, Pro 500, Team 2,000 and Business 25,000. Larger lists can be split into several jobs using the same saved mapping.
Can I import Excel files directly?
Yes. Upload XLSX directly, or save as CSV UTF-8. Use one header row, one row per card and no merged cells.
How are photos matched to rows?
Upload a ZIP of photos named after each row's ID, such as NWL-0428.jpg. The generator matches each file to the row with that ID and flags rows without a photo.
Can I update cards after generating a batch?
Yes. Re-import the sheet with the same ID column. Existing cards are updated in place and new IDs create new cards, so you only reprint what changed.
What file formats can I export?
You can export a print-ready PDF imposed for card printers or sheets, individual files in a ZIP, or issue cards digitally by private link.
Why do accented names look wrong after import?
The file was probably saved in a regional encoding instead of UTF-8. Save as CSV UTF-8 or upload the XLSX file directly.