What Is AMP and Why Validate It?
Accelerated Mobile Pages (AMP) is an open-source framework that builds fast, lightweight web pages for mobile devices. AMP HTML is a strict subset of HTML with a fixed set of rules — if a single required element is missing or a disallowed tag is used, the page loses its AMP status and can disappear from AMP-specific search features.
An AMP Validator checks your document against the official AMP HTML specification and tells you exactly what to fix before Google re-crawls your page.
What Our AMP Validator Checks
- Document structure: HTML5 doctype,
<html ⚡>/<html amp>attribute - Required meta tags: charset
utf-8as the first meta and the AMP viewport tag - AMP runtime: the mandatory
v0.jsscript with theasyncattribute - Boilerplate CSS: the
amp-boilerplatestyle and itsnoscriptfallback - Custom CSS: a single
amp-customstyle block, size limit and no!important - Disallowed tags:
<img>,<video>,<audio>,<iframe>,<object>,<embed>,<base>,<frame>and inline JavaScript - Inline styles & event handlers:
style=""attributes andonclick-style handlers are not allowed - Extension scripts: every
<amp-*>component you use must load its matching script - SEO essentials: canonical link, title tag and layout attributes on
<amp-img>
Common AMP Errors and How to Fix Them
| Error | Cause | Fix |
|---|---|---|
| Missing AMP attribute | <html> without ⚡ or amp | Use <html ⚡> or <html amp> |
| Mandatory tag missing | No v0.js runtime script | Add <script async src="https://cdn.ampproject.org/v0.js"> |
| Disallowed tag | <img> used instead of <amp-img> | Replace with <amp-img width height> |
| Inline style | style="color:red" on an element | Move rules into <style amp-custom> |
| Missing extension | <amp-carousel> without its script | Add the matching v0/amp-carousel-0.2.js script |
How to Use This AMP Validator
- Validate by URL: paste a live AMP URL and let the tool fetch and inspect the document.
- Validate HTML code: paste the raw AMP source for offline, private validation.
- Read the report: fix all errors first, then clear warnings.
- Re-validate: repeat until the report shows Valid AMP with a 100% score.
- Generate boilerplate: use the boilerplate tab to start a brand-new AMP page correctly.
Pro Tip: Always keep a canonical link pointing to the non-AMP version of the page. Google uses it to understand the relationship between your AMP and standard pages.