ScreenshotNeo

BlogHow-to

How to Print a Webpage Without Headers and Footers

Remove browser-added URLs, dates, and page numbers, then hide page-authored clutter with print CSS or save a clean PDF.

By the ScreenshotNeo team1 October 20267 min read

Quick answer: Open the browser’s print preview, expand its additional settings, and turn off the option named Headers and footers (Edge) or Print headers and footers (Firefox). In Chrome and Chromium browsers, disable generated margin content in the print dialog or set margins small enough that no header/footer space remains. These controls remove browser-added metadata such as the page URL, title, date, and page number.

If the unwanted material is part of the webpage itself—such as a navigation bar, site header, cookie notice, ad, or footer—use print-only CSS or a reader mode. Browser settings control browser-generated metadata; CSS controls elements authored by the site.

What you see Usually controlled by Fix
URL, document title, date, page number Browser print dialog Clear the headers-and-footers option
Site logo, navigation, cookie banner, share buttons Page HTML and CSS Use print CSS, reader mode, or an editing extension
Printer-imposed white edge Printer hardware Choose supported margins or borderless printing

Microsoft Edge

  1. Open the page and press Ctrl+P on Windows or Command+P on macOS. You can also choose Settings and more → Print.
  2. Expand More settings.
  3. Clear Headers and footers. Microsoft documents this control as “Select More settings > Headers and footers.” Microsoft’s Edge print guide
  4. Check the preview, then print or choose a PDF destination.

Edge also exposes margins, paper size, orientation, scale, page range, and background graphics. Choose Margins → None or Minimum when you need more usable space. A physical printer can still require a non-printable edge; Microsoft gives approximately 0.25 inches (6.35 mm) as an example, but the exact limit depends on the printer.

When the page itself is cluttered, open it in Immersive Reader (where available), then print from there. Immersive Reader changes the page presentation; it does not change the browser’s header/footer switch.

Mozilla Firefox

  1. Open the print preview from the menu or press Ctrl+P / Command+P.
  2. Expand More settings.
  3. Clear Print headers and footers.
  4. Set paper size, scale, orientation, margins, page range, and background printing as needed.
  5. Print, or select Save to PDF.

Firefox documents these controls, including the optional Simplified format, in its print web pages guide. If you must edit page content before printing, Mozilla points to the Print Edit WE extension in Firefox Add-ons.

Chrome and Chromium-based browsers

  1. Open print preview with Ctrl+P or Command+P.
  2. Look in the print options for the control that enables browser-generated headers and footers, and turn it off.
  3. If your version does not show a checkbox, inspect Margins and choose None or a value small enough that no margin space remains.
  4. Verify every page in the preview before printing or saving as PDF.

Chrome for Developers explains that automatically generated headers and footers can be turned off in the print dialog. It also notes that setting margins to zero—or too small to leave room—prevents the generated content from displaying. Browser labels vary by version and operating system, so trust the preview. Chrome for Developers: print margins

If you own the page, add a print stylesheet. The print media type applies only to paper and PDF output, while @page controls page dimensions, orientation, and margins. MDN’s printing CSS reference documents this pattern.

@media print {
  #header,
  #footer,
  #nav,
  .cookie-banner,
  .share-buttons,
  .print-button {
    display: none !important;
  }

  a {
    color: inherit;
    text-decoration: none;
  }
}

@page {
  size: A4;
  margin: 12mm;
}

Use selectors that match your actual markup. Prefer a dedicated class such as .no-print for components you never want on paper:

@media print {
  .no-print { display: none !important; }
  .print-only { display: block !important; }
}

.print-only { display: none; }

This CSS cannot reliably remove the browser’s URL, date, title, or page-number text. The user must disable those in the print dialog.

Save a clean webpage as a PDF

  1. Open print preview.
  2. Choose Save to PDF (Firefox) or your browser’s PDF destination.
  3. Disable browser headers and footers.
  4. Set margins, scale, paper size, and orientation.
  5. Enable background graphics only when colors or images are required.
  6. Review the first and last page for clipped content, blank pages, and remaining metadata.

PDF output follows the same distinction: page-authored elements are affected by print CSS; browser-generated metadata is affected by print settings.

Why headers or footers still appear

Symptom Cause Fix
URL or date remains The browser checkbox is still enabled, or settings were changed in a different print dialog. Return to the browser preview, expand its settings, disable headers/footers, and check the preview again.
Site navigation remains It is page-authored content. Use the site’s print CSS, reader mode, or an editing extension.
Only the first page is clean Margins leave room for generated content on later pages. Disable generated headers/footers explicitly; do not rely only on margin size.
Content is cut off at the edge Printer hardware has a minimum physical margin. Choose a supported margin, reduce scale, or use borderless printing if the printer supports it.
Background colors are missing Background graphics are disabled. Enable background graphics in print settings, then check ink usage.
Print preview differs from the screen Print styles, responsive layout, fonts, or delayed content change the page. Inspect @media print rules, wait for fonts/images, and verify the final preview.
Blank or extra pages appear Fixed heights, overflow, page breaks, or large margins. Remove fixed heights in print CSS, set overflow: visible, and review break-before/break-after rules.

Advanced print CSS for predictable output

@media print {
  body { margin: 0; }
  .page-break { break-before: page; }
  h2, h3 { break-after: avoid; }
  table, img, pre { break-inside: avoid; }
  nav, aside, form, video { display: none !important; }
}

@page {
  size: Letter portrait;
  margin: 10mm 12mm;
}

Use break-before, break-after, and break-inside instead of obsolete page-break properties where possible. Test long tables, code blocks, images, and links. A printer may substitute fonts or paginate differently from a PDF viewer.

Or skip the browser setup

ScreenshotNeo returns a screenshot or PDF from one request. Its capture flow accepts consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets before the shot; each step can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and the response identifies the result with X-Page-Verdict and X-Billed headers. An MCP server provides take_screenshot, get_page_info, and capture_pdf for Claude, Cursor, and other MCP clients.

See the ScreenshotNeo API documentation for all options.

cURL

curl -G "https://api.screenshotneo.com/v1/shot" \
  -d access_key=YOUR_API_KEY \
  --data-urlencode url=https://stripe.com \
  -o shot.webp

Python

import requests

r = requests.get(
    "https://api.screenshotneo.com/v1/shot",
    params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"},
    timeout=90,
)
r.raise_for_status()
open("shot.webp", "wb").write(r.content)

Node.js

const q = new URLSearchParams({
  access_key: 'YOUR_API_KEY',
  url: 'https://stripe.com'
});
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const buffer = Buffer.from(await res.arrayBuffer());
await require('node:fs').promises.writeFile('shot.webp', buffer);

ScreenshotNeo has a free plan with 1,000 shots per month and no card. Paid plans start at $5 for 3,000 shots. Create a free ScreenshotNeo account.

Performance, reliability, and cost considerations

  • Preview first: Print preview catches headers, clipping, missing backgrounds, and unexpected page breaks before paper or PDF is produced.
  • Reduce work: Hide navigation, video, ads, and interactive controls in print CSS. This reduces layout complexity and ink use.
  • Wait for content: Client-rendered pages, web fonts, lazy images, and charts may need time before printing. Do not print until the preview contains the final content.
  • Choose PDF for repeatability: A saved PDF preserves the previewed pagination better than asking several printers to interpret the page independently.
  • Automate capture: ScreenshotNeo supports full-page capture with lazy images loaded, PDFs with paper size, margins, landscape, and page ranges, custom CSS and JavaScript, waits, blocking rules, caching with a chosen TTL, signed links, async jobs, bulk capture, and a usage API. Only clean shots are billed.

FAQ

How do I remove the URL at the top?

Open print preview and clear the browser’s headers-and-footers option. Page CSS cannot reliably remove browser-generated URLs.

How do I remove the date and page number?

Disable headers and footers in the print dialog, then confirm the preview shows neither value.

Can CSS remove browser headers and footers?

No. @media print hides elements authored by the page. Browser metadata is controlled by print settings.

Why is there still a white border?

Most printers have a non-printable physical margin. Choose a supported margin or a borderless mode if available.

What is the cleanest way to print a cluttered page?

Use reader mode when available, apply print CSS if you own the site, or edit the page before printing. For automated PDF or image capture, use ScreenshotNeo.

Checklist

  • Open print preview.
  • Disable browser-generated headers and footers.
  • Hide page-authored navigation and controls with print CSS or reader mode.
  • Set paper size, orientation, margins, scale, and page range.
  • Enable backgrounds only when needed.
  • Inspect every page, then print or save the PDF.

Sources: Microsoft Edge print support; Mozilla Firefox print support; Chrome for Developers print margins; MDN printing CSS.