Header & Footer
Put a running head along the top and a page count at the foot — six slots, filled in page by page as the file is stamped.
What this tool does
Header & Footer draws up to six lines onto each page you select: left, centre and right along the top edge, and the same three along the bottom. Each box holds a single line of text, empty boxes are skipped, and a run with all six left blank is refused rather than handing back a copy identical to the file you started with.
Those boxes accept placeholders, which is what turns a fixed caption into a running header. {page} becomes the number of the page being drawn, {total} the page count of the whole document, {date} today's date written the ISO way as year-month-day, {time} the clock time as hours and minutes, and {filename} the name of the file being stamped, extension included. The date and the time both come from your own device's clock. The names are not case-sensitive, and several carry spare spellings: {n} or {p} for the page, {pages} or {count} for the total, {file} or {name} for the filename. Two exceptions are worth knowing. {title} is understood by the same expander but has nothing to fill it here, so it resolves to nothing and the slot holding it draws no line at all. Any other word in braces — {section}, say — is left on the page exactly as you typed it.
One font, one size and one colour apply to all six slots in a single pass. The eight faces on offer are standard PDF ones: Helvetica, Times and Courier plain, a bold and an italic for Helvetica and for Times, and a bold for Courier — there is no Courier italic — sized from 4 to 48 point. Those faces carry the WinAnsi character set only, so Western European text draws as written while Greek, Cyrillic, CJK and emoji characters are substituted with a question mark instead of stopping the run. The margin figure is in millimetres and does two jobs: it is the distance from the top or bottom edge, and it is how far the left and right slots sit in from the sides.
The whole job runs in this browser tab using pdf-lib, so the document is not uploaded anywhere. The limitation worth planning around is that these lines are painted on top of the finished page and nothing underneath moves aside to make room. There is no wrapping and no shrink-to-fit either, so a line longer than the page keeps going straight off the edge. Neighbouring slots are positioned independently rather than measured against one another, so a long left entry and a long centre entry along the same edge will simply run into each other. Where the existing content already reaches into the margin band, the honest fix is to move the line nearer the edge, or to run Change PDF Page Size first with a margin set, which scales the page content inwards and leaves a clear strip to stamp into.
How to use it
- Add the PDF. One document or several. Each is stamped separately with the same settings and comes back named after its source with -headers added.
- Fill in only the slots you need. Header left, centre and right; footer left, centre and right. Two arrive already filled in — {date} in the header right and {page} / {total} in the footer centre — so clear the ones you did not ask for. Blank boxes are skipped, and at least one has to carry text before the run starts.
- Type the placeholders where they belong. {page} / {total} in the footer centre and {filename} in the header left is the usual pairing. {date} and {time} read your device clock at the moment you run it.
- Set the type and the margin. Choose one of the eight standard faces, a size between 4 and 48 point, a colour — the default is a grey #555555 that stays out of the way — and the margin in millimetres.
- Choose which pages are stamped. all, odd, even, a single number, a list such as 1,4,9, a range such as 2-9, an open range such as 4-, or the words first and last. A number past the end of the document is refused by name rather than quietly dropped.
Processing & privacy
Runs on your device. Your file is processed directly in this browser.
Common use cases
Numbering a contract before it is signed
A footer centre reading {page} / {total} tells a reader at a glance whether a sheet is missing from the copy in front of them.
Dating drafts that circulate on paper
{date} in the header right means two printouts of the same report can be told apart on a desk, without opening either file to check.
Labelling a folder of scans
{filename} across the top keeps a printed stack traceable back to the file it came from, which survives the pages being separated.
Adding a running head to a long report
Put the section title in the header centre and name only the pages that section covers, then run a second pass for the next section.
Questions
Does the document leave this tab to be stamped?
Can the page numbers start at something other than the physical page?
Why did some characters come out as question marks?
Can the header be bold while the footer stays small and grey?
Does this replace headers the document already has?
Can I take the headers off again later?
What happens with rotated or password-protected pages?
Related tools
- Merge PDF — Combine several PDFs into one document in the order you choose.
- Split PDF — Split one PDF into separate documents by page range.
- Compress PDF — Reduce PDF file size while preserving the quality that matters.
- PDF to JPG — Export every page of a PDF as a JPG image.
- JPG to PDF — Turn one or many JPG photos into a single PDF.
- Protect PDF — Add a password and set permissions on a PDF.