Skip to content
PDFBetter

Mail merge to PDF

Mail merge from a CSV file to PDF

CSV is what most systems export: your CRM, payroll tool, donor database, learning platform or form responses. Merging a CSV into a PDF fills one copy of the document per row, so you can go from an export to a folder of named, filled PDFs without re-typing anything.

Reviewed

Why it works

CSV to PDF mail merge, explained

CSV files are plain text, which makes them predictable but brings two pitfalls. Encoding: save as UTF-8 so names like José and Zoë come through intact. Separators: some regional settings export with semicolons instead of commas, and values that contain commas, such as addresses, must be in double quotes. Most exports handle both correctly; hand-edited files are where problems appear.

Opening a CSV in Excel before uploading can change it: leading zeros vanish, long ID numbers turn into scientific notation and dates get reformatted. If you need to edit the file, check those columns before saving it back. Runs of up to 50 rows can be generated in your browser for free, and the spreadsheet and PDFs never leave your device. Larger runs are generated on PDFBetter's servers and count toward your monthly spreadsheet fill rows: 25 on Free, 500 on Pro and 5,000 on Business.

How to do it

Mail merge from a CSV file to PDF in 5 steps

  1. 1A form

  2. 2Type into the fields

  3. 3A filled copy

  1. 1

    Export the CSV

    Export from your source system with a header row. Choose UTF-8 encoding if you're asked.

  2. 2

    Prepare the PDF

    Use a PDF with fillable fields, or add them with Create fillable PDF. Naming fields like the CSV headers makes mapping automatic.

  3. 3

    Upload and map

    Upload the CSV and match each column to a field. Check the first rows to confirm accented names and long numbers came through correctly.

  4. 4

    Name the files

    File names come from a template you write with column names in braces, such as {last_name}-{first_name}. {#} inserts the row number and {#:3} pads it to three digits (007). Characters that aren't allowed in file names, such as slashes and colons, become spaces, and a row whose template comes out empty is named record-001 and so on.

  5. 5

    Validate and generate

    Rows that break a field's rules, like an invalid email or a value over the maximum length, are listed before generation so you can fix the CSV and upload it again.

Start from a template

Templates that fit

CSV to PDF mail merge: questions people ask

My accented characters show up garbled

The file wasn't saved as UTF-8. Re-export it as UTF-8, or open it in a text editor and save with UTF-8 encoding.

Does it handle semicolon-separated files?

Use comma-separated values with a header row for the most reliable result. If your system exports with semicolons, re-export with commas or convert the file before uploading.

A long ID number turned into 1.23E+15

That happened when the CSV was opened and saved in a spreadsheet app. Use the original export, or format that column as text before saving.

Can I merge form responses back into a PDF?

Yes. Export a PDFBetter form's responses as CSV, then use them here to fill a letter, receipt or certificate for each respondent.

What happens to columns I don't map?

They're ignored for filling, but you can still use them in the file name template.