AMP Validator (Basic)
Free online amp validator (basic) — a quick sanity check before running the official validator.
Why use an AMP validator for mobile website performance?
Accelerated Mobile Pages (AMP) deliver near-instant loading times on mobile devices by enforcing a strict subset of HTML rules. However, a single missing mandatory boilerplate script, an unapproved custom JavaScript file, or an oversized inline stylesheet will invalidate an entire AMP document, causing search engines to treat it as standard HTML or omit it from AMP-specific search carousels. ToolJiffy's AMP Validator instantly checks your pasted markup against core AMP specifications, helping developers and content creators publish compliant, error-free mobile pages without complex CLI tooling.
- Boilerplate & Runtime Verification: Checks for mandatory structural components including the
<html ⚡>attribute, the standard AMP JS runtime script, and self-referencing or paired canonical link tags. - Script & Custom JS Restrictions Audit: Scans your HTML to detect prohibited third-party
<script>tags and inline event handlers, ensuring interactive features rely exclusively on validated AMP components. - Inline CSS Payload Size Check: Measures custom styling inside
<style amp-custom>blocks to verify that overall CSS weight remains strictly below the official 75KB payload threshold. - Media Tag Layout Compliance: Identifies non-compliant standard HTML tags like
<img>,<video>, and<iframe>, guiding you to convert them into<amp-img>,<amp-video>, or<amp-iframe>with explicit layout dimensions.
Client-side DOM parser architecture
ToolJiffy's AMP Validator utilizes a fast, browser-native DOMParser engine to evaluate your HTML document tree locally inside client memory. When you paste your page code, the analyzer transforms the raw text into an isolated DOM structure without executing external scripts or rendering visual subresources. This allows the validation suite to inspect tags, attributes, and nesting hierarchies at native execution speeds.
The core validation engine runs a sequence of specialized pattern-matching filters across the parsed document tree. It verifies that mandatory components such as the <head>, <body>, and AMP boilerplate CSS are correctly ordered and formatted. Furthermore, it validates custom element schemas—such as verifying that an <amp-carousel> or <amp-analytics> tag has its corresponding extension script declared in the document header. By conducting these structural checks client-side, the tool delivers immediate diagnostic feedback on pass, warn, and fail conditions.
Client-side security for private HTML markup
Your web page source code, internal templates, and pre-production staging markup are processed entirely within your web browser sandbox. No HTML content or page code is ever transmitted to external servers, cloud databases, or analytics endpoints, ensuring total confidentiality for unreleased commercial projects.
Step-by-step guide to validating AMP HTML code
- Paste your source code: Copy your page HTML (via View Source or your code editor) and paste the entire markup into the input panel.
- Run the automated audit: Click the Analyze button to launch immediate client-side structural validation across your HTML code.
- Remediate reported issues: Review the organized pass, warn, and fail findings to replace invalid media tags, trim inline CSS under 75KB, or insert missing AMP runtime headers.
Explore related web development utilities
Ensure proper indexation for your AMP and desktop pages using our Canonical Tag Checker. Audit meta descriptions for mobile search snippet previews with the Meta Description Checker, or refine title tags using the Meta Title Checker. To streamline overall user page experience and core metrics, explore our interactive Core Web Vitals Checklist.
Frequently Asked Questions
What is AMP HTML and why does it require strict validation?
Accelerated Mobile Pages (AMP) is an open-source HTML framework designed to ensure ultra-fast loading speeds on mobile devices. Validation is strictly required because AMP enforces rigid structural rules, restricting unapproved JavaScript and custom styling to maintain instant page rendering.Why does the AMP validator flag standard HTML <img> tags?
Standard HTML <img> elements are prohibited in AMP documents because they do not declare layout dimensions before resources download. AMP requires <amp-img> elements with explicit width and height attributes so the runtime engine can calculate page layout without causing content reflows.What is the maximum allowed size for custom CSS in AMP pages?
AMP restricts all custom CSS styles to a single <style amp-custom> block inside the document head, capped at a maximum size limit of 75KB. Excessively large stylesheets, !important rules, and inline style attributes are flagged as invalid to preserve fast mobile performance.Can I use custom JavaScript files inside an AMP document?
Author-written custom JavaScript tags (<script src="...">) are strictly forbidden in standard AMP pages. All interactivity must be implemented using official, sandbox-approved AMP components such as amp-bind, amp-carousel, or amp-sidebar to prevent custom scripts from blocking main thread execution.What is the AMP boilerplate CSS code and why is it mandatory?
The AMP boilerplate is a required CSS snippet inserted into the document head that initially hides the page content until the AMP JavaScript runtime (<script async src="https://cdn.ampproject.org/v0.js"></script>) finishes loading, preventing unstyled content flash and broken layout shifts.Does Google still require AMP for Top Stories search placement?
Google no longer mandates AMP for inclusion in the mobile Top Stories carousel, replacing the requirement with broader Core Web Vitals performance benchmarks. However, AMP remains a popular, reliable framework for publishing lightning-fast mobile news articles and content pages.Does this AMP validator send my web page code to external servers?
No. ToolJiffy's AMP Validator runs entirely client-side in your browser using local DOM parsing routines. Your HTML markup, template structures, and unreleased web code are never transmitted across the network or saved on remote servers, providing total data privacy.How do I fix canonical URL warnings on my AMP pages?
Every AMP page must contain a valid <link rel="canonical" href="..."> tag pointing to the canonical desktop HTML version of the article or to its own URL if the page is self-canonicalized. This prevents duplicate content issues and signals page relationships to search engines.