Skip to content

PDF Mail Merge — Fill PDFs from Excel, CSV & Google Sheets

PDF mail merge tool — fill hundreds of PDF forms with data from Excel, CSV, or Google Sheets. Bulk-generate invoices, certificates, and contracts.

What Is PDF Mail Merge?

PDF mail merge fills a PDF template with data from a spreadsheet — generating one personalized document per row. It’s the same concept as Word mail merge, but for PDF files.

You upload a PDF template (or import a Canva design), connect a spreadsheet, and place dynamic fields on the document. Each row in your data produces a separate PDF with the corresponding values filled in.

One template + one spreadsheet = hundreds of personalized documents.

Why PDF Mail Merge Matters

Traditional mail merge has been around since the 1980s — but it was built for Word documents and printed letters. Modern businesses need the same power applied to PDFs, which are the standard format for invoices, contracts, certificates, and compliance documents.

PDF mail merge solves a specific problem: you have one template and hundreds (or thousands) of records, and you need a separate PDF for each record. Without a merge tool, you’d be opening each PDF manually, typing in data, and saving — a process that doesn’t scale past a few dozen documents.

Mergram automates this entirely. Upload your template once, connect your data, and let the platform generate all documents in one job. The result is consistent, accurate, and takes minutes instead of days.

New to mail merge?

Try the free demo at mergram.com/try — no sign-up required. Upload a sample PDF and spreadsheet, drag fields onto the page, and see merged output in seconds.


How It Works

Mergram provides a visual, browser-based editor where you drag data fields directly onto your PDF pages. No coding, no command-line tools, no desktop software to install.

Step 1 — Upload Your PDF Template

Upload any PDF file from your computer, or import a design directly from Canva. Your template defines the static layout — logos, headers, borders, typography, and any content that stays the same across all generated documents.

Accepted template sources:

Design tip

Design your template in whichever tool you prefer — Canva, Figma, InDesign, Google Docs, or Word. Export as PDF, then upload to Mergram. Your design stays intact; only the fields you place get replaced with data.

Step 2 — Connect Your Data Source

Upload a spreadsheet file or connect a Google Sheet. Mergram reads the first row as column headers and treats each subsequent row as one record to merge. You can work with up to 100,000 rows in a single job.

Select from these data sources:

SourceFormatsConnectionMax Rows
Excel.xlsx, .xls, .odsFile upload100,000
CSV.csv, .tsv, semicolon-separated, tab-separatedFile upload100,000
Google SheetsLive Google SheetsDirect connection via OAuth100,000
REST APIJSON payloadHTTP POST request100,000

For multi-sheet Excel workbooks, Mergram shows a sheet picker so you can select the right tab before merging.

Step 3 — Place Data Fields Visually

Drag column headers from the sidebar directly onto your PDF pages. Each field becomes a positioned box you can resize, align, and configure:

Quick start

If your PDF has fillable AcroForm fields, Mergram auto-detects them and suggests column mappings using fuzzy matching. You can review and adjust mappings before merging — no manual placement needed for form-based PDFs.

Step 4 — Preview & Generate

Use the row selector to preview any individual row in real time — rendered directly in your browser, no server round-trip needed. Check alignment, font sizes, and data formatting before committing to a full run.

When you’re satisfied, generate your documents:

Background workers process bulk jobs with real-time progress tracking — watch as each row is rendered, with pause and resume support for large batches.


Supported Data Sources

Microsoft Excel (.xlsx, .xls, .ods)

Upload any Excel file directly from your computer. Mergram supports all modern Excel formats:

Column headers are read from the first row. Data starts from row two. For multi-sheet workbooks, a sheet picker lets you select the correct tab.

CSV Files

Mergram handles CSV files with flexible delimiter support:

Encoding

Mergram handles UTF-8 and Latin-1 encoded CSV files, so accented characters (é, ñ, ü) and non-Latin scripts (日本語, 한국어, Текст) display correctly.

Google Sheets

Connect a Google Sheet directly via OAuth — no file downloads required. Select any spreadsheet from your Google Drive and choose the worksheet tab.

Advantages over file upload:

REST API (JSON)

For programmatic access, send JSON data directly via the API:

{
  "templateId": "tpl_abc123",
  "data": [
    {"name": "Alice Chen", "amount": "$1,500.00", "due": "2025-02-15"},
    {"name": "Bob Martinez", "amount": "$2,300.00", "due": "2025-02-15"}
  ]
}

This is ideal for integrations with CRM systems, webhooks, and automated pipelines.


Field Types

Every spreadsheet column can be rendered in multiple ways. Choose the best type for each field:

Text Fields

The default render type. Displays the cell value as styled text on the PDF.

Text fields support custom fonts (including uploaded .ttf, .otf, .woff, .woff2 files), configurable size, color, alignment, and full Unicode support — including CJK characters, Arabic, Cyrillic, and emoji.

QR Codes

Generate dynamic QR codes from spreadsheet values. Common uses:

QR codes are generated at high resolution and embedded as PNG images in the PDF.

Barcodes

Insert machine-readable barcodes for product labels, shipping, and inventory:

SymbologyBest ForExample Data
Code 128General purpose, alphanumericINV-2025-0042
EAN-13Retail products, ISBNs5901234123457
UPC-AUS retail products012345678905
Code 39Industrial, automotivePART-9921
ITF-14Shipping containers, cartons15400141288763
PharmacodePharmaceutical packaging117480

Image Fields

Dynamically insert photos, logos, and signatures from your team’s Media Albums. The spreadsheet cell contains the image filename, and Mergram resolves it to the corresponding uploaded image.

Use cases include:

Images scale to cover the bounding box, maintaining aspect ratio, and are aligned to the top-left corner of the field bounding box. An optional margin can be applied for padding.

PDF Form Fields (Auto-Detected)

If your PDF has AcroForm fields (created in Adobe Acrobat, LibreOffice, or other PDF editors), Mergram detects them automatically and suggests column mappings using fuzzy matching:

Review and adjust all mappings before generating. No manual field placement needed for form-based PDFs. This is the fastest path when your template already has defined form fields.

Form mode vs. canvas mode

Canvas mode works with any PDF — you place fields freely. Form mode only works with PDFs that have fillable AcroForm fields. If Mergram detects form fields, you’ll see both options. Choose whichever fits your workflow.


Output Options

Combined PDF

All generated pages are concatenated into a single PDF file. This is useful when you need one downloadable document — for example, a full set of invoices to send to accounting, or all certificates in one printable file.

Individual PDFs

Each row produces a separate PDF file, packaged as a ZIP download. This is ideal when you need to distribute documents individually — email each person their own file, or upload to separate records in a CRM.

Custom Filenames

Use filename templates to name output files dynamically based on spreadsheet data. For example:

Filenames are automatically sanitized to remove characters that are invalid on Windows, macOS, and Linux.

Password Protection

Encrypt each generated PDF with a unique password derived from your spreadsheet data. Use templates like:

PDFs are encrypted with RC4 128-bit, compatible with all standard PDF readers (Adobe Acrobat, Preview, Chrome, Firefox).

Email Delivery

Skip the download step entirely — connect your SMTP server and send each PDF as a personalized email attachment. Supported SMTP providers include:

Email body supports rich text (HTML), merge field placeholders (e.g., Dear [[Name]]), and per-recipient customization.

Email campaigns

Use Mergram’s email campaign feature to send thousands of personalized PDFs with progress tracking, per-recipient status, and retry support.


Use Cases

Invoices & Billing

Generate personalized invoices for every client. Include line items, tax calculations, payment terms, and QR codes for payment links. Mergram handles the tedious part — producing consistent, professional invoices for dozens or hundreds of clients in one operation.

→ See Invoice Template

Certificates & Diplomas

Create completion certificates, diplomas, and awards in bulk. Add custom calligraphy fonts, recipient photos, and verification QR codes that link to an online validation page.

→ See Certificate Template

Contracts & Agreements

Fill contract templates with client data — NDAs, service agreements, employment contracts, lease agreements. Encrypt with per-recipient passwords so each party can only open their own document.

→ See Real Estate Use Case

Shipping Labels & Packing Slips

Print address labels, shipping stickers, and packing slips with barcodes for tracking. Generate one label per order directly from your order spreadsheet.

Event Tickets & Badges

Design and print personalized event tickets with unique QR codes for check-in. Support tiered ticket types — VIP, General, Early Bird — from a single template.

→ See Event Ticket Template

HR & Onboarding Documents

Generate employee-specific onboarding packets — offer letters, benefits enrollment forms, policy acknowledgments, and tax forms — all personalized from an HR spreadsheet.

Healthcare Patient Forms

Fill patient intake forms, consent forms, and insurance documents with data from your practice management system. Export as CSV from your EHR, merge with PDF templates.

Letters & Correspondence

Generate personalized formal letters — offer letters, thank-you letters, cover letters, and notification letters with custom letterhead.


API & Automation

REST API Overview

Mergram’s REST API lets you trigger merges programmatically from any application. Authenticate with API keys, send template and data payloads, and receive download URLs for generated files.

Key capabilities:

API Call Example

Here’s a real example — generating two personalized invoices from a stored template:

curl -X POST https://mergram.com/api/v1/merge \
  -H "Authorization: Bearer mg_abc123def456" \
  -H "Content-Type: application/json" \
  -d '{
    "templateId": "tpl_abc123",
    "data": [
      {
        "name": "Alice Chen",
        "company": "Acme Corp",
        "amount": "$1,500.00",
        "due_date": "February 15, 2025",
        "invoice_number": "INV-0042"
      },
      {
        "name": "Bob Martinez",
        "company": "Globex Inc",
        "amount": "$2,300.00",
        "due_date": "February 15, 2025",
        "invoice_number": "INV-0043"
      }
    ],
    "output": {
      "mode": "individual",
      "filename_template": "[[invoice_number]]_[[company]]"
    }
  }'

Response:

{
  "jobId": "job_789xyz",
  "status": "pending",
  "itemCount": 2
}

Poll GET /api/v1/jobs/{jobId} for status.

→ See API Reference

Zapier Integration

Trigger merges from 2,000+ Zapier-connected apps without writing code:

→ See Zapier Integration Guide

Make.com Integration

Build multi-step automation scenarios with Mergram’s Make.com connector:

→ See Make.com Integration Guide

Polling

Jobs are processed asynchronously. Poll the status endpoint at intervals (every 2–5 seconds is recommended) until the status is completed or failed. See the API Reference for polling details.


Security & Privacy

Browser-Based Preview

Single-row previews run entirely in your browser — your PDF template and data never leave your machine during the preview phase. Only when you trigger a bulk merge does data get sent to Mergram’s servers for processing.

This means you can test field placement, alignment, and formatting with zero privacy risk. Sensitive data stays local until you decide to generate.

Server-Side Encryption

When you run a bulk merge, all data is transmitted over HTTPS/TLS 1.3 and stored with AES-256 encryption at rest. Generated PDFs are encrypted and accessible only via signed, time-limited download URLs.

PDF Password Protection

Each generated PDF can be encrypted with a unique password derived from your spreadsheet data. Uses RC4 128-bit encryption compatible with all standard PDF readers. Passwords are never stored — they’re generated on-the-fly from your template during the merge.

SMTP Credential Security

SMTP passwords are encrypted with AES-256-GCM before storage. They are decrypted only at the moment of sending and are never logged or exposed in API responses.

Enterprise Self-Hosted Option

For organizations with strict data residency or compliance requirements, Mergram offers a self-hosted Enterprise deployment:

Data Retention

Generated documents are automatically purged based on configurable retention policies. In SaaS mode, files are deleted after the retention period. In Enterprise mode, you control the retention schedule entirely.

Compliance

Mergram’s security practices are designed to support GDPR, HIPAA, and SOC 2 requirements. For specific compliance questions, contact the security team.


Pricing

Free Tier

Every new user starts with free credits — enough to test all features end-to-end. Upload a real PDF template, connect a real spreadsheet, place fields, preview, and generate actual merged documents. No credit card required.

Try it free at mergram.com/new

Credit System (SaaS)

Mergram uses a credit-based pricing model. Each row of data consumes one credit, regardless of how many pages the output PDF has. This means:

Plans include a monthly credit allocation:

PlanMonthly CreditsBest For
StarterModerate volumeSmall teams, freelancers
ProHigher volumeGrowing businesses, agencies
MaxMaximum capacityLarge organizations, high-volume operations

Monthly subscription credits reset each billing cycle.

Enterprise — Unlimited

For organizations that need unlimited generations and full control:

→ See Billing & Credits for full plan details and Enterprise pricing.


Get Started

Try Mergram’s PDF mail merge editor free — free account required. Upload a PDF and spreadsheet, drag fields onto your template, and preview merged results instantly in your browser. No account? Try the light demo first — no sign-up required.

It takes under five minutes from upload to your first merged document.

What you need to get started:

  1. A PDF template — any PDF file (invoice, certificate, contract, label, etc.)
  2. A spreadsheet — Excel, CSV, or Google Sheet with your data
  3. A free Mergram account — sign up at mergram.com/new

What you don’t need:

Step-by-step guide

  1. 1

    Upload Your PDF Template

    Upload a PDF, image, or import a Canva design. The template defines the layout and static content — logos, headers, styling.

  2. 2

    Connect Your Data

    Upload an Excel, CSV, or ODS file — or connect a Google Sheet directly. First row is used as column headers. Supports up to 100,000 rows.

  3. 3

    Place Data Fields

    Drag column headers from the sidebar onto your PDF pages. Choose rendering type: text, barcode, QR code, or image. Position and resize freely.

  4. 4

    Preview & Merge

    Preview merged output with real data. Then generate — individual PDFs, a combined file, or send via email. Download as ZIP or send to recipients.

Key features

Visual Field Editor

Drag-and-drop field placement on a live PDF preview. Resize, align, and snap to center.

100K Row Processing

Background workers handle bulk jobs with real-time progress tracking and pause/resume.

QR Codes & Barcodes

Embed dynamic QR codes and barcodes (Code 128, EAN-13, UPC-A) from spreadsheet data.

Image Fields

Dynamically insert photos, logos, and product images from your team's Media Albums.

Custom Fonts

Upload any .ttf, .otf, .woff, or .woff2 font. Full Unicode and CJK character support.

Email Campaigns

Send merged PDFs as personalized email attachments via your own SMTP server.

PDF Encryption

Per-recipient password protection using templates like [[lastName]]-[[id]].

REST API

Programmatic access with API keys. Trigger merges from Zapier, Make.com, or your own app.

Google Sheets

Connect live Google Sheets data. No downloads — select spreadsheets directly in the editor.

Canva Import

Import Canva designs as PDF templates. Design in Canva, merge in Mergram.

Template Management

Save, organize, and share templates in folders. Version history with auto-pruning.

Enterprise Self-Hosted

Deploy on your infrastructure. Unlimited generations, custom retention, full data control.

Frequently asked questions

What is PDF mail merge?
PDF mail merge is the process of filling a PDF template with data from a spreadsheet — one personalized PDF per row. It works like Word mail merge, but for PDF documents. Upload your template, connect your data, and generate hundreds of documents automatically.
What file formats are supported for the data source?
Mergram supports Excel (.xlsx, .xls, .ods), CSV (.csv, .tsv), and Google Sheets. You can also use the REST API to send JSON data programmatically.
Can I fill existing PDF form fields?
Yes! Mergram auto-detects AcroForm fields in your PDF and maps them to spreadsheet columns using fuzzy matching. You can review and adjust all mappings before generating.
How many documents can I generate at once?
Up to 100,000 documents in a single job. Mergram's background worker system handles high-volume processing with progress tracking.
Does it work with Canva designs?
Yes, import any Canva design as a PDF template directly via the Canva integration. Your designs become merge-ready templates.
Can I send the generated PDFs via email?
Yes, connect your SMTP server (Gmail, SendGrid, Mailgun, Amazon SES, etc.) and Mergram sends each PDF as a personalized email attachment.
Is my data secure?
All files are encrypted in transit and at rest. Generated documents are purged based on configurable retention policies. Enterprise mode runs entirely on your own infrastructure.
Can I password-protect the generated PDFs?
Yes, each PDF can have a unique password derived from your spreadsheet data (e.g., [[lastName]]-[[birthYear]]). Uses RC4 128-bit encryption compatible with all PDF readers.
Do I need to install anything?
No, Mergram runs entirely in your browser. Upload files, place fields, preview, and generate — no downloads or plugins required.
Is there a free trial?
Yes, try Mergram free at mergram.com/new — free account required. Upload a PDF and spreadsheet, drag fields, and preview merged results instantly. Want to try without signing up? Use the light demo at mergram.com/try.

Explore by topic

PDF Mail Merge from Excel

Merge data from Excel spreadsheets (.xlsx, .xls, .ods) into PDF templates. Bulk-generate invoices, certificates, and contracts from your Excel data.

PDF Mail Merge from Google Sheets

Connect Google Sheets directly to your PDF template for live data mail merge. No file downloads — pull the latest data from your Google account.

PDF Mail Merge from CSV Files

Use CSV or TSV files as your data source for PDF mail merge. Import comma-separated, semicolon-separated, or tab-separated data for personalized documents.

Bulk Certificate Generation

Mass-generate certificates from a spreadsheet. Upload your certificate template, place name and date fields, and produce hundreds of personalized certificates in one batch.

Bulk Invoice Generation

Generate personalized invoices in bulk from your billing spreadsheet. Upload your invoice template, map client data fields, and produce hundreds of invoices at once.

Bulk Contract Generation

Generate personalized contracts and agreements in bulk from spreadsheet data. Add per-document password protection for sensitive legal content.

PDF Mail Merge with Email Delivery

Send personalized PDFs as email attachments directly from your mail merge. Configure SMTP, compose templates, and deliver to hundreds of recipients in one job.

Password-Protected PDF Mail Merge

Encrypt your merged PDFs with unique per-recipient passwords. Use spreadsheet data to generate individual passwords for sensitive documents like contracts and pay stubs.

QR Code PDF Mail Merge

Embed dynamic QR codes into your merged PDFs. Generate unique scannable codes for URLs, verification links, event check-in, product IDs, and more from spreadsheet data.

Image PDF Mail Merge

Dynamically insert photos, logos, and signatures into your merged PDFs. Map image filenames in your spreadsheet to files in Media Albums for personalized documents.

Barcode PDF Mail Merge

Add barcodes to your merged PDFs using spreadsheet data. Generate Code 128, EAN-13, UPC-A, and other barcode types for shipping labels, inventory tags, and product IDs.

Word Mail Merge to PDF

Convert your existing Word mail merge templates into PDF templates. Keep your merge workflow but get better formatting, dynamic images, QR codes, and email delivery.

PDF Mail Merge for Pay Stubs

Generate personalized pay stubs in bulk from your payroll spreadsheet. Upload a pay stub template, map employee earnings and deductions, and produce hundreds of pay stubs in one batch.

Ready to try it yourself?

Start merging PDFs in minutes — free account required, no credit card needed.