Add Headers & Footers to PDF - Custom Text Online Free
Stamp custom top and bottom text with placeholders, alignment, and color - entirely in your browser. 50 MB max.
Upload PDF
Loading PDF tools...
Header & Footer Settings
Use {page} and {total} for dynamic values. Leave blank to skip header.
Result
No stamped PDF yet
Upload a PDF, configure text, and click Apply
What Is a PDF Headers and Footers Tool?
A PDF headers and footers tool stamps repeating text bands at the top and bottom margins of every selected page. Headers often carry the organization name, document title, or section label; footers commonly show confidentiality notices, revision dates, or page references. Unlike re-exporting from Word or InDesign, this page modifies an existing PDF in place using pdf-lib drawText on each page content stream. Text is vector-based Helvetica, so it stays sharp when printed and adds minimal file size compared with overlaying image watermarks.
This tool is broader than automatic page numbering. You type any string for the header and footer independently, including {page} and {total} placeholders that resolve per page. For preset numbering formats (Page 1, 1 of N, Page 1 of N) with a dedicated UI, use the specialized PDF page numbers tool linked below. Many workflows use both: headers here for branding, page numbers there for court filing rules.
Processing is 100% browser-side. validatePdfUpload and getPdfPageCount from @/lib/pdf-io enforce the 50 MB cap and confirm page count before pdf-lib loads. Optional parsePageRange lets you stamp only appendix pages or skip cover sheets. Nothing is uploaded to a server - suitable for board packs, HR policies, and client deliverables when cloud stamping tools are blocked by IT policy.
Headers and footers draw on top of existing page content. They do not reflow body text or add margin boxes the way Word section headers do. If your PDF already fills the page edge to edge, increase the margin offset or accept slight overlap. For diagonal DRAFT stamps across the page center, use PDF watermark instead - watermarks span the body; headers and footers stay in margin bands.
How to Add Headers and Footers - Step by Step
Most documents take under two minutes. You can stamp header only, footer only, or both bands in one click.
- Upload your PDF - Drag and drop or choose a file up to 50 MB. PDF.js counts pages immediately.
- Enter header and footer text - Separate fields for top and bottom bands. Use {page} and {total} where needed. Leave either field blank to skip that band.
- Set alignment, size, and color - Left, center, or right for each band. Adjust point size, hex color, and margin offset from the page edge.
- Choose all pages or a range - All pages stamps the full document; Page range accepts syntax like
2, 5-10. - Apply and download - Click Apply Headers & Footers. pdf-lib writes text on each target page locally. Download saves a new file; your original upload is untouched.
Worked Example - Before and After
A consulting firm sends a 12-page strategy PDF exported from slides. Recipients cannot tell which revision they received, and there is no confidentiality marking. Board members often print packets - without headers they cannot match a printed page back to the correct email attachment when three versions circulated the same week.
Before
12-page client proposal with no running header; reviewers cannot tell which deck version they received.
After
Every page shows Acme Corp - Draft Q3 Proposal in the top center and Confidential - Page {page} of {total} bottom right.
Settings on this page: header text Acme Corp - Draft Q3 Proposal, center aligned, 10 pt, dark gray; footer Confidential - Page {page} of {total}, right aligned; margin 36 pt; all pages. One click applies both bands to every page. If only the appendix (pages 8–12) needs a legal disclaimer footer, switch to Page range and enter 8-12 with header text cleared. Open the download in Chrome and scroll pages 1, 6, and 12 to confirm placeholders resolved correctly - page 6 should read Page 6 of 12, not literal braces. Print a single page to verify the footer does not overlap slide footnotes exported from PowerPoint; increase margin to 48 pt if overlap appears.
Real-World Use Cases
1. Confidentiality banners on board packs
Directors expect every page of a board PDF to read PRIVATE AND CONFIDENTIAL in the footer center. Upload the pack, set footer text and center alignment, apply to all pages, download before email - no Acrobat license required.
2. Client branding on deliverable reports
Agency exports lack the client logo in vector form but still need the client name in the header. A left-aligned header with the client legal name on every page satisfies brand guidelines until a designed template replaces the export.
3. Course handouts with chapter titles
Professors merge weekly readings into one PDF. Header text CS 101 - Week {page} is wrong for folios - instead use a static chapter name in the header and {page} only in the footer. Page range limits stamping to inserted chapters only.
4. Legal exhibit labels
Exhibits need EXHIBIT A - Smith Deposition in the top left of pages 1–45 only. Upload the exhibit PDF, set header left aligned, range 1-45, apply. Main brief pages stay unmodified if uploaded separately.
5. ISO document control footers
Quality teams stamp DOC-REV-2024-08 | Page {page} of {total} bottom center on controlled procedures exported from SharePoint. Browser-only processing keeps controlled docs off third-party SaaS upload queues.
6. RFP response version tracking
Footer text Response v3 - {page}/{total} right aligned helps evaluators confirm they opened the latest submission when multiple versions circulate by email.
7. Medical records sharing notices
HIPAA-conscious clinics add FOR TREATMENT PURPOSES ONLY in the header on every page of a summary PDF before portal upload. Local processing avoids cloud exposure beyond what the clinic already permits.
8. Real-estate disclosure packets
Agents combine inspection reports. A header with property address and footer with brokerage name on all pages satisfies state disclosure checklists without re-scanning paper.
9. Draft watermarks paired with footers
Header DRAFT - NOT FOR DISTRIBUTION plus footer date reminds reviewers the PDF is not final. Pair with PDF compressor if the stamped file exceeds email limits.
10. Archive normalization before merge
Before merging chapters on PDF merge, stamp consistent headers on each chapter so the combined binder shares one visual identity. Fix sideways pages first on PDF rotate if scans arrived tilted.
Headers & Footers vs Page Numbers Tool
Choose the tool that matches the labeling need. Free-form headers and footers handle branding and legal disclaimers; the page numbers tool optimizes folio formats.
| Need | This tool | PDF page numbers |
|---|---|---|
| Free-form header/footer text | ✓ separate fields | Number-focused formats only |
| {page} / {total} placeholders | ✓ anywhere in string | ✓ preset formats |
| Header + footer simultaneously | ✓ | Single stamp band |
| Independent align per band | ✓ | Six corner positions |
| Page range subset | ✓ parsePageRange | All pages typical |
| Browser-only, 50 MB cap | ✓ pdf-lib drawText | ✓ pdf-lib drawText |
| Custom hex color per band | ✓ header + footer | Limited preset styling |
Use this page when you need two bands with different text, colors, and alignments - for example company name top center and confidentiality plus page count bottom right. Use PDF page numbers when you only need Page 1 of N in a preset corner without a separate header string. Many legal and consulting workflows stamp headers here first, then add exhibit labels on specific ranges.
Common Errors and Honest Limits
These are the failures the UI surfaces on purpose, plus jobs this page will not pretend to do.
- Overlap with body content. drawText does not reflow paragraphs. Increase margin or use PDFs with adequate white space in header/footer zones. Full-bleed slide exports often need larger margin offsets.
- Helvetica only. Embedded StandardFonts Helvetica ensures broad viewer compatibility; custom corporate fonts are not supported in-browser here.
- Encrypted PDFs fail. pdf-lib cannot load password-protected files without credentials. Export an unencrypted copy locally first.
- No rich text. Bold, italic, and multi-line layout are not supported - use plain single-line strings per band.
- Existing headers preserved underneath. New text draws on top; it does not remove prior stamps from the source file.
- 50 MB cap. Files over 50 MB are rejected before processing via validatePdfUpload.
- Placeholder typos. Only {page} and {total} are replaced. Misspelled placeholders like {pages} appear literally in the output.
- Memory on huge files. Files near 50 MB may spike RAM during pdfDoc.save(). Close other tabs if the browser warns about memory.
Privacy & Security - 100% Browser-Side Stamping
Headers and footers are applied entirely in your browser. pdf-lib and PDF.js load from the same origin; document bytes are never POSTed to an API, never written to server logs, and never indexed. Suitable for contracts, HR policies, and client deliverables subject to your device security policies. Clear downloads from shared computers when finished.
We do not persist uploads in localStorage. Closing the tab discards in-memory state except any file you explicitly downloaded. No account means no cross-device history. If you need audit trails for controlled documents, keep versioned filenames on your side (for example proposal-v2-stamped.pdf).
Frequently Asked Questions
What is the difference between headers, footers, and page numbers?
Headers sit in the top margin and footers in the bottom margin. They can hold any custom text - company name, document title, confidentiality notice, or date. Page numbers are a specialized footer pattern. This tool stamps free-form header and footer strings on every selected page with independent alignment, font size, and color per band. For automatic numbering formats like Page 1 of N with preset corner layouts only, use the dedicated PDF page numbers tool linked from this page. Many legal workflows stamp headers here first, then add exhibit labels on specific page ranges.
Does this PDF headers and footers tool upload my file?
No. pdf-lib draws text directly onto each page inside your browser. Your PDF bytes never leave your device. There is no account, no cloud queue, and no server-side retention. Processing matches other DevOkk pdf-lib tools - suitable for contracts and HR policies when your organization allows browser-based JavaScript on managed workstations.
How do {page} and {total} placeholders work?
Type {page} anywhere in header or footer text to insert the current page index, and {total} for the document page count. Example footer: Confidential - Page {page} of {total}. On page 3 of a 12-page file the footer becomes Confidential - Page 3 of 12. Placeholders are replaced per page before drawText runs with the embedded Helvetica font. Only {page} and {total} are recognized - misspelled tokens like {pages} appear literally in the output.
Can I add headers and footers to only some pages?
Yes. Choose Page range and enter indexes like 1, 3-8, or 2, 5, 9. parsePageRange from the shared pdf-io helpers validates each number against the document length. Pages you omit keep their original margins without new text - useful when only an appendix needs a legal disclaimer footer while the main brief stays clean.
What alignment options are available?
Header and footer each have independent left, center, and right alignment. pdf-lib measures text width with the embedded Helvetica font and positions the baseline accordingly. Top text uses the upper margin; bottom text uses the lower margin with a configurable margin offset in points. Increase margin when full-bleed slide exports would overlap body content.
What is the maximum PDF file size?
Uploads are capped at 50 MB (MAX_PDF_BYTES). That keeps pdf-lib save operations responsive in typical desktop browsers. Split oversized archives on the PDF split tool first if needed, stamp each chunk, then merge again if your deliverable must be one file. Files near the cap may spike RAM during pdfDoc.save() - close other tabs if the browser warns about memory.
Will headers and footers overwrite existing PDF content?
drawText renders on top of the page content stream. If your margin area already contains body text or images, the new header or footer may overlap. Increase the margin setting or use a PDF with adequate white space. This tool does not reflow existing content.
Can I use different colors and font sizes for header vs footer?
Yes. Header and footer each have their own font size and hex color picker. Both use Helvetica embedded via pdf-lib StandardFonts for broad viewer compatibility.
Do password-protected PDFs work?
Encrypted PDFs must be unlocked before pdf-lib can load them. This page does not include a password prompt. Export an unencrypted copy locally, then upload it here.
Is this headers and footers tool free?
Yes. No registration, watermark, or daily quota. Stamp as many PDFs as you need as long as each file is under 50 MB and your browser can hold it in memory. We do not persist uploads in localStorage - closing the tab discards in-memory state except any file you explicitly downloaded. Keep versioned filenames on your side if audit trails matter.
Related PDF Tools
Headers and footers are one step in document preparation. These sibling tools stay on the same origin:
- PDF page numbers - specialized automatic numbering formats when you do not need free-form header text.
- PDF watermark - diagonal DRAFT or CONFIDENTIAL stamps across page centers.
- PDF merge - combine stamped chapters into one binder.
- PDF split - divide files before stamping appendix ranges.
- PDF rotate - fix orientation before adding margin text.
- PDF compressor - shrink output for email after stamping.
- PDF sign - visual signature overlay after final headers are applied.
- PDF fill form - complete AcroForm fields before stamping finalized packets.
Related Tools
Discover more free developer tools that might interest you.
PDF Compressor
Compress PDF files to reduce size
Use ToolPDF Split
Split PDF documents into multiple files
Use ToolPDF Merge
Merge multiple PDF files into one document
Use ToolPDF Delete Pages
Delete specific pages from PDF documents
Use ToolPDF Page Numbers
Add page numbers to PDF documents
Use ToolPDF Sort
Sort and rearrange pages in PDF documents
Use Tool