Next.js Metadata Generator
Generates a Next.js App Router metadata export, either static or with generateMetadata, covering title template, description, canonical, Open Graph, Twitter card, robots, icons and verification, or the equivalent Pages Router Head tags.
Use the tool
Why this tool exists
Next.js moved SEO tags from hand-written Head elements to a typed metadata object, and the shape is easy to get slightly wrong: metadataBase, title templates, canonical paths, openGraph images and robots values all have their own spelling. This form gives you a starting object. Fill in the title, template, description, site URL, canonical path, social image, Twitter handle and locale, and choose noindex if needed. You can output static metadata, a generateMetadata function, or Pages Router tags. Add keywords in the input box. It gives you correct structure, but good titles and descriptions still need your own writing. The generator runs in your browser and nothing is sent to a server.
How to use it
- Enter your keywords in the input box, comma separated.
- Fill in the title, template, description, site URL, canonical path, image, Twitter handle and locale.
- Choose the output style, then copy the code into layout.tsx or page.tsx.
Frequently asked questions
What is metadataBase for?
It is the site URL that Next.js uses to turn relative paths for canonical links and images into absolute URLs. Set it to your production domain.
What is the difference between static metadata and generateMetadata?
Static metadata is a fixed object for pages whose tags do not change. generateMetadata is a function for pages whose tags depend on data, such as a blog post fetched by slug.
What does the noindex option do?
It adds robots settings that ask search engines not to index the page or follow its links. Use it for staging, thank-you pages and private areas.
Does it support the Pages Router?
Yes. Choose the Pages Router output to get Head tags for title, description, canonical, Open Graph and Twitter instead of a metadata object.