Meta Tag Generator
The Meta Tag Generator writes the tags a page's <head> actually needs — title, description, canonical, Open Graph and X card tags — with live Google and social previews, pixel-width meters, and three outputs: the complete HTML <head> snippet, a Next.js metadata export, and schema.org WebPage JSON-LD. It never emits a meta keywords tag, and it omits the robots tag by default, because Google has ignored keywords since 2009 and its defaults are already index/follow.
How to Use
- 1
Fill in the page basics: title, meta description, and canonical URL. The character hints say 50–60 for the title and 120–160 for the description, and the pixel meters show the rendered width Google actually truncates on — about 580px for the title link, 920px for the snippet.
- 2
Leave Robots on its default (omit the tag) unless the page must stay out of search results. Google's defaults are index/follow, so a normal page needs no robots tag — only noindex pages do.
- 3
Add the Open Graph fields: og:title and og:description fall back to the page title and description when left blank, og:url falls back to the canonical. Set the og:image to an absolute https URL, 1200×630 px, under 5 MB — a relative URL will not unfurl.
- 4
Set the X/Twitter card: summary_large_image for the big image card, summary for the small one. twitter:title, description and image fall back to the Open Graph values when left blank.
- 5
Check the live previews: Google desktop and mobile search results, plus the Facebook/LinkedIn card and the X card. They render your own input in this tab — Google may still rewrite the title or snippet from the page text, so a green meter is a guide, not a guarantee.
- 6
Copy the output in the format you need: the complete escaped <head> snippet for a plain HTML page, the Next.js metadata export for an App Router page, or the schema.org WebPage JSON-LD. Tick the draft box only if you want the values saved in this browser (localStorage) for next time — off by default.
Frequently Asked Questions
What is a meta tag?
Which meta tags does a page actually need?
What is Open Graph, and what is a Twitter card?
Why is there no meta keywords tag?
Do I need a robots tag?
Why does Google rewrite my title?
What size should my og:image be?
Is my draft uploaded anywhere?
What is the difference between the three outputs?
Can this tool make my page rank #1?
Generative Answer & AI Documentation
What is the Meta Tag Generator?
The Meta Tag Generator is a form-to-snippet tool for the tags that decide how a page appears in search results and in shared links. You fill in the page basics — title, meta description, canonical URL, theme-color, author, viewport, charset, and optional hreflang alternates — then the Open Graph fields (og:title, og:description, og:url, og:type, og:image with alt and dimensions, og:locale, og:site_name) and the X/Twitter card fields (twitter:card, title, description, image, site, creator). Blank Open Graph and Twitter fields fall back to the page values, so you only type what differs. The tool renders a live Google search-result preview (desktop and mobile) with pixel-width meters for the title and description, plus Facebook/LinkedIn and X share-card previews, and it exports the result three ways: an escaped, ordered, complete <head> snippet, a Next.js App Router metadata export, and schema.org WebPage JSON-LD. Everything runs in the browser; the draft is saved in localStorage only if you opt in. Two things the tool deliberately does not do are the trust signal: it never emits a <meta name="keywords"> tag, and it emits no robots tag unless you explicitly choose one — both decisions are explained on the page rather than hidden.
Why use Meta Tag Generator offline?
Meta tags are small, fiddly, and public: one unescaped quote in a title breaks the tag, one relative og:image URL means the preview never loads, and one wrong canonical tells Google to index the wrong address. Writing them by hand from memory is how those mistakes happen, and copy-pasting from a five-year-old blog post is how a keywords tag and a robots tag end up on every page. A generator removes the memory work: the fields are labelled, the fallbacks mean you type each value once, the escaping is done for you, and the order follows the order search engines and social crawlers expect — charset first, then viewport, title, description, canonical, robots only when chosen, theme-color, author, hreflang, Open Graph, then X. The second reason is the preview. A title that reads well in a form field can be 700 pixels wide in the result, and a description that fits your draft can be truncated mid-sentence — the pixel meters measure the rendered width in the browser, in Arial at the sizes Google uses, so you see the truncation before your readers do. The third reason is privacy: titles and staging URLs are unreleased work, and this generator never sends them anywhere — the previews render your own input in this tab.
When should you use this tool?
Use it when you publish a page: a blog post, a product page, a landing page, a documentation page — any page that will appear in search results or be shared as a link. Use it when a link unfurls wrong on Slack or X: the og:image checklist on this page (absolute https URL, 1200×630, alt text) fixes most broken unfurls in one pass. Use it when you move a site to Next.js and need the same metadata as a metadata export instead of a <head> snippet. Do not use it to chase rankings: meta tags decide how a page appears, not where it ranks — ranking comes from the content, the links, and whether people find the page useful, and no generator can change that. Do not use it as a substitute for the page itself: a perfect description cannot rescue a page whose title and h1 promise something the content does not deliver. The structured-data half of the <head> — the JSON-LD that says what the page is, rather than how it appears — comes from the Schema Markup Generator on this site, and the canonical URLs declared here are the ones the Sitemap Generator lists.
Key Benefits
- Live Google search preview (desktop + mobile) with pixel-width meters — title about 580px, description about 920px — so truncation is visible before publishing.
- Facebook/LinkedIn and X share-card previews rendered from your own input, in this tab.
- Three exports for the same metadata: escaped HTML <head> snippet, Next.js metadata, and schema.org WebPage JSON-LD.
- Sensible fallbacks: blank og:title uses the page title, blank twitter:image uses the og:image — type each value once.
- Honest defaults: no meta keywords tag ever, no robots tag unless you choose one.
- Character hints (title 50–60, description 120–160) plus pixel meters, because Google truncates on width, not length.
- hreflang alternates for pages that exist in other languages.
- Opt-in draft only: nothing is saved unless you tick the box, and the draft never leaves this device.
Common Use Cases
- Tagging a new blog post: title, description, canonical and og:image in, the <head> snippet out, pasted before publishing — the worked example in the guide below.
- Fixing a link that unfurls wrong on Slack or X: run the og:image checklist — absolute URL, 1200×630, alt text — and re-scrape the link.
- Moving a page to Next.js: copy the metadata export into the page file instead of rewriting the tags by hand.
- Checking a staging page before launch: paste the planned title and description, read the pixel meters, and confirm the snippet says what the page delivers.
- Adding hreflang to a translated page: one alternate per language version, each with its own canonical URL.
Developer Notes & Best Practices
The generator is pure string building with no DOM dependency for the outputs: buildHeadSnippet() escapes every attribute value (<, >, " and & become entities, so a quote in a title cannot break the tag) and emits the tags in a fixed order — charset, viewport, title, description, canonical, robots only when the user picks a non-default value, theme-color, author, hreflang alternates, Open Graph, then X/Twitter. Blank og:title, og:description, og:url and twitter: fields fall back to the page title, description, canonical and og:image respectively, so each value is typed once. buildNextJsMetadata() renders the same data as an App Router metadata export (robots becomes robots: { index, follow } only for a non-default choice), and buildJsonLd() renders a schema.org WebPage block. The pixel meters are the only browser-dependent part: they measure the text on a canvas with measureText, title in 20px Arial against a 580px limit, description in 14px Arial against 920px — the sizes Google uses. The meters are approximations, and the page says so: Google may rewrite a title or snippet from the og:title, the h1, or the page text. Output generation and escaping are covered by Node tests: attribute values with <, > and " are escaped, no keywords tag is ever emitted, the robots tag is omitted by default and appears only when chosen, and the JSON-LD parses as valid JSON with @type WebPage.
The tag-by-tag table — what each tag does, who reads it, and whether it is required
| Tag | What it does | Who reads it | Required? |
|---|---|---|---|
| <title> | The title link in search results and the browser tab | Google, every browser | Yes — exactly one |
| meta description | The snippet under the title in search results | Google (may rewrite it) | Yes |
| link canonical | The one true URL for this page | Yes | |
| meta charset | The page's character encoding | Every browser | Yes — first in <head> |
| meta viewport | How the page scales on phones | Every mobile browser | Yes |
| meta robots | Indexing and link-following instructions | Google, other crawlers | Only for pages that must stay out |
| meta theme-color | The browser chrome colour on mobile | Chrome, Safari | Optional |
| og:title / og:description | The title and text of a shared link preview | Facebook, LinkedIn, Slack, X | Yes, for sharing |
| og:image (+ alt, width, height) | The preview image for a shared link | Every social crawler | Yes, for sharing |
| og:type / og:locale / og:site_name | The kind of page, its language, and its site | Social crawlers | Optional |
| twitter:card / twitter:image | X's card format and image | X | Yes, for X |
| meta keywords | Nothing — ignored since 2009 | Nobody | No — never emitted |
Pixel limits — what Google truncates on
| Field | Measured width | Character hint |
|---|---|---|
| Title link | About 580px | 50–60 characters |
| Description snippet | About 920px | 120–160 characters |
| Why pixels, not characters | A wide character costs more than a narrow one — the same 60 characters can be 500px or 700px | Measure width, not length |
- Write the title and description for the person reading the result — a title that earns the click and a description that says what the page delivers.
- Keep the title near 50–60 characters and the description near 120–160, then check the pixel meters: width, not length, is what Google truncates on.
- Use an absolute https URL for the og:image (1200×630, under 5 MB) and add og:image:alt — a relative URL never unfurls.
- Set the canonical to the one true URL and keep it identical on every copy of the page — a wrong canonical tells Google to index the wrong address.
- Leave robots alone on a normal page: Google's defaults are index/follow, and a robots tag belongs only on pages that must stay out.
- After publishing, share the link once and look at the real preview — the in-page preview is an approximation, and the social crawler's cache can hold a stale image until you re-scrape.
Common Mistakes
- Emitting a meta keywords tag — Google has ignored it since 2009, and it only signals a stale checklist.
- Adding a robots tag to a normal page — the defaults are index/follow, so the tag is unnecessary unless the page must stay out.
- Using a relative URL for the og:image — social crawlers fetch the image from your server and a relative path means nothing to them.
- Counting characters instead of pixels — a 60-character title in wide capitals can be 700px and get truncated anyway.
- Writing the description for a crawler instead of a reader — keyword-stuffed snippets earn no clicks and get rewritten.
- Forgetting the canonical on duplicate pages — without it, Google picks one copy itself, and it may pick the wrong one.
Limitations
The previews are approximations: they render your own input in this tab and never fetch your URL, so they cannot show what Google or a social crawler will actually do — Google may rewrite the title or snippet from the og:title, the h1, or the page text, and a social crawler can cache a stale preview until the link is re-scraped. The pixel meters measure text in Arial at Google's sizes, but the real truncation depends on the device and the query. The tool cannot check that your og:image URL is reachable or the right size — it only checks that you typed one — and it cannot fix a page whose title promises something the content does not deliver. Meta tags decide how a page appears, not where it ranks.
Structured Input/Output Example
Title: "How to Sharpen a Kitchen Knife (Without Ruining It)" Description: "A plain-English guide to honing vs sharpening, the angles that matter, and the three mistakes that dull a blade faster." Canonical: https://www.example.com/kitchen/knife-sharpening og:image: https://www.example.com/images/knife-1200x630.jpg
<meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>How to Sharpen a Kitchen Knife (Without Ruining It)</title> <meta name="description" content="A plain-English guide to honing vs sharpening, the angles that matter, and the three mistakes that dull a blade faster."> <link rel="canonical" href="https://www.example.com/kitchen/knife-sharpening"> <meta property="og:title" content="How to Sharpen a Kitchen Knife (Without Ruining It)"> <meta property="og:image" content="https://www.example.com/images/knife-1200x630.jpg"> <meta property="og:image:width" content="1200"> <meta property="og:image:height" content="630"> <meta name="twitter:card" content="summary_large_image"> — plus the Next.js metadata export and the WebPage JSON-LD for the same page.
Related Tools
Favicon Generator
Generate a complete favicon package from text, emoji or your logo — ICO + PNG sizes, Apple touch icon, manifest and link tags. 100% offline, ZIP download.
HTML Formatter
HTML formatter: turn minified or messy HTML into clean, indented markup. Nested tags aligned, attribute spacing normalized — view-source, readable.
URL Encoder
URL encoder: percent-encode URLs and query parameters so spaces, symbols, and non-Latin text survive transport intact. Free, offline, browser-based.
Image Compressor
Compress JPG, PNG, WebP images in your browser — quality slider, target-size mode, resize and format choice. Batch of 20, ZIP download, nothing uploaded.
Slug Generator
Slug generator: turn titles into URL slugs — 4 presets, bulk mode with duplicate handling, CSV export, transliteration, live URL preview. Free, offline.
Robots.txt Generator
Robots.txt generator: block AI training crawlers but keep AI search — per-crawler rules, presets, sitemap line, pasted-file tester. Free, offline.
Schema Markup Generator
Schema markup generator: build JSON-LD for 11 schema.org types — Organization, Product, FAQPage, HowTo — with honest rich-result status. Free, offline.
Sitemap Generator
Sitemap generator: build sitemap.xml from a URL list — validation, dedupe, 50,000-URL split with index, pasted-file validator. Free, offline.