HTML size limits: how much of your page Googlebot reads
Googlebot stops reading a file after a size limit, so bloated HTML can push content out of view. Here is how to check your page weight and trim it.
Googlebot does not read an unlimited amount of any file. It fetches up to a set number of bytes, then stops. Most pages are nowhere near that limit. A few are, and on those pages the content, links, or structured data past the cutoff may never be seen.
What the limit is
Google's crawler documentation lists file size limits for Googlebot. The exact numbers have been revised before, and they differ by file type, so check the current crawler documentation instead of trusting a figure from a blog post, including this one. As of this writing, the documented limit for HTML and other supported text files is in the low megabytes, and PDFs get a higher cap.
Two details matter more than the headline number. First, the limit applies to the bytes fetched for each file, before decompression is the wrong assumption: Google describes it in terms of the uncompressed data. Second, each resource is counted on its own. Your HTML, your CSS files, and your JavaScript files each get their own allowance.
Anything after the cutoff is ignored. Google has said the part it did fetch is still processed as if it were the whole file. So a truncated page is not rejected. It is just shorter than you think.
Who this actually affects
Most sites can stop reading here. A normal article or product page is a small fraction of the limit. The pages at risk tend to share a few traits:
- Pages with huge inline JSON, such as a framework state blob that duplicates all page data.
- Pages with inline base64 images or large inline SVG sprites in the HTML.
- Long single-page listings with thousands of products or rows in one document.
- Inline CSS or JavaScript pasted into the head, pushing real content far down the file.
- Pages with massive mega-menus repeated in full on every URL.
If your HTML is a few hundred kilobytes, you are fine on this point. If it is in the megabytes, look closer.
What gets lost past the cutoff
The damage depends on where the important parts sit in the file. Things near the top survive. Things near the bottom do not.
- Body text and headings that appear late in the document.
- Internal links in the footer or in a related-items block, which can leave pages with fewer discovered links.
- JSON-LD structured data placed at the end of the body.
- Canonical, hreflang, or robots tags if they sit below a mountain of inline code.
The last item is the nastiest. A canonical tag that Google never reads is a canonical tag that does not exist. Meta tags belong in the head, as early as you can put them.
How to check your pages
- Fetch the raw HTML with a command line tool or your browser's view-source, and note the size in bytes. Look at the uncompressed size, not the transfer size.
- Repeat for your largest templates: category pages, search results, long guides, and any page with a big data table.
- In the URL Inspection tool, open the crawled HTML for one large page and confirm that the last paragraph, last link, and your JSON-LD all appear.
- Check that your canonical and robots tags appear in the first part of the document.
- Sort a crawl export by HTML size and look at the top 20 outliers.
How to trim a heavy page
Move weight out of the HTML and into separate files. Because each file gets its own allowance, external CSS and JavaScript do not eat into your document budget. Then work down this list:
- Put scripts and styles in external files instead of inlining them.
- Replace inline base64 images with normal image URLs.
- Trim framework state to only what the page needs.
- Split giant listings into paginated pages, each with a real URL.
- Load a repeated mega-menu leaner, or reduce how many links it contains.
- Keep the head small and put key tags first.
A lighter document also helps users on slow phones, so the work pays off beyond crawling. We have not seen good evidence that other AI crawlers share Google's exact limits. Their caps are rarely documented, so treat a lean document as the safe default for all of them.
Takeaway
This week, measure the uncompressed HTML size of your five heaviest templates. If any is in the megabytes, move inline code out, trim embedded data, and confirm in URL Inspection that your last link and your structured data are still visible. If everything is small, you can cross this one off.