Basic Meta Tags
Open Graph / Twitter
Generated HTML
<meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="robots" content="index, follow"> <!-- Open Graph --> <meta property="og:type" content="website"> <!-- Twitter Card --> <meta name="twitter:card" content="summary_large_image">
Meta Tag Generator — SEO, Open Graph, Twitter Cards, robots, canonical, hreflang
The meta tag generator above outputs a complete <head> snippet with HTML meta elements, Open Graph tags, Twitter Card tags, robots directives, canonical URL, and hreflang declarations. The HTML meta element and link[rel] are defined in the WHATWG HTML Living Standard (sections 4.2.5 and 4.6) — a non-versioned spec with continuous revisions. Open Graph (ogp.me) was published by Facebook in 2010 under Open Web Foundation Agreement v0.9, inspired by Dublin Core, link rel=canonical, Microformats, and RDFa; it standardizes og:title, og:type, og:image, og:url, og:description, og:site_name. Twitter Cards (now developer.x.com) defines four card types: summary, summary_large_image, app, player. Card images use 2:1 aspect (1200×600) or 16:9 (1200×675); Photo Cards and Gallery Cards were deprecated and now map to summary_large_image. The robots meta directive (Google Search Central spec) controls crawler indexing behavior (index, noindex, follow, nofollow, noarchive, nosnippet, max-snippet, max-image-preview, unavailable_after). The canonical link relation, originally proposed by Google in 2009 and now part of WHATWG HTML, declares the preferred URL for content reachable through multiple paths.
About this tool
Three classes of tags coexist in a typical <head> and serve different audiences. Search engines parse standard meta (description, robots, canonical, hreflang); social platforms parse Open Graph and Twitter Card; humans see the title bar and SERP snippet. They overlap intentionally — og:title falls back to <title> on platforms that need it, twitter:image falls back to og:image, and a missing canonical lets the crawler pick its own choice from URL parameters and redirects. The hreflang attribute carries a BCP 47 language tag (Phillips & Davis, RFC 5646) and an optional region subtag (e.g., en, en-US, es-419 for Latin American Spanish). The x-default value targets users whose locale matches none of the declared variants. Google supports hreflang both in <link rel="alternate"> and in XML sitemaps; it treats both inputs as equivalent but warns on mismatched bidirectional declarations (every variant must point back to every other variant). Two non-obvious considerations matter. First, the structured data bridge: Open Graph and Twitter Cards are presentation-layer metadata — they tell platforms how to render a share preview, but they do not feed Google's structured-data eligibility for rich results. For Article, Recipe, Product, FAQPage and similar rich results, schema.org JSON-LD via <script type="application/ld+json"> is the documented input. Second, robots conflicts: a noindex page with a self-referential canonical is contradictory; Google ignores the canonical on noindex pages and the page does not enter the index — this surprises teams that copy-paste a canonical template across the site.
- Title and description for search engine snippet rendering
- Open Graph tags (og:title, og:type, og:image, og:url, og:description, og:site_name)
- Twitter Card tags (summary, summary_large_image, app, player)
- Robots directive (index/noindex, follow/nofollow, max-snippet, max-image-preview)
- Canonical URL declaration via <link rel="canonical">
- hreflang variants with x-default support (BCP 47 / RFC 5646 language tags)
- Image dimension hints for social previews (2:1 or 16:9 aspect)
- Live preview as you type
- One-click copy of the generated <head> block to clipboard
- Pure client-side — no API call, no upload
Free. No signup. Your inputs stay in your browser. Ads via Google AdSense (consent required).
Frequently asked questions
Do I really need both Open Graph and Twitter Card tags?
Practically yes. Open Graph is parsed by Facebook, LinkedIn, Slack, Discord, iMessage Rich Link, WhatsApp, Pinterest, and many others. Twitter Cards extend OG for Twitter/X-specific behavior — twitter:card type, twitter:site (publisher account), twitter:creator (author account), and image rules that prefer 2:1 aspect over OG's variable. Twitter falls back to OG when Twitter-specific tags are missing, so you can ship og:* alone and most Twitter behavior works. Adding twitter:card='summary_large_image' + twitter:image gives you the large-preview rendering deliberately, regardless of OG image dimensions.
What's the difference between robots meta and X-Robots-Tag header?
Both control crawler indexing, but robots meta lives in HTML <head> and X-Robots-Tag is an HTTP response header. The header version is the only way to control non-HTML resources (PDFs, images, JSON files). When both are present, Google applies the most restrictive combined rule per Google Search Central. Practical advice: use HTML meta for HTML pages (visible in source / DevTools / sitemap audits), use the header for assets shipped from a CDN that doesn't let you inject HTML.
What does x-default do in hreflang, and when should I use it?
x-default is a special hreflang value that targets users whose browser locale matches none of the explicit variants. Typical use: a homepage available in en, fr, es, de — users from a country with no matching locale (Polish, Japanese) should land on the English version. Set <link rel='alternate' hreflang='x-default' href='https://example.com/en/'> to declare the fallback. Without x-default, Google guesses based on geo-IP and Accept-Language, which is unreliable. Source: Google Search Central — hreflang documentation.
Why does my canonical not work — Google still indexes the duplicate?
Five common causes per Google Search Central: (1) the canonical points to a page that itself has a different canonical (chains not followed, max 1 hop); (2) the canonical URL returns 4xx/5xx or redirects elsewhere; (3) noindex on the same page (Google ignores canonical on noindex); (4) the duplicate has stronger signals (more inbound links, higher CTR) so Google overrides your canonical; (5) the canonical is set in a <link> after a JavaScript hydration that swaps it. Google's canonical is a strong hint, not a guarantee — it can pick a different URL.
How does this generator handle hreflang interaction with canonical?
The generator emits self-referential canonical (every URL canonicalizes to itself) plus reciprocal hreflang for every declared variant. Self-referential canonical + hreflang variants is the recommended pattern (Google Search Central): every page in the cluster says 'I am the canonical for my locale' while hreflang declares the locale-equivalence relationship. Avoid pointing all locale variants' canonical at a single English source — that signals 'these are duplicates' and Google may drop the localized URLs from the index.
Sources (6)
- WHATWG (2026). HTML Living Standard — Meta elements (§4.2.5) and Links (§4.6, including link rel="canonical" and link rel="alternate" hreflang). html.spec.whatwg.org/multipage/ — Living Standard, no version numbers, continuous revisions.
- Facebook / Open Web Foundation (2010). The Open Graph Protocol — og:title, og:type, og:image, og:url, og:description, og:site_name (RDFa-based meta tags). ogp.me — Open Web Foundation Agreement v0.9; inspired by Dublin Core, link rel=canonical, Microformats, RDFa.
- X Corp (formerly Twitter, Inc.) (2024). X for websites — Cards documentation (summary, summary_large_image, app, player; aspect 2:1 or 16:9; Photo+Gallery cards deprecated and mapped to summary_large_image). developer.x.com/en/docs/x-for-websites/cards.
- Google Search Central (2024). Robots meta tag, data-nosnippet, and X-Robots-Tag specifications (index/noindex, follow/nofollow, noarchive, nosnippet, max-snippet, max-image-preview, unavailable_after). developers.google.com/search/docs/crawling-indexing/robots-meta-tag.
- Google Search Central (2024). Specify a canonical URL — rel="canonical" patterns and self-referential canonicals. developers.google.com/search/docs/crawling-indexing/consolidate-duplicate-urls (canonical link relation originally proposed by Google 2009, now WHATWG HTML).
- Phillips, A., & Davis, M. (Eds.) (2009). Tags for Identifying Languages. RFC 5646 (BCP 47), IETF — used by hreflang attribute and language meta tags.
These are the original publications the formulas in this tool are based on. Locate them by journal name and year on Google Scholar or PubMed.
By Marco B. ·