Skip to content
Tezmy Tools

AMP Checker

Paste a page's source and check it against the main AMP HTML rules

Checked in your browser · up to 500,000 characters

Runs in your browser. Nothing is uploaded.

About the AMP Checker

AMP pages must follow strict rules, and one broken rule is enough to make a page invalid. This checker reads the HTML you paste and tests the rules that are broken most often: the doctype and the amp attribute on the html tag, the charset, viewport and canonical tags, the AMP runtime script, the two boilerplate styles, banned elements such as img, video and iframe, your own JavaScript, inline style attributes, !important and the 75,000 byte limit in your custom CSS, sizes on amp-img, and component scripts that are missing or unused. Each problem comes with its line number and a plain fix. It runs in your browser, so the page is never uploaded. It is a quick check, not the official validator.

Updated October 2026

How to use the AMP Checker

  1. 1In your browser, open the AMP page, choose View Page Source, select all and copy.
  2. 2Paste the source in the box, or press Open an HTML file to load a saved page.
  3. 3Read the summary: errors must be fixed, warnings are worth improving.
  4. 4Fix each item using the line number and the suggestion, then paste the new source to check again.
  5. 5Before you publish, also run the page through the official AMP validator.

What a valid AMP page needs

  • <!doctype html> first, then <html ⚡> or <html amp>.
  • A head with meta charset utf-8 first, a viewport meta with width=device-width, a canonical link and the AMP runtime script.
  • The boilerplate style and its noscript twin, copied exactly.
  • All your CSS in one style amp-custom tag, 75,000 bytes at most, with no !important.
  • amp-img, amp-video and friends in place of img, video, audio and iframe.
  • A script tag with custom-element for every AMP component the page uses.

Fixing the most common errors

Most invalid pages fail for the same few reasons: images left as img, leftover inline styles from a normal template, a script that was not removed, and a missing boilerplate. Fix the errors from the top, because one early problem such as a missing runtime script can cause several later ones.

When the checker says a component script is missing, add the script tag it shows and look up the current version on amp.dev, since version numbers change. When it says amp-img needs a size, give it the real width and height of the image, and use layout="responsive" so it scales on small screens.

Custom CSS limits

AMP keeps pages light by capping author CSS at 75,000 bytes. The checker counts the bytes in your style amp-custom block and shows the number, so you can see how close you are. Remove unused rules, shorten long selectors and avoid copying whole frameworks to stay below the limit.

Using the checker in your workflow

Paste the source after every template change. Because it runs instantly in your browser you can fix, paste and re-check without waiting. When the page shows no errors, run it once through the official validator and test it on a phone before you publish.

Phone and computer

On a computer the summary sits beside the list of problems. On a phone they stack, so the verdict is first and the details follow. Fixing AMP usually means fixing the HTML around it too. Run the HTML SEO Checker for titles and descriptions, use the HTML Headings Checker to see whether the headings follow a clean order, and write a missing canonical or description tag with the Meta Tag Generator.

Features

  • Checks the doctype, html amp attribute, head, body, charset, viewport and canonical
  • Finds missing runtime script and boilerplate styles
  • Flags banned elements, custom JavaScript, inline styles and event handlers
  • Measures your custom CSS against the 75,000 byte limit and flags !important
  • Checks amp-img sizes and that every component has its script
  • Line numbers and a plain fix for each problem, with a list of what passed

Frequently asked questions

Is this the official AMP validator?

No. It checks the rules that are broken most often and explains the fixes, but the AMP validator at amp.dev/validator is the final judge. A page that passes here can still fail there on a rule this tool does not cover.

Why can't I just enter a web address?

A browser cannot read another site's source because of security rules, and checking on a server would mean sending your page away. Pasting the source keeps everything on your device.

How do I get the page source?

Open the page, then use View Page Source (Ctrl+U on Windows and Linux, Option+Command+U on Mac), select all and copy. You can also save the page as an .html file and open it with the button.

What is the AMP boilerplate?

A fixed block of CSS, one in a style tag and one inside noscript, that hides the page until the AMP runtime is ready. It must be copied exactly from amp.dev, and this tool checks that both parts are present.

Why is img an error?

AMP needs to know the size of every image before it loads, so it replaces img with amp-img, which needs a width and height or a layout such as fill.

Why are my own scripts not allowed?

AMP allows no author JavaScript at all, so pages stay fast. Interactivity comes from AMP components. Only the AMP scripts from cdn.ampproject.org and JSON data blocks are accepted.

What does the unused component warning mean?

You loaded the script for a component such as amp-sidebar but the page never uses it. It is a warning, not an error, but removing it saves a download.

Does it work for AMP email or web stories?

No. The rules differ for AMP for Email and for web stories. This tool checks standard AMP pages.

Related tools