Need to quickly count pages in a PDF — or hundreds of PDFs? Here are 5 free methods including ZiaSign's instant page counter.
You'd think counting pages in a PDF would be trivial — and for a single file, it is. Open it, check the page indicator, done.
But when you need to:
...then you need better methods. This guide covers every approach — from the simplest online tool to developer-grade solutions.
Fastest method: Drop your PDF(s) on ZiaSign's Page Count tool — instant results, free, no account required.
TL;DR: Counting PDF pages seems simple until you need to do it for 50 files, or from a command line, or via an API. This guide covers every method to get PDF page count — from ZiaSign's free online tool to command-line approaches, Python scripts, and bulk processing solutions. Instant, accurate, and free. This guide covers everything you need to know about how to get pdf page count online — with practical steps, expert insights, and actionable recommendations for 2026.
Best for: Quick page counts, mobile, bulk files
Features:
This is the fastest method for most users. No installation, no command line, just drag and drop.
Best for: Users who already have Acrobat installed
Limitations:
Best for: Developers, power users, scripting
pdfinfo (poppler-utils)qpdfexiftoolAdvantages: Scriptable, fast, works in CI/CD pipelines Disadvantages: Requires installation, command-line comfort
Best for: Automation, integration into workflows, detailed analysis
Install the dependency:
Pro tip: Combine with pandas for CSV output, or openpyxl to generate Excel reports of page counts across your document library.
Best for: Windows administrators, batch processing
Note: The property index (156) for page count may vary by Windows version.
Print vendors charge per page. Knowing exact page counts across your document set helps you:
Law firms and legal departments track document volume by pages:
Document shipping costs depend on volume:
Content and publishing projects use page counts for:
Page counts feed into storage and archival planning:
# Install (macOS)
brew install poppler
# Single file
pdfinfo document.pdf | grep "Pages"
# Output: Pages: 42
# Bulk count — all PDFs in a folder
for f in *.pdf; do
pages=$(pdfinfo "$f" 2>/dev/null | grep "Pages" | awk '{print $2}')
echo "$f: $pages pages"
done
# Total page count across all PDFs
for f in *.pdf; do pdfinfo "$f" 2>/dev/null | grep "Pages" | awk '{print $2}'; done | paste -sd+ | bcbrew install qpdf
qpdf --show-npages document.pdf
# Output: 42brew install exiftool
exiftool -PageCount document.pdf
# Output: Page Count: 42from PyPDF2 import PdfReader
import os
def count_pages(filepath):
"""Count pages in a single PDF file."""
reader = PdfReader(filepath)
return len(reader.pages)
def count_all_pdfs(folder):
"""Count pages in all PDFs in a folder."""
results = {}
total = 0
for filename in sorted(os.listdir(folder)):
if filename.lower().endswith('.pdf'):
filepath = os.path.join(folder, filename)
pages = count_pages(filepath)
results[filename] = pages
total += pages
return results, total
# Usage
results, total = count_all_pdfs('./contracts/')
for name, pages in results.items():
print(f"{name}: {pages} pages")
print(f"\nTotal: {total} pages across {len(results)} files")pip install PyPDF2# Requires iTextSharp or similar library
# Simpler approach using Shell.Application COM object:
$shell = New-Object -ComObject Shell.Application
$folder = $shell.Namespace("C:\Contracts")
foreach ($item in $folder.Items()) {
if ($item.Name -like "*.pdf") {
$pages = $folder.GetDetailsOf($item, 156)
Write-Host "$($item.Name): $pages pages"
}
}