Add Header and Footer to PDF
Put a title, page numbers, the file name or the date at the top and bottom of every PDF page. Use any of six spots, add a thin line, skip the cover, and check it on your real pages first. Free, and the file never leaves your device.
- Free, no sign-up, no file limit
- Your PDF stays on your device
- Six spots: left, centre, right, top and bottom
- Page numbers, file name and date
- Separator lines and book layout
- Preview on your real pages
TL,DR: To add a header and footer to a PDF, add the file above, type your text into the header and footer boxes (use {n} for the page number, {file} for the file name, {date} for the date), choose the font and margins, check the preview, then press Add header and footer and Download PDF. Nothing is uploaded.
- Price
- Free, no account
- Upload
- None, runs in your browser
- Spots
- Header and footer, left, centre and right
- Fill-ins
- Page number, total, file name, date
- Files
- Any number, one ZIP at the end
Last updated
What is a PDF header and footer?
A header is a line of text at the top of every page, and a footer is the same at the bottom: usually a title, a page number, a date or a label like CONFIDENTIAL. Word processors add them while you write, but a PDF made from a scan, a merge or an export often has none.
Here the open-source pdf-lib library writes your text into each page in your browser, in Helvetica, Times or Courier. Everything else in the PDF (text, images, links, bookmarks, form fields) stays as it was, and the new text is real text you can select and search.
How to add a header and footer to a PDF
Add the PDF
Drop it on the box or tap Select PDF files. Add several if they need the same header and footer.
Type the text
Pick a ready-made layout or type into the six boxes. Insert page number, file name or date where you want them.
Adjust the look
Choose the font, size, colour, margins and lines, and which pages get the text. The preview shows your real pages as you go.
Download
Press Add header and footer, then Download PDF. Several files come as one ZIP, or one by one.
What can this header and footer tool do?
Six places for text
Type into any of the six boxes: left, centre and right in the header, and the same in the footer. Leave a box empty and that spot stays blank.
Page numbers, file name and date
Put {n} for the page number, {total} for the last number, {pages} for the page count, {file} for the file name and {date} for today's date anywhere in your text, or insert them with one click.
Preview on your real pages
You see the actual pages with the header and footer on them, and can step through the file to check a page with a photo or a table near the edge.
Separator lines
Add a thin line under the header, above the footer, or both. It runs between the side margins in the colour you choose.
Choose the pages
Stamp all pages, odd or even pages, or a list such as 2-10, 14. Skip a cover or the last pages, and start {n} at any number in 1, i, I, a or A style.
Book layout
With facing pages on, left and right boxes swap on even pages, so the chapter title and page number stay on the outer edge of a printed book.
Any page shape
Landscape pages, rotated scans and cropped pages get the header at the top as you see the page, the right way up.
Nothing is uploaded
The text is added inside your browser tab, so a contract, a report or a client file never sits on someone else's server.
When does a PDF need a header or footer?
Confidential documents
Mark every page CONFIDENTIAL or DRAFT in the header, with the date and page number in the footer.
Reports and proposals
Put the report title at the top left and Page 3 of 18 at the bottom right, like a word processor would.
Merged and scanned files
PDFs joined from several sources or scanned from paper have no common header. Add one so the file reads as one document.
Course notes and assignments
Add your name, roll number and subject in the header, which many colleges ask for on every page.
Legal and office paperwork
Show the file name and page number on each page, so a printed copy can be matched to the right PDF.
Printed booklets
With facing pages, the title and number sit on the outer edges of each spread.
How to add a PDF header on Windows, Mac, iPhone and Android
On Windows or Mac
Open this page in Chrome, Edge, Firefox or Safari, drop the PDF on the box, type the header and footer text, check the preview and press Add header and footer. No Acrobat or Word needed.
On iPhone or iPad
Open the page in Safari, tap Select PDF files and pick the file from Files. Tap the settings button to type the text, then Add header and footer and Share / Save to Files.
On Android
Open the page in Chrome, tap Select PDF files, fill in the boxes in the settings and tap Add header and footer, then Download PDF.
On a Chromebook or Linux
It runs in any modern browser, so nothing needs installing.
Which fill-ins can I use in the text?
Each box can mix your own words with these fill-ins, which change from page to page or file to file:
- {n}: the page number, in the style and from the first number you choose.
- {total}: the last page number used, for Page 3 of 12.
- {pages}: how many pages the file has.
- {file}: the PDF's file name.
- {date}: today's date, e.g. 25 Nov 2026.
What is a good header and footer layout?
A few layouts that work well:
- Reports: title at the header left, Page {n} of {total} at the footer right, 9–10 pt, gray text.
- Confidential papers: CONFIDENTIAL in the header centre in bold, the date at the footer left.
- Printed books: chapter title in the header left and {n} in the footer right, with Facing pages on.
- Scans: Normal or Large distance from the edge, because scanned pages often have shadows near the edge.
Should I use a header or a watermark?
A header or footer sits in the margin and leaves the page readable, which suits titles, page numbers and short labels. A watermark is usually large and across the middle of the page, which makes it hard to remove or ignore. For a quiet CONFIDENTIAL mark, use the header; to stop a page being reused, use Add Watermark.
How does it compare with other header and footer tools?
| Compared | DevBrainiac | Typical online tool |
|---|---|---|
| Where the PDF goes | Stays on your device | Uploaded to a server |
| Free limit | None | Often a few files or tasks an hour |
| Text spots | Six, each with its own text | Often one header and one footer |
| Preview | Your real pages | A sketch, or none |
| File name and date | Yes, as fill-ins | Sometimes |
| Separator lines | Yes | Rarely |
| Odd, even and custom pages | Yes | Often all pages only |
| Book (facing) pages | Yes | Rarely |
Frequently asked questions
How do I add a header and footer to a PDF for free?
Add the PDF on this page, type your text into the header and footer boxes (or pick a ready-made layout), check the preview and press Add header and footer, then Download PDF. There's no sign-up, watermark or file limit.
Is my PDF uploaded?
No. The PDF is opened and changed by your browser, so it never leaves your device.
How do I add page numbers in the footer?
Type "Page {n}" or "Page {n} of {total}" in a footer box, or click page number under the boxes to insert {n}. {total} is the last page number used, so a skipped cover isn’t counted unless you turn on Count the skipped pages.
Can I leave the header off the first page?
Yes. Set Skip first pages to 1 and the cover is left as it is. Turn on Count the skipped pages if the next page should show 2 instead of 1.
Can I put different text on odd and even pages?
Turn on Facing pages to swap the left and right boxes on even pages. For completely different text, run the tool twice: once with Odd pages and once, on the result, with Even pages.
Will the header cover my text?
It is drawn on top of the page at the distance from the edge you choose. If a page has text near the top or bottom, make the distance smaller so the text sits in the empty margin, or make the font smaller.
Can I write the header in Hindi or another language?
Yes. Text the standard PDF fonts can't show is drawn with your device's fonts as a small sharp image, so it looks right but can't be selected or searched. Numbers and Latin letters stay real text.
Will the PDF lose quality or get bigger?
No. Your pages stay as they were; the header and footer add a few bytes per page. Links, bookmarks and form fields are kept.
Can I remove or change the header later?
The text becomes part of each page, so this tool can't take it off again. Keep your original PDF and run it again with new text if you need a change.
Does it work with password-protected PDFs?
Not if the PDF needs a password to open. Open it with its password, save a copy without protection, add the header and footer, and lock it again with Protect PDF if needed.
What happens to a digitally signed PDF?
Any change to a signed PDF breaks the signature, so the new file will show it as invalid. Add the header and footer before the document is signed.
Built with the open-source pdf-lib, pdf.js and fflate libraries (MIT and Apache-2.0 licences). Text in Hindi and other scripts is drawn with your device's own fonts.