Skip to content

How to Create Bulk Pay Stubs

Generate pay stubs in bulk from a spreadsheet. Upload your pay stub template, map employee data fields, and produce hundreds of personalized pay stubs at once.

Creating Bulk Pay Stubs from a Spreadsheet

Processing payroll means generating a pay stub for every employee each pay period — weekly, biweekly, or monthly. Doing this manually is slow and error-prone when your team grows beyond a handful of people. With Mergram, you upload a pay stub PDF template and a spreadsheet of payroll data, map the fields once, and generate every employee’s pay stub in a single operation. Each stub is personalized with that employee’s earnings, deductions, taxes, and net pay.

Prerequisites

Before you start, make sure you have:

Design your template first

Create your pay stub template in any design tool — Canva, Microsoft Word, Google Docs, or Adobe Illustrator — and export as PDF. Leave blank areas where variable data (employee name, earnings, deductions, net pay) will be placed. Mergram fills these areas with data from your spreadsheet.

Preparing Your Payroll Data

Organize your spreadsheet with one row per employee per pay period. Here is a recommended column structure:

EmployeeNameEmployeeIDEmployeeEmailPayPeriodStartPayPeriodEndGrossPayFederalTaxStateTaxSocialSecurityMedicareHealthInsuranceRetirement401kOtherDeductionsNetPayYTDGrossYTDNet
Sarah JohnsonEMP-0142sarah@example.com2025-01-012025-01-15$3,200.00$480.00$192.00$198.40$46.40$125.00$160.00$0.00$1,998.20$38,400.00$23,978.40
Miguel AlvarezEMP-0087miguel@example.com2025-01-012025-01-15$4,500.00$675.00$225.00$279.00$65.25$125.00$225.00$50.00$2,855.75$54,000.00$34,269.00
Priya PatelEMP-0203priya@example.com2025-01-012025-01-15$2,800.00$420.00$0.00$173.60$40.60$125.00$140.00$0.00$1,900.80$33,600.00$22,809.60

Use Excel formulas for calculations

Let your spreadsheet handle the math. Use formulas like =GrossPay*0.062 for Social Security, =GrossPay*0.0145 for Medicare, and =GrossPay-SUM(FederalTax:OtherDeductions) for net pay. Mergram reads the calculated values the same as typed values — no need to paste as values first.

Designing Your Pay Stub Template

Layout Structure

A well-designed pay stub typically includes these sections:

Template SectionTypical FieldsPosition
HeaderCompany logo, company name, “PAY STUB” titleTop of page
Employee infoEmployee name, employee ID, addressUpper-left, below header
Pay periodPay period start, pay period end, pay dateUpper-right area
EarningsGross pay, hours worked, hourly rateCenter-left of page
DeductionsFederal tax, state tax, Social Security, Medicare, health insurance, 401(k), otherCenter-right of page
Net payNet pay amount (bold, prominent)Below earnings and deductions
Year-to-dateYTD gross, YTD deductions, YTD netBottom section
FooterCompany address, contact info, disclaimerBottom of page

Placing Fields on the Canvas

For each column in your spreadsheet, drag it onto the canvas in the corresponding position:

  1. Employee name and ID — Place in the employee info section, top-left of the stub
  2. Pay period dates — Place PayPeriodStart and PayPeriodEnd next to each other in the header area
  3. Gross pay — Place in the earnings section as the first and most prominent earnings field
  4. Tax deductions — Place FederalTax, StateTax, SocialSecurity, and Medicare in the deductions column
  5. Voluntary deductions — Place HealthInsurance, Retirement401k, and OtherDeductions below the tax deductions
  6. Net pay — Place in a highlighted area with larger font — this is the most important number on the stub
  7. Year-to-date totals — Place YTDGross and YTDNet in a separate row at the bottom

Adjust font sizes to match your template design — net pay should stand out clearly, while individual deduction line items can use a smaller, consistent size.


Custom Filename Templates

Use filename templates to keep your generated pay stubs organized by employee and pay period:

Filename TemplateExample Output
PayStub_[[EmployeeID]]_[[PayPeriodEnd]]PayStub_EMP-0142_2025-01-15.pdf
[[PayPeriodEnd]]_[[EmployeeName]]2025-01-15_Sarah Johnson.pdf
PayStub_[[EmployeeID]]PayStub_EMP-0142.pdf

Consistent filenames make it easy to locate specific pay stubs in your archive, whether you store them in a shared drive, upload to payroll software, or email them to employees.

Password Protection for Pay Stubs

Pay stubs contain sensitive financial information — Social Security numbers, salary details, and banking information. Password protection is strongly recommended.

Protect sensitive employee data

Pay stubs often include personally identifiable information (PII) and compensation details. Always use password protection when generating pay stubs, especially if you plan to email them or store them in shared locations.

Set a password template in the merge dialog using merge fields that only the employee would know:

Password TemplateExample ResultUse Case
[[EmployeeID]]EMP-0142Simple, employee-specific
[[SSN_Last4]]4289Last 4 digits of Social Security number
stub-[[EmployeeID]]-2025stub-EMP-0142-2025Employee ID plus year

To use a custom field like SSN_Last4, add a column to your spreadsheet containing the last four digits of each employee’s SSN. Mergram uses that value as the password for that employee’s pay stub.

Sending Pay Stubs via Email Campaigns

Combine bulk pay stub generation with email delivery to send pay stubs directly to employees:

  1. Set up SMTP — Configure your email provider in Settings → SMTP (Gmail, SendGrid, Mailgun, or any SMTP provider)
  2. Map employee email — Ensure your spreadsheet has an EmployeeEmail column with each employee’s email address
  3. Design email template — Use merge fields for personalization so each employee sees their own name and pay period
  4. Attach pay stubs — Mergram automatically attaches each employee’s generated pay stub PDF to their individual email
  5. Run the campaign — Review a preview, then send — each employee receives their own pay stub as a password-protected PDF attachment

Sample email template:

Subject: Your Pay Stub for [[PayPeriodStart]] – [[PayPeriodEnd]]

Hi [[EmployeeName]],

Your pay stub for the pay period of [[PayPeriodStart]] through [[PayPeriodEnd]] is attached.

The password to open your pay stub is your employee ID ([[EmployeeID]]).

If you have questions about your pay stub, please contact HR.

Best regards,
Payroll Team

Send pay stubs in individual mode

When emailing pay stubs, always use individual output mode so each employee receives only their own pay stub. Never send a combined PDF — that would expose every employee’s compensation to each recipient.


Best Practices for Pay Stub Generation

  1. Verify payroll calculations before merging — Double-check gross pay, all deductions, and net pay in your spreadsheet. A formula error propagates to every generated pay stub.
  2. Standardize date formats — Use a consistent format like YYYY-MM-DD across all pay period columns to avoid confusion.
  3. Include year-to-date totals — Employees and auditors expect YTD figures on every stub. Add YTDGross and YTDNet columns to your spreadsheet.
  4. Test with 2–3 employees first — Generate a small batch, open the PDFs, and verify that every field is correctly placed and amounts match before running the full payroll.
  5. Always password-protect — Pay stubs contain PII and salary data. Use a password template so only the intended employee can open their stub.
  6. Archive each pay run — Download the generated pay stubs after each payroll cycle and store them in a secure, organized folder for compliance and audit purposes.

Common Issues and Troubleshooting

Currency symbols not rendering correctly: Ensure your spreadsheet cells are formatted as text or use consistent currency formatting. If the PDF displays unexpected characters, try using plain numbers without currency symbols and add the $ symbol as static text on the template.

Deductions with zero values showing blank: If an employee has no optional deductions (e.g., OtherDeductions is $0.00), the field may look empty. You can either place a static $0.00 label on the template or ensure your spreadsheet always contains a value — even zero — so the field renders consistently.

Employee names with special characters: Names containing accents (e.g., “José Martínez”), hyphens (e.g., “Mary-Jane Wilson”), or non-Latin characters (e.g., “Li Wei 李伟”) are fully supported. Ensure your CSV file is saved with UTF-8 encoding if exporting from Excel.

Pay stubs exceeding one page: If your template has many deduction categories, the layout may overflow. Reduce font sizes for deduction line items, or design your template with a compact two-column layout for earnings and deductions side by side.

Get Started

Upload your pay stub template and payroll spreadsheet to the Mergram editor. Map employee fields onto the canvas, preview with real data, enable password protection, and generate your entire batch of pay stubs in one click.

Step-by-step guide

  1. 1

    Design Pay Stub Template

    Create a pay stub layout in your preferred tool (Word, Canva, Google Docs). Include spaces for employee info, earnings, deductions, and net pay. Export as PDF.

  2. 2

    Prepare Payroll Data

    Create a spreadsheet with one row per employee. Include columns for name, employee ID, pay period, gross pay, all deductions, and net pay.

  3. 3

    Map Fields

    Upload your PDF and spreadsheet to Mergram. Drag each column onto the canvas at the correct position on the pay stub layout.

  4. 4

    Generate and Deliver

    Preview a sample pay stub, verify calculations, then generate all pay stubs. Download as a ZIP or email directly to employees.

Frequently asked questions

Can I generate pay stubs with different deductions per employee?
Yes. Each row in your spreadsheet represents one employee with their own earnings, taxes, and deductions. Every pay stub is fully personalized with the values from that row.
Can I password-protect pay stubs?
Yes. Pay stubs contain sensitive financial information. Use the password protection feature with a template like [[EmployeeID]] or [[SSN_Last4]] to encrypt each pay stub with a unique password that only the employee knows.
What should my pay stub spreadsheet look like?
Include columns for employee name, employee ID, pay period start and end dates, gross pay, federal tax, state tax, Social Security, Medicare, health insurance, retirement contributions, net pay, and year-to-date totals. One row per employee per pay period.
Can I email pay stubs directly to employees?
Yes. Set up your SMTP server (Gmail, SendGrid, or any provider), create an email template with merge fields, and Mergram sends each pay stub as a personalized PDF attachment to the corresponding employee.
Can I include a company logo on pay stubs?
Yes. Include your logo in the PDF template design before uploading. Alternatively, use Mergram's image fields to dynamically place logos for different departments or subsidiaries.

Ready to try it yourself?

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

Related articles