Add Header & Footer to PDF
This tool stamps a header and footer onto every page of a PDF
This tool stamps a header and footer onto every page of a PDF
How to use Add Header & Footer to PDF
- Choose a PDF file from your device — it is read locally and never uploaded.
- Fill in the header and footer cells, using tokens like {page}, {total}, {date}, or {filename}, and set the font size and margin.
- Click Add header & footer, then download your stamped PDF.
About Add Header & Footer to PDF
This tool stamps a header and footer onto every page of a PDF. You get six independent text cells — left, center, and right for both the top and bottom of the page — so you can put a document title in the center header, the date on the right, a filename in the footer, and page numbers wherever you like. Any cell you leave blank is simply skipped.
Type text directly, or use tokens that are filled in per page: {page} for the current page number, {total} for the total page count, {date} for today's date, and {filename} for the file name. You can also set the font size, the margin from the page edge, and the number the first page should start counting from. Text is drawn in black Helvetica and is not wrapped, so keep each cell short — long strings from opposite cells can overlap in the middle of narrow pages.
Everything runs locally in your browser using the pdf-lib library. Your PDF is never uploaded to a server, so it works offline and keeps confidential documents private. It stamps new text over the existing pages rather than editing existing headers, and it cannot open password-protected PDFs — remove the password first by printing the file to a new PDF.
Frequently asked questions
- How do I add page numbers in the header or footer?
- Type {page} in any cell to insert the current page number, and {total} for the total count — for example "Page {page} of {total}". Use the "First page number" field if you want counting to start somewhere other than 1.
- What tokens can I use, and are they filled in automatically?
- Four tokens are replaced on each page: {page} (current page number), {total} (total pages), {date} (today's date), and {filename} (the file's name). Everything else you type is printed exactly as written on every page.
- Is my PDF uploaded anywhere?
- No. The whole tool runs in your browser — the file is read into memory locally, stamped, and offered back as a download. Nothing is sent to a server, so it works offline and is safe for confidential documents.
- Can it edit or replace a header that's already in the PDF?
- No. It draws new text on top of each page's existing content. If your PDF already has a header, the new text is added over it rather than replacing it, so adjust the margin so the two don't overlap.
- Why won't my password-protected PDF open?
- Encrypted PDFs can't be edited here. Open the file in a PDF viewer with the password, choose Print and save as a new PDF to make an unprotected copy, then load that copy into this tool.
- My text looks cut off or overlaps in the middle — why?
- Text is drawn on a single line and is not wrapped. Long strings, or text in both the center and a side cell, can run into each other on narrow pages. Shorten the text or lower the font size to fit.