SEO Meta Tags Analyzer
Check the Title, Description, and structure of any webpage using AI-powered web search.
Enter URL
Analysis Results for: —
Critical SEO Elements
Length: — Chars
—
Length: — Chars
—
Density: –%
—
—
Health Metrics
Title Length Status:
Error
Description Status:
Error
Primary H1 Tag:
Missing
Robots Tag:
Indexable
Readability Score:
—
Total Word Count:
—
Headings Breakdown (H1-H6)
Run analysis to see content structure.
Run analysis to see content structure.
‘; }function updateStatus(element, text, isGood, isWarn) { element.innerText = text; element.classList.remove(‘status-ok’, ‘status-warn’, ‘status-err’); if (isGood) element.classList.add(‘status-ok’); else if (isWarn) element.classList.add(‘status-warn’); else element.classList.add(‘status-err’); }// — Gemini Integration —async function analyzeURL() { const url = urlInput.value.trim();if (!url) { errorMsg.innerText = “Please enter a URL.”; errorMsg.classList.remove(‘hidden’); return; } errorMsg.classList.add(‘hidden’); resetResults();// UI Loading State btnAnalyze.disabled = true; btnText.innerText = ‘Searching…’; btnLoader.classList.remove(‘hidden’); resultsArea.classList.remove(‘hidden’); analyzedUrlEl.innerText = url;try { // We use Gemini with Google Search to analyze the URL’s content. const prompt = `Analyze the webpage content found at the URI: ${url}. Provide ONLY a JSON object with the following fields extracted or derived from the page: 1. title: The main SEO Title Tag (or H1 if title missing). 2. description: The Meta Description (or first paragraph if desc missing). 3. keywords_list: A short list of the primary keywords used on the page (10 max). 4. canonical: The Canonical URL found (or ‘N/A’). 5. word_count: Estimated total word count of the main body content. 6. headings: An array of all H1, H2, and H3 tags in order. 7. readability_score: A simple readability score (e.g., ‘Medium’, ‘Good’, ‘Hard’). 8. robots_tag: The content of the robots tag (e.g., ‘index, follow’, or ‘N/A’).`;const apiUrl = `https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash-preview-09-2025:generateContent?key=${apiKey}`;const payload = { contents: [{ parts: [{ text: prompt }] }], tools: [{ “google_search”: {} }], // Use Google Search to analyze the web page content generationConfig: { responseMimeType: “application/json”, responseSchema: { type: “OBJECT”, properties: { title: { type: “STRING” }, description: { type: “STRING” }, keywords_list: { type: “ARRAY”, items: { type: “STRING” } }, canonical: { type: “STRING” }, word_count: { type: “NUMBER” }, headings: { type: “ARRAY”, items: { type: “STRING” } }, readability_score: { type: “STRING” }, robots_tag: { type: “STRING” } } } } };const response = await fetch(apiUrl, { method: ‘POST’, headers: { ‘Content-Type’: ‘application/json’ }, body: JSON.stringify(payload) });const data = await response.json(); const jsonText = data.candidates?.[0]?.content?.parts?.[0]?.text; if (!jsonText) { throw new Error(“AI did not return valid JSON data.”); }const result = JSON.parse(jsonText); displayResults(result);} catch (error) { console.error(‘Analysis Error:’, error); alert(`Analysis failed. Ensure the URL is public and accessible, and try again.`); resetResults(); } finally { btnAnalyze.disabled = false; btnText.innerText = ‘Analyze Page’; btnLoader.classList.add(‘hidden’); } }function displayResults(data) { // Display Critical Elements outTitle.innerText = data.title || ‘N/A’; outDescription.innerText = data.description || ‘N/A’; outKeywords.innerText = data.keywords_list ? data.keywords_list.join(‘, ‘) : ‘N/A’; outCanonical.innerText = data.canonical || ‘N/A’; // Display Lengths titleLength.innerText = `Length: ${data.title ? data.title.length : 0} Chars`; descLength.innerText = `Length: ${data.description ? data.description.length : 0} Chars`; keywordCountOut.innerText = `Density: ${data.keywords_list ? (data.keywords_list.length / data.word_count * 100).toFixed(2) : ‘–‘}%`; // —————— // Health Checks // —————— // Title Status (Ideal 40-60 chars) const tLen = data.title ? data.title.length : 0; const tStatus = tLen > 60 ? ‘Too Long’ : tLen 150 ? ‘Too Long’ : dLen h.startsWith(‘H1’)) : null; updateStatus(statusH1, h1 ? ‘Found’ : ‘Missing’, h1, !h1);// Robots Status const robots = (data.robots_tag || ‘index, follow’).toLowerCase(); const isIndexable = robots.includes(‘index’) && !robots.includes(‘noindex’); updateStatus(statusRobots, robots, isIndexable, !isIndexable);// Readability and Word Count statusReadability.innerText = data.readability_score || ‘–‘; statusWords.innerText = data.word_count ? data.word_count.toLocaleString() : ‘–‘; // —————— // Headings Breakdown // —————— outHeadings.innerHTML = ”; if (data.headings && data.headings.length > 0) { data.headings.forEach(h => { const level = h.substring(0, 2); const text = h.substring(3).trim(); const tag = document.createElement(‘p’); tag.className = `font-mono text-sm ${level === ‘H1’ ? ‘text-lg font-bold text-red-500’ : level === ‘H2’ ? ‘ml-3 font-semibold’ : ‘ml-6 text-gray-600’}`; tag.innerText = `[${level}] ${text}`; outHeadings.appendChild(tag); }); } else { outHeadings.innerHTML = ‘No structured headings found on the page.
‘; } }function toggleDarkMode() { document.documentElement.classList.toggle(‘dark’); }document.addEventListener(‘DOMContentLoaded’, resetResults);// — JAVASCRIPT SEPARATION END —Using Meta Tags Analyzer
The Meta Tags Analyzer utility is designed for digital utility tasks. Check the on-page controls for available formats, limits and options. Always review the output for accuracy before sharing or publishing it.
Practical tips
- Keep your original files or source information as a backup.
- Choose suitable options using the controls provided by this tool.
- Check the generated result and retry with different settings if needed.
Explore related tools
Word to PDF are available for related tasks.