# Add a header and footer to a PDF

> Add a header and footer to a PDF in your browser. Include a page number and the page count. No upload, no account. Text stays selectable.

The same lines, on the pages you pick

Header and footer puts one line at the top of a page, one line at the bottom, or both. Use it for a document title, a file name, or Page {page} of {total}. pdf-lib draws the text in this browser. The words stay selectable. The PDF you dropped stays on disk.

Each line is a single row, on the left, in the center, or on the right. Page numbers with roman numerals or a custom start still belong on the Page numbers tool. A one-off note in the middle of a page belongs on Add text. Unlock password-protected PDFs on your computer first. Close the tab and the working files are gone.

Free. There is no paid tier. No account. They stay on your computer. Nothing is uploaded.

## How to add a header and footer to a PDF

1. Drop one PDF. It is read in this tab, never uploaded.
2. Type a header, a footer, or both. Use {page} and {total} when the line should include the page count.
3. Set the alignment and size, then tick the pages that should get the lines.
4. Add the header and footer and download. The file you dropped stays on disk.

## Add a PDF header and footer without uploading

Most “add header and footer to pdf” sites take the file and stamp it on a server. This page draws the lines in JavaScript. There is no account and no queue. If it fails, the file never sat on someone else’s disk.

Need only a page number, with a start number? Use [Page numbers](https://lovethispdf.com/tools/page-numbers.md).

## Questions

### Can I add a header and footer to a PDF without uploading it?

Yes. LoveThisPDF draws the lines in this tab and writes a new file on your device. Nothing is sent to a server.

### How do I put the page number in the footer?

Type Page {page} of {total} in the footer. {page} becomes that page's number. {total} becomes how many pages are in the file.

### Can the header and the footer sit in different places?

Yes. Each line can sit on the left, in the center, or on the right.

### Will the text stay selectable?

Yes. The lines are real text, not a picture of the page. Latin letters, numbers, and common punctuation work. Other scripts are refused.

### Will this change my original PDF?

No. You download a new file. The PDF you dropped stays on disk.

## Related tools

- [Page numbers](https://lovethispdf.com/tools/page-numbers.md): Number pages with a start number and a few formats.
- [Add text](https://lovethispdf.com/tools/add-text.md): Place one note anywhere on the pages you pick.
- [Watermark PDF](https://lovethispdf.com/tools/watermark-pdf.md): Repeat a word across the page instead of a single header.
- [Stamp logo](https://lovethispdf.com/tools/stamp-logo.md): Put a logo on the first page or on chosen pages.
- [Resize PDF](https://lovethispdf.com/tools/resize-pdf.md): Scale every page to A4, Letter, or another paper size first.
