Language goes on the element, not in a tag. There is no meta tag for it that search engines use — http-equiv="content-language" exists in old documentation and Google has said plainly that it ignores it. Set this instead:
<html lang="en">
What each tag does
charset
Declares the character encoding. Must appear in the first 1024 bytes of the document.
viewport
Tells mobile browsers to lay the page out at device width rather than zooming out from a desktop layout.
robots
How compliant crawlers should treat this page. A request, not an access control.
Search result preview
example.com
Untitled page
No description set — search engines would assemble a snippet from your page text.
An approximation. Google cuts by pixel width rather than character count, at a point that differs between desktop and mobile — and rewrites the title or snippet from your page content more often than not, whatever the tags say.
Browser tab
Untitled page
A tab is far narrower than a search result. This is where a long title is felt every day rather than occasionally.
Example pages
Each one is a shape of page rather than a subject — what changes between them is which tags matter.
Everything runs locally in your browser. Your content is never uploaded to our server, and the generated code is shown as text — it is never executed by this page.
What are meta tags?
Meta tags are elements in a page’s <head> that describe the page rather than form part of it. Nothing in them is rendered as content. They exist to be read by software: browsers, search engines, social platforms, feed readers and anything else that fetches the page.
Most take one shape — <meta name="…" content="…"> — with two significant exceptions that catch people out. The title is an element, not a meta tag, with its text between the tags. And the canonical is a link, using rel and href rather than name and content.
There is a third exception worth knowing, because it is the one people reach for a meta tag to solve and should not. A page’s language is an attribute on the <html> element, not a meta tag:
Language, in the one place that counts
1<html lang="en"> ← correct2<html lang="en-GB"> ← a regional variant, where it matters3<html lang="ja">45<meta http-equiv="content-language" content="en"> ← obsolete; Google6 has said it ignores this
The lang attribute is what a screen reader uses to pick a voice and a pronunciation, and what a browser uses to choose hyphenation and quotation rules. The obsolete http-equiv form still turns up in old tutorials and does nothing. This generator emits the correct one, separately from the meta tags, and says why.
Beyond those, there is no fixed list. Anyone can invent a meta tag, and plenty of vendors have; consumers simply ignore the ones they do not recognise. What follows is the handful that actually do something.
Which meta tags matter for SEO?
Fewer than most lists suggest, and the honest ordering is worth stating plainly rather than presenting eight tags as equally important:
Each meta tag this generator produces and how much it affects search.
Tag
Affects search?
Why
<title>
A great deal
A genuine ranking input, and the heading of your search result. The single most important tag here.
meta description
Indirectly
Not a ranking factor. Google confirmed that years ago. It is a candidate for the snippet, which it rewrites more often than not.
meta robots
When you need it
Controls whether the page can be indexed at all. Nothing else on this list matters if this says noindex.
link canonical
When you need it
Decides which URL gets the credit when the same content sits at several addresses. A hint, not a directive.
meta viewport
Not for SEO
Not a ranking tag, but a page that renders at desktop width on a phone fails its readers before ranking is relevant.
meta charset
Not for SEO
Not a ranking tag either. Get it wrong or place it late and the page renders as mojibake.
meta keywords
No
Google announced in 2009 that it does not use this tag for ranking, and has restated it since.
meta author
No
Not used for ranking. Useful in feed readers and archival tools.
The pattern worth noticing: the tags that matter most are the ones that decide whether a page is indexed and which URL gets the credit. Those are structural decisions. The rest is presentation, and presentation is worth doing well without being worth agonising over.
Title tag vs meta description
They do different jobs and only one of them is a ranking input.
Two different things
1<title>How to Read a User-Agent String</title>2<meta name="description" content="A practical guide to the tokens in a3User-Agent string and what you can learn from one.">
The titleis the page’s name. It appears in the browser tab, in bookmarks, in link previews, and usually as the search result heading. It is a genuine ranking input and the most important tag on this page.
The description is a candidate for the snippet underneath. It is not a ranking factor — Google has been explicit about that — and Google generates its own snippet from the page content most of the time, because a snippet matching the search someone actually typed is more useful than a generic summary.
On length. There is no character limit for either. Google truncates by pixel width, in its own font, at a point that differs between desktop and mobile, and the width depends on which characters you used — an i and a Ware not the same size. The familiar “60 characters” and “155 characters” are rough proxies that got repeated until they sounded like specifications. The counters in this tool use them as a signal and say so.
The practical technique is unaffected by any of this: put what matters at the front. A truncated title that has already said the important thing has lost nothing.
Meta robots
The robots tag tells compliant crawlers how to treat the page. Two directives cover almost every real use:
The four combinations
1<meta name="robots" content="index, follow"> the default2<meta name="robots" content="noindex, follow"> keep out of results, still crawl links3<meta name="robots" content="index, nofollow"> index, ignore the links4<meta name="robots" content="noindex, nofollow"> neither
noindex, follow is the one worth knowing. It is what you want on paginated listings, filtered views and internal search results: pages that should not appear in results themselves but whose links lead somewhere that should.
This is not access control, and the distinction matters more than anything else on this page. A robots directive is a request that well-behaved crawlers honour voluntarily. It does not stop the page being fetched. It does not stop a crawler that ignores it — and crawlers that ignore it are exactly the ones you were worried about. Anyone with the URL can read the page in full. Content that must not be public needs authentication or a server-side rule; a meta tag will not do it.
One further wrinkle: removal is not instant. The crawler has to re-fetch the page and see the directive before it acts. And a page blocked in robots.txt can never be crawled, which means the noindex on it is never read — a combination that keeps pages in the index rather than removing them.
Canonical tags
A canonical names the preferred URL for a piece of content. You need one when the same content is reachable at more than one address, which happens more often than people expect:
Without one, the signals for that page are split across five addresses and a search engine picks a winner on its own. With one, they consolidate onto the URL you nominated.
It is a hint, not a directive. Google states plainly that it weighs your canonical alongside other signals — your internal links, your sitemap, redirects, which version has inbound links — and may select a different URL. If the rest of your site links to a URL that contradicts the canonical, the contradiction is what gets noticed. Make the hint consistent with everything else and it is usually followed.
It has to be absolute. A relative canonical is valid HTML and resolves against the current URL — which defeats the purpose entirely, since you set a canonical precisely when the current URL is not the one you want counted. This generator rejects relative values for that reason. The canonical URL generator takes an absolute URL and reports every normalisation it applies — the fragment dropped, the scheme and host lowercased, tracking parameters removed if you ask — before writing the tag.
The viewport tag
Not an SEO tag, and one of the two most consequential on the page. It tells mobile browsers how wide to lay the page out:
Without it, mobile browsers assume a desktop-width layout — typically 980 pixels — and zoom out to fit, which renders the whole page at a size nobody can read. The tag dates from a time when most pages were desktop-only and this behaviour was the helpful default; for a responsive page it is the opposite of helpful.
Do not disable zoom. Adding user-scalable=no or maximum-scale=1.0 blocks pinch-zoom. That is a serious accessibility failure for anyone who needs to magnify text, and a WCAG problem. Safari on iOS has ignored it since iOS 10 for exactly that reason. This generator offers it because it gets asked for, with the caveat attached.
Charset and encoding
The other consequential non-SEO tag, and the one with a positional requirement most people do not know about:
First, and the spec means it
1<head>2 <meta charset="UTF-8"> ← must be within the first 1024 bytes3 <meta name="viewport" ...>4 <title>…</title>5</head>
UTF-8 encodes every character in Unicode while staying byte-compatible with ASCII, so it handles any language without you deciding in advance. There is essentially no reason to use anything else on a new page.
The position is the part that bites. The HTML spec requires the encoding declaration inside the first 1024 bytes of the document. A browser reads the opening bytes, guesses an encoding, and if the declaration arrives after that window it either restarts parsing or carries on with the wrong guess — which is how a page ends up full of mojibake. A long title in a non-Latin script is exactly what pushes it out of the window, which is why this generator puts charset first and keeps it there.
Meta keywords
The keywords tag is a historical artefact, and it is worth being precise about why rather than just saying it is dead.
Early search engines used it as a declared list of what a page was about. That made it the easiest field in the document to lie in — invisible to readers, trivial to stuff, and with no relationship to the page content. It stopped being a useful signal almost immediately, and Google announced in 2009 that it does not use it for ranking, a position it has restated since. Other major engines dropped it for the same reason.
So: it does nothing for ranking on Google. It is not penalised either — the tag is simply ignored. Some internal site-search systems still read it, which is the only live reason to fill one in. This generator produces it on request, off by default, and labelled for what it is.
If you do use it, keep it to a handful of terms that honestly describe the page. A list of thirty is the pattern spam filters were built to notice, and it will not help you anywhere.
Open Graph and Twitter Cards
Separate vocabularies for link previews on social platforms, and not what this generator produces — but worth knowing how they relate to what it does.
Open Graph uses property rather than name, which is the detail people most often get wrong. It originated at Facebook and is now read by most platforms that unfurl links. Twitter Cards use name and are largely a superset of the same idea.
Your standard tags already do some of this work. Platforms that find no Open Graph tags generally fall back to the title element and the meta description, so a page with those set produces a reasonable preview. What the fallback cannot supply is an image, a card type, or a title written specifically for a social feed rather than for a search result — which is what Open Graph adds and why it is worth adding separately. The Open Graph generator writes that block, including the Twitter Card equivalents.
Escaping values safely
A meta tag holds arbitrary text inside a quoted attribute, which means it has the same problem every template has. It is worth seeing what goes wrong:
An unescaped value stops being a value
1Description: Widgets " onload="alert(1)23Naive: <meta name="description" content="Widgets " onload="alert(1)">4 ^5 the attribute closed here, and what follows6 is now a new attribute rather than content78Escaped: <meta name="description" content="Widgets " onload="alert(1)">
Four characters need attention, and the order they are handled in matters:
& becomes & — and must be done first, or it finds the ampersands the other replacements introduced and double-escapes them.
" becomes " — this is the one that breaks the attribute.
< and > become < and > — not strictly required inside a quoted attribute, but cheap insurance and it keeps the output readable as code.
The <title> element needs different treatment again, because its content is text rather than an attribute value — a different grammar with a different set of significant characters. This generator uses two separate escapers for that reason.
One more thing worth stating: the preview on this page renders the generated code as text, never as markup. A generator that carefully escapes a value and then hands it back to the HTML parser to draw a “preview” has undone its own work.
Common meta tag mistakes
Roughly in order of how much damage they do:
A noindex left behind after a launch. The single most expensive mistake on this list. A staging directive that ships to production removes the site from search, and nothing else you do matters until it is found.
A canonical pointing at the wrong URL. At the staging domain, at the homepage, or at a page that no longer exists. It consolidates your signals onto somewhere you did not intend.
Blocking a page in robots.txt and adding noindex. A blocked page is never crawled, so the noindex is never read. The page can stay in the index indefinitely — the opposite of the intention.
The same title and description on every page. Common on templated sites. It tells a search engine the pages are interchangeable.
No viewport tag. The page renders at desktop width on a phone. Not an SEO problem so much as a page nobody can read.
Unescaped quotes and ampersands. Silently breaks the markup, and the damage is invisible until you view source.
A charset declared late. Past the first 1024 bytes the browser has already guessed, and a page in a non-Latin script renders as mojibake.
Treating noindex as privacy. The page is still public to anyone with the URL. This is a security misunderstanding, not an SEO one.
Time spent on the keywords tag. Ignored for ranking since 2009. Any effort here is better spent on the title.
Frequently asked questions
What is a meta tag?
An element in a page's <head> that carries information about the page rather than content shown on it. Most take the form <meta name="…" content="…">, and they are read by browsers, search engines, social platforms and anything else that fetches the page.
Which meta tags are important for SEO?
Fewer than most lists suggest. The title element and a meta description are worth writing on every page. The robots tag matters when you need to control indexing. A canonical link matters when the same content is reachable at more than one URL. The viewport and charset tags are not SEO tags at all, but a page that renders badly on a phone or in the wrong encoding has a problem no meta tag will fix.
How long should a title be?
There is no character limit, because Google truncates by pixel width rather than character count — around 580 pixels on desktop, less on mobile, and the width depends on which characters you used. Fifty to sixty characters is a rough proxy that gets quoted as a rule. Put what matters first and the truncation stops being a problem.
How long should a meta description be?
Same answer: it is a pixel measurement, not a character count, and around 155–160 characters is the usual proxy. It is worth less effort than people spend on it, because Google generates its own snippet from the page content most of the time — studies have consistently put the rewrite rate above half. Write one anyway; it is the version you control.
Is the meta keywords tag still important?
No. Google announced in 2009 that it does not use the keywords meta tag for ranking, and has restated it since. Other major engines dropped it for the same reason: it was the easiest tag in the document to stuff, so it stopped being a signal of anything. This generator will produce it on request, off by default, and labels it for what it is.
What does noindex mean?
It asks compliant crawlers not to include the page in their index, so it should not appear in results. The page is still fetched and its links can still be followed unless you also say nofollow. Removal is not instant — the crawler has to re-fetch the page and see the directive before it acts on it.
What does nofollow mean?
In the robots meta tag it asks crawlers not to follow the links on the page. That is different from rel="nofollow" on an individual link, which applies to that link alone. Since 2019 Google treats link-level nofollow as a hint rather than a directive.
Can meta robots block private content?
No, and this is the mistake worth avoiding. A noindex tag is a request that well-behaved crawlers honour. It does not stop anyone fetching the page, it does not stop a crawler that ignores it, and the page remains fully readable to anyone with the URL. Private content needs authentication or a server-side access rule — a meta tag is not a security control.
What is a canonical tag?
A <link rel="canonical"> that names the preferred URL for a piece of content, for use when the same content is reachable at several addresses — tracking parameters, session IDs, print versions, HTTP and HTTPS. It consolidates the signals for those duplicates onto the URL you nominate.
Can canonical tags prevent duplicate content?
They help search engines pick which duplicate to show, which is usually the actual problem. But a canonical is a hint, not a directive: Google states plainly that it considers your canonical alongside other signals and may select a different URL — particularly if the pages differ, or if your internal links and sitemap point somewhere else. Make the hint consistent with everything else and it is usually followed.
Does the canonical URL have to be absolute?
In practice, yes. A relative canonical is valid HTML and resolves against the current URL — which defeats the purpose, since you use a canonical precisely when the current URL is not the one you want counted. This generator rejects relative values for that reason.
What is the viewport meta tag?
It tells mobile browsers how to lay the page out. Without it they assume a desktop-width layout — typically 980 pixels — and zoom out, which makes everything unreadably small. width=device-width, initial-scale=1.0 is the standard value and is what almost every page wants.
Should I disable zoom in the viewport tag?
Almost certainly not. Adding user-scalable=no or maximum-scale=1.0 blocks pinch-zoom, which breaks the page for anyone who needs to magnify text — a serious accessibility failure and a WCAG problem. Safari on iOS has ignored it since iOS 10 for exactly that reason. This generator offers it because it gets asked for, with the caveat attached.
Why is UTF-8 used for the charset?
Because it encodes every character in Unicode while remaining byte-compatible with ASCII, so it handles any language without you having to decide in advance. The HTML spec requires the encoding declaration to appear within the first 1024 bytes of the document — which is why this generator puts it first, before the title.
What happens if the charset declaration comes too late?
The browser has already started guessing. It reads the first bytes, picks an encoding, and if your declaration arrives after the 1024-byte window it may have to restart parsing — or simply carry on with the wrong guess, which is how you get a page full of mojibake. A long title full of non-ASCII characters is exactly the case that pushes it out of the window.
Should every page have a meta description?
It is worth writing one for pages you care about the snippet on. It is not required, and it is not a ranking factor — Google confirmed that years ago. Without one, the snippet is assembled from your page text, which is often fine and occasionally embarrassing. On a very large site, writing thousands of thin descriptions is worse than writing none.
Can meta tags improve rankings?
Indirectly at best. The title element is a genuine ranking input. The description is not, though a better snippet can earn more clicks. Robots and canonical tags shape what gets indexed and which URL gets credited, which affects what can rank at all. Keywords, author and theme-color do nothing for ranking. No meta tag makes a page rank for something the page is not about.
What is the difference between the title tag and the meta description?
The title is an element — <title>Text</title> — and is the page's name: it appears in the browser tab, in bookmarks, in link previews, and usually as the search result heading. The description is a <meta> tag carrying a summary, used only as a candidate for the result snippet. The title is the more important of the two by a wide margin.
What are Open Graph and Twitter Card tags?
Separate vocabularies for link previews on social platforms. Open Graph uses property attributes rather than name — og:title, og:description, og:image — and originated at Facebook; Twitter Cards use name="twitter:card" and friends. Platforms that find no Open Graph tags generally fall back to the title and description, so the tags this generator produces already do useful work in a preview. This tool does not generate Open Graph tags.
Do meta tags replace Open Graph tags?
Not entirely. Standard meta tags are the fallback most platforms use, so a page with only a title and description will still produce a reasonable preview. What they cannot supply is an image, a card type, or a title written specifically for social rather than for search — which is what Open Graph adds.
How do I escape quotes and ampersands in a meta tag?
An ampersand becomes & and a double quote inside a double-quoted attribute becomes ". Getting this wrong is not a cosmetic problem: an unescaped quote closes the attribute early, and everything after it is parsed as new markup. This generator escapes every value automatically, and shows you the result as text rather than running it.
Where do meta tags go in the HTML?
Inside <head>, before any content. The charset declaration should be first. The language is the exception on this page — it belongs on the <html> element as a lang attribute, not in a meta tag, because <meta http-equiv="content-language"> is obsolete and Google has said it ignores it.
What are the most common meta tag mistakes?
In rough order of how often they cause real damage: a stray noindex left on a page after a migration; a canonical pointing at the wrong URL or at the staging domain; the same title and description copied across every page; a missing viewport tag; unescaped quotes breaking the markup; and treating noindex as if it made a page private.
Is this Meta Tag Generator free?
Yes. Every field, the previews, the copy and the download are free, with no account and no sign-up.
Is my content uploaded anywhere?
No. Generating a meta tag is string work, and all of it happens in your browser — there is no backend and no request. Nothing is stored, and nothing you type leaves the page.
Can I copy or download the generated HTML?
Both. Copy HTML puts the snippet on your clipboard, and the download button saves it as an .html file with a comment saying where the tags go. The generated code is rendered as text on this page and is never executed by it.
Keep going
Other tools that run the same way
Same engine-first approach, same privacy model — everything below does its work in your browser.