What Is Google's 2 MB HTML Crawl Limit? Complete Guide
What Is Google's 2 MB HTML Crawl Limit?
Google's 2 MB HTML crawl limit means Googlebot downloads and processes only the first 2 MB of an HTML document. Anything past the first 2 MB is dropped and never sent for indexing. The limit is measured on the uncompressed HTML file itself — not on the total page weight, and not on images, CSS, or JavaScript, which are fetched as separate files each with their own 2 MB limit.
Key Facts (TL;DR)
- 2 MB, HTML file only. The limit applies to the raw HTML document Googlebot downloads, not the whole page. Images, CSS, and JavaScript are fetched separately.
- Measured uncompressed. Google counts the decompressed bytes, so gzip or Brotli compression does not buy you more room.
- Content past 2 MB is invisible. Googlebot stops at 2 MB and only sends the already-downloaded part for indexing — text, links, and structured data below the cutoff never get processed.
- 2 MB is the Search limit; 15 MB is the general one. The 2 MB figure governs Search indexing of HTML and text files. Google's broader crawlers still default to 15 MB, which is why both numbers circulate.
- Most pages are safe. A typical HTML document is 50–300 KB. The risk sits with pages that inline huge amounts of data or markup into the HTML itself.
How the 2 MB Limit Actually Works
Googlebot fetches a URL, and as the HTML streams in it counts bytes. The moment the running total reaches 2 MB, it stops reading the file. Per Google's official Googlebot documentation, it "only sends the already downloaded part of the file for indexing consideration." Everything after the 2 MB mark — including links Google would otherwise follow — is simply not seen.
Two details matter most. First, the measurement is on uncompressed data: a 500 KB gzipped response that decompresses to 3 MB of HTML is over the limit, because Google counts the 3 MB. Second, the limit is per file. The HTML document has its own 2 MB budget; each referenced image, stylesheet, and script is a separate fetch bound by the same per-file limit. So a page can be 8 MB in total transfer weight and still be perfectly fine for crawling, as long as the HTML file alone is under 2 MB.
What Counts Toward the 2 MB — and What Doesn't
The distinction that trips people up is "HTML document" versus "page." Only bytes that live inside the HTML file count.
| Counts toward the 2 MB | Does NOT count (separate file, own limit) |
|---|---|
| Visible HTML markup and text | External images referenced by <img src> |
Inline <script> blocks (including framework state / hydration data) | External JavaScript files (<script src>) |
Inline <style> blocks | External stylesheets (<link rel="stylesheet">) |
| Inlined JSON, data attributes, and embedded state | Fonts, videos, and other linked media |
| Base64-encoded images embedded directly in the HTML | Anything loaded later by JavaScript at runtime |
This is why modern JavaScript frameworks are the usual culprit. A server-rendered React or Next.js page often inlines its serialized component data and hydration payload directly into <script> tags. That inlined data lives inside the HTML file, so it counts — and on data-heavy pages it can add hundreds of kilobytes to megabytes.
When Does a Page Actually Reach 2 MB?
Ordinary content pages almost never hit the limit. These specific patterns do:
- Large inlined framework state. A server-rendered app that serializes a big dataset (a full product catalog, a long feed, a large table of rows) into the initial HTML.
- Base64 images in the HTML. Embedding images as
data:URIs instead of linking them can push a single document over 2 MB fast. - Auto-generated mega-pages. Programmatically built pages that dump thousands of rows, comments, or list items into one HTML response with no pagination.
- Endless comment or thread pages. Forum and social pages that render every reply inline instead of paginating or lazy-loading.
- Accidental duplication. Templates that inline the same large block (a full menu, a giant JSON-LD graph) multiple times per page.
How to Measure Your HTML Document Size
You want the uncompressed size of the HTML file only. Three reliable ways:
- Chrome DevTools. Open the Network tab, reload the page, click the top document request, and read the response size. Use the "Size" column's uncompressed value (hover to see transferred vs. resource size) — the resource size is what Google counts.
- View source. Right-click and "View Page Source," then save the file and check its byte size on disk. This is the raw HTML document, exactly what Googlebot downloads.
- Command line. Run
curl -s https://example.com/page | wc -cto print the byte count of the raw HTML response. - Greadme Deep Scan. Greadme measures the raw, uncompressed HTML document (before any CSS/JS stripping) and flags any page approaching or exceeding the 2 MB limit as part of a full audit — no manual measuring required.
A common mistake is measuring the rendered DOM in the Elements panel instead of the raw response. Google's limit is on the file it downloads, so always measure the initial HTML response, not the live DOM after JavaScript has run.
How to Fix an Oversized HTML Document
- Move inlined data out of the HTML. Fetch large datasets on the client or from an API endpoint instead of serializing them into the initial HTML. Keep only the content that must be indexed in the document.
- Paginate or lazy-load long lists. Render the first screenful server-side and load the rest on scroll or via separate paginated URLs that are individually crawlable.
- Stop embedding base64 images. Link images with
<img src>so they become separate fetches instead of inflating the HTML file. - Trim duplicated markup. Remove repeated inline blocks and oversized inline JSON-LD; keep structured data to what the page actually needs.
- Put the important content first. Because Google reads top-down and stops at 2 MB, make sure your primary content, links, and structured data appear well before any large inline payload.
2 MB vs 15 MB: Two Different Limits
If you have read older SEO advice, you may remember a 15 MB figure from Google's June 2022 "Googlebot and the 15 MB thing" post. Both numbers are real, but they cover different scopes. The 2 MB limit is the one Googlebot applies to HTML and text files for Search indexing — the figure that decides whether your content gets indexed. The 15 MB limit is the default file size for Google's broader crawling infrastructure.
In early 2026, Google updated its documentation to state the 2 MB figure for HTML and text files explicitly. Google described this as a documentation clarification of the existing per-file-type limits, not a reduction in how much Googlebot crawls. For SEO, use 2 MB as your working target for the HTML document, and keep it lean either way.
FAQ
Does the 2 MB limit include images, CSS, and JavaScript?
No. It applies to the HTML document only. Images, stylesheets, and external scripts are fetched as separate files, each with its own 2 MB limit. Your total page weight can be much larger than 2 MB and still be fine.
Is the 2 MB measured before or after compression?
Before — it is the uncompressed size. A response that is 400 KB over the wire with gzip but decompresses to 2.5 MB of HTML is over the limit, because Google counts the decompressed 2.5 MB.
What happens to content after the first 2 MB?
Googlebot stops reading at 2 MB and only sends the already-downloaded portion for indexing. Any text, links, or structured data below the cutoff is never processed, so it cannot be indexed or followed.
My page is a few hundred kilobytes — do I need to worry?
No. A typical HTML document is 50–300 KB, well under the limit. This check only matters for pages that inline very large amounts of data or markup into the HTML file itself.
Is the limit 2 MB or 15 MB?
Both figures are real but apply to different scopes. 2 MB is Googlebot's limit for HTML and text files, which governs Search indexing — the number that matters for SEO. 15 MB is the default file-size limit for Google's broader crawling infrastructure. For your HTML pages, treat 2 MB as the working limit.
How do I know if a page exceeds the limit?
Measure the raw HTML response size (Chrome DevTools Network tab, View Source, or curl | wc -c). Greadme's Deep Scan measures the uncompressed HTML document automatically and flags pages near or over 2 MB.
Conclusion
Google indexes only the first 2 MB of an HTML document, measured uncompressed, and drops everything after. It is a limit on the HTML file itself — not the whole page — so the fix is to keep inline scripts, styles, and data out of the document and load large payloads separately. Most pages never come close, but data-heavy and framework-rendered pages can, and any content that falls past the 2 MB mark is invisible to Google. Measure your raw HTML size, keep it lean, and put what matters at the top.
