Meta tag generator. With three previews.
One form, three previews.
How to use the Meta Tag Generator
This generator writes the meta tags for the head of a web page: the title, the meta description, the canonical link, robots, Open Graph and Twitter Card tags. You fill in one form, and it shows how the page could look in a Google result, a Facebook share and an X card, then gives you the code for plain HTML, WordPress, Shopify or Next.js. It is for site owners, marketers and developers setting up a new page or fixing an old one.
Step by step
-
Pick your platform
Under stack preset, choose HTML (the default), WordPress, Shopify Liquid or Next.js Metadata. The same values are written out in the format that platform expects, and you can switch at any time.
-
Write the title and description
Replace the sample text in Page title and Meta description. The counters beside the labels show length against 60 and 160 characters, and turn amber when the title is under 30 or over 60, or the description is under 120 or over 160.
-
Set the canonical URL and robots
Enter the full address of the page in Canonical URL, including https. Leave Robots on index, follow for a page you want in search, or choose a noindex or nofollow option for pages such as thank you pages or test pages.
-
Fill in the social fields
Paste the full URL of a share image into OG image (1200×630). Choose OG type (website, article or product), enter your Twitter handle (@), and pick a Twitter card: summary_large_image for a big image or summary for a small one.
-
Check the previews
The Google SERP, Facebook and X previews update as you type. Use them to spot a title that gets cut off, a description that trails away, or an image that is cropped badly.
-
Copy the code
Read the verdict line under the code, fix anything it lists, then press Copy code and paste the result into your page head, theme file or app/page.tsx.
Reading the result
- A green line that says all lengths are within spec means the title is 30 to 60 characters, the description is 120 to 160, and a canonical URL and an OG image are set. Otherwise an amber line lists each problem.
- The Google preview cuts a title over 60 characters to 57 and adds an ellipsis, and does the same to a description over 160 at 157 characters. Google itself trims by pixel width, so treat this as a close guide, not an exact match.
- The HTML output also adds the viewport and charset tags, and repeats the title, description and image as Open Graph and Twitter tags.
- og:site_name is filled with the domain of your canonical URL. The Site name and Author fields are not written into the code, so add those tags by hand if you need them.
Tips and common mistakes
- Avoid double quotes in the title and description. The HTML, WordPress and Shopify output copies your text into the content attribute exactly as typed, and a double quote would end it early.
- The page opens with sample values. Replace every field, including the canonical URL and the image, before you copy the code.
- The WordPress output is a functions.php snippet. If you already use an SEO plugin such as Yoast or Rank Math, set the tags there instead, or the page will carry two sets.
- The Shopify output adds a second og:type tag, set to product, on product templates. Those pages then carry two og:type tags, so delete the first one or move it into an else branch of that if block.
- Use an absolute image URL that anyone can open. Social sites cannot read an image on localhost or behind a login.
Privacy and limits
The code is generated in your browser and nothing you type is sent to this site or saved. The one network request is the preview image: your browser loads the OG image URL you enter straight from the server that hosts it, as it would for any web image.
Meta tags are the pitch before the page.
Every Google result, every Facebook share, every Slack link preview, every LinkedIn post comes from meta tags before the user ever loads the page. Title and description drive organic click-through rate, OG image drives social share engagement, canonical prevents duplicate-content dilution, robots controls indexation. A complete meta block is twenty lines of HTML; the operator cost of skipping it compounds every time the page is linked.
Three length rules worth memorizing. Title: 50 to 60 characters, primary keyword at the front, brand at the end. Description: 120 to 155 characters, keyword naturally embedded, one clear value proposition. OG image: 1200 by 630 pixels, 1.91:1 ratio, under 8 MB. The calculator flags titles over 60, descriptions over 160, and missing canonicals in real time; fix those three before clicking copy.
Stack-aware output shortens the gap between tool output and production. HTML goes directly into <head>. WordPress runs through Yoast or Rank Math in practice, but the header snippet above fits manual theme edits. Shopify Liquid goes in theme.liquid with template-specific overrides. Next.js 15 uses the Metadata API; the output above is the typed metadata export.
Tools in the same cluster: Schema generator for the JSON-LD block that belongs alongside meta tags. OG preview for the post-deployment verification pass across 5 platforms.
Five answers.
What is the ideal title tag length?
Google displays roughly the first 60 characters of a title tag in desktop search results and around 50 on mobile. Beyond 60, the title is truncated with an ellipsis. The calculator above counts characters in real time and flags titles longer than 60. The minimum practical length is 30 characters; shorter titles miss keyword coverage. Sweet spot is 50 to 60 characters, primary keyword near the front, brand name at the end.
What is the ideal meta description length?
Google displays roughly 150 to 160 characters of the meta description on desktop and around 120 on mobile. The calculator flags descriptions over 160 chars. Write 120 to 155 characters with the primary keyword naturally embedded and a clear value proposition. If the description is missing, Google generates one from page content, which is often sub-optimal; always ship a hand-written description.
What is the recommended Open Graph image size?
Facebook, LinkedIn, Slack, and most OG consumers expect 1200 by 630 pixels with an aspect ratio of 1.91:1. Twitter/X summary-large-image cards also render this dimension correctly. Keep the image under 8 MB for reliable rendering and use JPG or PNG. Text in the image should stay inside a center safe zone (roughly 90 percent width and 80 percent height) because LinkedIn crops edges in some views. WebP is now supported but JPG/PNG has the widest parser compatibility.
Do I need separate Open Graph and Twitter Card tags?
In most cases no. Twitter and X parse Open Graph tags when Twitter-specific tags are absent, so a complete OG set covers both platforms. Add twitter:card (summary_large_image is the most common) and twitter:site (your @handle) to override defaults; beyond that, OG tags for title, description, and image work for both. The generator above emits both sets because occasional edge cases benefit from explicit Twitter tags, but the duplicated content is harmless.
Does this tool save my data?
No. Every value you enter lives in memory for this browser tab only. Nothing is transmitted to a server, stored in a database, or synced. Close the tab and the data is gone. The Copy Code button puts the generated markup on your clipboard; that is the only output path.
Every template. Every page.
Our SEO engagements ship dynamic meta templates per page type plus OG-image generation pipelines (Vercel OG, Shopify metafields, WordPress ACF). Written plan in 2 weeks.
Published · Last updated .