Use an HTML page weight or page size analyzer when you need to measure the UTF-8 byte size of an HTML response body and compare that body with Google's 2,000,000-byte reference.

This tool is designed for source-level diagnosis. It helps you investigate whether a heavy document contains substantial inline JavaScript, inline CSS, embedded data URIs, or other unnecessary source code. It is also useful for establishing a baseline, checking a template change, or confirming that a source-level cleanup reduced the delivered document.

The important distinction is that this analyzer measures the HTML body you paste, not every byte a browser downloads while rendering a page.

when should i use html page weight html page size analyzer
Beyond the Total: HTML Page Weight Analyzer Triage

Choose the analyzer for body-level questions

“Page weight” can describe several different measurements. Decide which one you need before running an analysis, because this tool has a deliberately narrow scope.

Question Use this analyzer? Relevant result or alternative
How many UTF-8 bytes are in this HTML response body? Yes Exact byte length and Unicode code-point count
Which supported source categories occupy the most space? Yes Inline script, inline style, and data URI breakdowns
Which external resources does the HTML reference? Yes A bounded inventory; linked file sizes are not downloaded
How many bytes did the browser transfer in total? No Use a browser network waterfall
What is the gzip or Brotli transfer size? No Use DevTools or transfer-encoding diagnostics
How large were the response headers, and how was the response cached? No Inspect the real response with DevTools or curl
Will Googlebot crawl and index the whole page? No The analyzer offers a body reference, not a crawl guarantee
How quickly does the page render or execute? No Use performance and Core Web Vitals tools

Measure a representative HTML response

A reliable run starts with the source that the server actually returned. Follow this sequence for each page variant you need to assess.

  1. Capture the original uncompressed HTML response body. Use View Source, a saved response body, or an authorized curl capture, saving only the body rather than the response headers. Copying the Elements panel after JavaScript runs can introduce mutations that were never in the response and omit source details that were present. If the server varies its output by user agent, locale, authentication, or device, capture each representative response separately. A practical input checklist is available in HTML Page Weight Analyzer: Beginner Essentials.
  2. Paste that source into the HTML Page Weight Analyzer. The analysis runs in your browser. The pasted HTML is not uploaded, fetched as a page, or executed, and the analyzer does not request any URLs found in the markup.
  3. Review the relevant breakdown. Check the total UTF-8 bytes, Unicode code-point count, remaining bytes below or overage above the 2,000,000-byte reference, inline script and style shares, data URI weight, and external-resource inventory. Counts and displayed values are bounded, while a strict input limit, shared element cap, and bounded URL display protect the main thread and output from accidental full-site dumps or adversarial markup. Keep the input to one representative document and treat the external-resource inventory as bounded rather than exhaustive.
  4. Find the largest source-level hotspot. Start with the category consuming the most bytes. Large inline script may reflect serialized application state, duplicated hydration data, or an embedded library. Large inline style may indicate repeated critical CSS. A substantial data URI total can reveal Base64 images or fonts embedded directly in the markup.
  5. Make the smallest truthful change and remeasure the deployed response. Verify the real response after deployment. The pasted-body calculation does not include response headers, compression, separately fetched resource payloads, or late client-side DOM mutations unless those mutations are already present in the text you paste.

Read each result as a specific measurement

The result is a debugging map rather than a performance score. Each number answers a narrower question and should not be expanded into claims the tool did not test.

Result What it measures What it does not establish
Total UTF-8 bytes The exact encoded length of the pasted text Total browser transfer size
Unicode code points The number of Unicode code points in the source The number of encoded bytes
Inline script and style shares UTF-8 bytes and percentages within the pasted source Execution or rendering cost
Data URI weight Complete supported attribute values containing data URIs A second total based on decoded Base64 content
External-resource inventory Supported references and the URL text present in the HTML The payload size or transfer cost of linked files
2 MB comparison The body's distance below or above a decimal body reference A complete Googlebot fetch or indexing outcome

Byte size and JavaScript string length are not interchangeable. The analyzer uses the browser's TextEncoder API so the headline result represents UTF-8 bytes, as described by TextEncoder.encode(). JavaScript string length counts UTF-16 code units, while an HTML response is normally transferred as encoded bytes. ASCII characters usually use one UTF-8 byte, but accented letters, CJK characters, and emoji can use more.

The data URI total counts each supported data attribute value once as it appears in the source. The analyzer does not decode Base64 and add that decoded payload again, because doing so would double-count bytes already present in the HTML. It does not treat an arbitrary title or data-* attribute as a resource.

External scripts are identified by their src values, stylesheets and preload links through rel tokens, and common direct image, media, and frame attributes. A srcset remains one declaration because data URLs can make naive comma splitting unsafe. The parser uses a detached template fragment and the browser's native HTML tokenizer, which helps it respect script, style, textarea, title, and other raw-text boundaries. Nested template content remains inert and outside the resource inventory.

Interpret the 2 MB comparison without overclaiming

According to Google Search Central's current Googlebot documentation, Googlebot crawls the first 2 MB of a supported file and stops fetching at the cutoff. Google also states that the limit applies to uncompressed data. A later technical explanation adds that HTTP headers consume part of the per-URL allowance, as discussed in Google's technical explanation of the crawler limit.

Because the analyzer receives only a pasted response body, it cannot know the actual header size or prove where Googlebot will stop. For that reason, the interface labels 2 MB as a conservative decimal 2,000,000-byte body reference and shows either the remaining bytes below it or the overage above it. A body below the reference can still exceed the complete allowance once headers are included.

For a focused explanation of this distinction, see 2,000,000 Pasted Bytes Do Not Guarantee a Googlebot Fetch. Google notes that crawler limits can change, so check the current source and its reference date rather than treating the number as permanent.

Referenced images, scripts, stylesheets, frames, fonts, and media are separate fetches. Googlebot and the Web Rendering Service may retrieve them under their own limits, but their payload bytes do not belong in the pasted HTML total. The analyzer's external inventory helps you see what the document points to; it does not show which linked files are largest.

Match each hotspot to a source-level fix

Use the breakdown to form a specific hypothesis, then change only what the evidence supports. Common patterns include:

  • Oversized inline script: inspect serialized state, duplicated hydration data, and embedded libraries. Remove redundant data or move suitable code into a cacheable external file.
  • Oversized inline style: look for repeated critical CSS. Consolidate only after checking that the rendered page still receives the required styling.
  • Large data URI totals: check whether sizable images or fonts are embedded in markup. Replace suitable binary payloads with appropriately served external assets.
  • A long external-reference list: check for duplicate tags or unnecessary references. The number of references alone is not a performance score.
  • Important content appearing late: move critical metadata and meaningful content earlier in the response while preserving the document's behavior.

Remeasure after deployment and compare like-for-like responses. A smaller HTML body can remove an obvious source of weight, but it does not guarantee faster rendering, complete crawling, indexing, or improved ranking. Verify the deployed bytes, headers, rendered page, and indexing evidence separately.

Use other checks for network and rendering questions

The analyzer is not a network waterfall, compression calculator, or Core Web Vitals test. Use browser DevTools or an authorized curl request against the public response when you need transfer sizes, compression details, cache behavior, response headers, or the payload sizes of linked resources.

Use browser performance tooling for execution time, rendering cost, late DOM mutations, and field metrics. Use the HTML analyzer for the source-level question it can answer: how many UTF-8 bytes are in the response body, which supported constructs occupy that weight, and how close is the body to the conservative 2,000,000-byte reference?