Mail merge QR codes: a unique code on every badge, letter and email
3 December 2026
Generating a hundred QR codes is the easy part. Getting each one onto the right
badge, ticket or place card is where the afternoon goes: open the folder, find
ticket-047.png, drag it into the layout, check the name next to it matches,
repeat. Get one wrong and someone's ticket opens someone else's booking.
Layout tools solved this years ago with mail merge, or data merge: you design one page, point it at a spreadsheet, and it builds a page per row. Email tools do the same with one message per row. The only missing piece was a spreadsheet that knows where each QR code image is. Every BulkQR download of PNG or SVG images now comes with one.

The examples in this series all use the same made-up guest list for a gala: eight guests, each with a ticket link, a name, a table and an email address.
What's in the ZIP
Alongside your images, the download has two extra files at the top of the folder:
_merge.csv, one row per code, in the same order as your list._merge-README.txt, short instructions for InDesign, Affinity Publisher and Word.
The underscore keeps them at the top of the folder, above the images.

Opened in a text editor, the CSV starts like this:
row,data,filename,caption,Name,Table,Email,@image,status
1,https://example.com/gala/t/001,ticket-001,Scan at the door,Ann Lee,Table 4,ann.lee@example.com,ticket-001.png,ok
2,https://example.com/gala/t/002,ticket-002,Scan at the door,Raj Patel,Table 2,raj.patel@example.com,ticket-002.png,ok
- data, filename, caption: each code's data, file name and caption, from whichever columns of your list they came from.
- Name, Table, Email: every other column in your list, under its own heading (more on these below).
- @image: the image file for that row. The
@at the start is how InDesign knows the column holds pictures, not text. If you choose both PNG and SVG, you get an@image_svgcolumn too. - status:
ok, orfailedif that code couldn't be made (say, the data was too long to fit in a QR code). Failed codes keep their row with an empty image, so the file still lines up with your spreadsheet row for row.
The file is UTF-8, so accented names come through as they should.
Bring your whole list, headings and all
Import your guest list or product sheet as it is, heading row included. BulkQR works out which column holds the code's data, which the file name and which the caption, and shows its pick in the Columns panel under the Data box, where you can change it. Generating QR codes from spreadsheets explains how it decides.

Every other column, such as a guest's name, a table number, an email address or a SKU, is carried straight through to the merge file under its own heading, up to 20 of them. The text on each badge comes from the same row as its code, so the two can't drift out of step. (Dynamic codes are the exception for now: their merge file leaves the other columns out, though its rows are still in your list's order.)
URL,Filename,Caption,Name,Table,Email
https://example.com/gala/t/001,ticket-001,Scan at the door,Ann Lee,Table 4,ann.lee@example.com
https://example.com/gala/t/002,ticket-002,Scan at the door,Raj Patel,Table 2,raj.patel@example.com
Turned a list of contacts into contact cards? The columns still land in
_merge.csv, so the name and company on each badge can sit beside its card.
No heading row? A column of web addresses is still found wherever it sits.
Otherwise column A is the data, B the file name and C the caption, as before,
and the other columns arrive named by position: column4, column5 and so on.
Leave the file name or caption blank if you don't need them, but keep the commas
so your details stay in column 4. To give them friendlier names, open
_merge.csv in a text editor and change column4 to Name in the first line,
leaving @image as it is. (Saving from Excel works too, as long as you choose
CSV UTF-8, or accented names turn to gibberish.)
Pick your tool
The merge file works anywhere that can read a CSV. These guides take it step by step:
- Adobe InDesign is the easiest:
Data Merge reads the
@imagecolumn as it is, and can fill a page with badges or labels. - Microsoft Word handles letters, certificates and label sheets, with one field code for the picture.
- Gmail and Outlook send each person their own code by email, as an attachment or a link.
Affinity Publisher works much like InDesign: add _merge.csv as a data
source in the Data Merge Manager and link your picture frame to the @image
field.
Whichever you use, scan a few codes from the proof, or the test email, with an ordinary phone before the real run. What makes a good QR code covers the size and contrast that keep them scanning.
Big batches and the API
Up to 100 codes are made in your browser, so your guest list never leaves your
laptop, merge file included. Larger batches run on our servers and get exactly
the same file, at any size. Developers using the API get it too:
send extra values in each item's fields and name the columns with
fieldNames.
For more on getting a list into shape first, see bulk QR codes from a CSV.
Got a list and a layout? Generate your codes and merge them in one go.