PDF Guides

How to Rename PDFs Automatically from Their Contents (Invoices, Statements, Orders)

Name PDF files from invoice numbers, dates and totals inside them: naming patterns, ISO dates that sort, custom regex fields and handling scanned files.

Saizul Amin
Saizul Amin28 Oct 2026 · 3 min read
How to Rename PDFs Automatically from Their Contents (Invoices, Statements, Orders)

How to Rename PDFs Automatically from Their Contents

Downloads folders fill up with names like invoice.pdf, invoice (1).pdf and document-2.pdf. Finding last March's electricity bill becomes a search through dozens of files. A consistent naming convention fixes that, and you do not have to type the names yourself. This guide explains good file naming and how to apply it to many PDFs at once with PDF Batch Rename by Content.

What makes a good file name

A useful file name answers the questions you will ask later: what is it, from whom, when, and for how much. For financial documents a strong pattern is:

date_supplier-or-number_amount

For example 2026-03-12_INV-2041_1,250.00.pdf. Three rules help:

  1. Put the date first in year-month-day order. Files then sort chronologically by name. This is the ISO 8601 format and avoids the day-month confusion between UK and US dates.
  2. Use a unique reference. Invoice, order or account numbers make each file distinct.
  3. Avoid characters that cause problems. Slashes, colons and question marks are not allowed in file names on some systems.

How the tool finds the values

The tool reads the text layer of each PDF and looks for common patterns:

  • invoice or bill numbers after words like "Invoice No." or "INV #";
  • dates written as 2026-03-12, 12/03/2026, 12.03.26 or 12 March 2026;
  • totals after "Total", "Amount due", "Balance due" or "Grand total";
  • order and purchase order numbers;
  • account numbers;
  • e-mail addresses;
  • the first line, which is often the company name.

You combine them in a pattern such as {date}_{invoice}_{total}. Missing values are left out, and separators are tidied so names do not end with stray underscores.

Custom fields

Insurance policies, payslips and utility bills use their own labels. Write a short regular expression with one group for the value, such as Policy\sNo\.?\s(\w+), and use {custom} in the pattern.

Dates: day first or month first?

A date like 03/04/2026 is ambiguous. The tool reads slash dates day first, as in the UK, Europe and Australia, and converts them to ISO. If your documents use US month-first dates, keep dates as written, or use a custom pattern.

Scanned documents

Renaming needs text. Scans without OCR have none, so they keep a name based on the original. The preview table flags them. Run OCR first, then rename, and check numbers carefully because OCR can misread characters.

Check before you download

The preview table shows the old name, the new name and the values found. Look for files where the wrong number was picked up, which can happen when an invoice also shows a customer number or a previous invoice reference. Adjusting the pattern or reading only the first page usually solves it.

Folders and names work together

Names do not have to carry everything. A folder per year and per supplier, combined with date-first names, is easy to browse and to back up. Keep the pattern short enough to read in a file list: three or four fields are usually plenty. If several people save documents to the same place, agree the pattern once and save it as a preset in the tool, so every batch comes out the same way.

Example

An accounts assistant has 40 supplier invoices with download-style names. Using {date}_{invoice}_{total}, the table shows clean names for 38 of them. Two scanned invoices are flagged as having no text. The ZIP of renamed copies goes into the bookkeeping folder, sorted by date.

Privacy and limits

Files are read in your browser and never uploaded. The tool creates renamed copies; it does not change the documents. Naming is an organisational aid and not a substitute for the record-keeping your tax authority or auditor requires.

Completely freeNo cost, no sign-up
Files stay privateEverything runs in your browser
Easy in your languageAvailable in many languages