NitroSERP

Free Next.js Metadata API Generator

Next.js App Router

Updated October 31, 2026

Generate copy-and-paste TypeScript Metadata and generateMetadata() code for the Next.js App Router (app/page.tsx and app/layout.tsx) with Open Graph, Twitter cards, and canonicals.

38 / 60 chars

137 / 160 chars

Next.js App Router (app/page.tsx or app/layout.tsx)

import type { Metadata } from "next";

export const metadata: Metadata = {
  metadataBase: new URL("https://example.com"),
  title: "Free Next.js Metadata Generator | Acme",
  description: "Generate strongly-typed Next.js App Router Metadata objects with canonical URLs, Open Graph images, Twitter cards, and robots directives.",
  alternates: {
    canonical: "/tools/nextjs-metadata",
  },
  openGraph: {
    title: "Free Next.js Metadata Generator | Acme",
    description: "Generate strongly-typed Next.js App Router Metadata objects with canonical URLs, Open Graph images, Twitter cards, and robots directives.",
    url: "https://example.com/tools/nextjs-metadata",
    siteName: "Acme",
    type: "website",
    images: [
      {
        url: "https://example.com/og-image.png",
        width: 1200,
        height: 630,
        alt: "Free Next.js Metadata Generator | Acme",
      },
    ],
  },
  twitter: {
    card: "summary_large_image",
    title: "Free Next.js Metadata Generator | Acme",
    description: "Generate strongly-typed Next.js App Router Metadata objects with canonical URLs, Open Graph images, Twitter cards, and robots directives.",
    images: ["https://example.com/og-image.png"],
  },
  robots: {
    index: true,
    follow: true,
    googleBot: {
      index: true,
      follow: true,
      "max-image-preview": "large",
      "max-snippet": -1,
    },
  },
};

How to use Next.js Metadata Generator

Enter your page title, meta description, production domain (metadataBase), and route path.

Choose between a static export const metadata: Metadata object or an async generateMetadata() function.

Copy the generated TypeScript snippet and paste it into your Next.js App Router page.tsx or layout.tsx file.

Generate Next.js App Router Metadata TypeScript objects in seconds

Writing boilerplate Open Graph, Twitter card, canonical URL, and googleBot robot directives by hand across dozens of Next.js page.tsx files is repetitive and error-prone. This free Next.js metadata generator outputs clean, type-safe TypeScript code for the Next.js App Router (next/metadata).

Next.js Metadata API fields vs. rendered HTML tags

Next.js Metadata PropertyRendered HTML in <head>SEO Purpose
title & description<title> & <meta name="description">Primary search engine title link and snippet summary
metadataBase + alternates.canonical<link rel="canonical" href="https://...">Consolidates duplicate URLs and resolves relative social URLs
openGraph (images, type, siteName)<meta property="og:*">Rich link previews on LinkedIn, Slack, Discord, and Facebook
twitter (card: "summary_large_image")<meta name="twitter:*">Large summary card preview on X / Twitter
robots.googleBot<meta name="googlebot" content="...">Enables max-image-preview:large for Google Discover & SERP thumbnails

Companion tools for Next.js SEO

Test how your generated title and description look on Google with the SERP preview simulator, generate JSON-LD structured data for your JSX with the schema markup generator, or create standard HTML tags for non-React sites with the HTML meta tag generator.

Next.js Metadata Generator FAQs

In Next.js 13, 14, 15, and 16 (App Router), instead of using a <Head> component, you export either a static metadata object (export const metadata: Metadata = { ... }) or an async generateMetadata function from a Server Component (page.tsx or layout.tsx).

More seo analysis tools and nearby utilities.

  • Meta Tag Generator

    Free SEO meta tag generator: create HTML title tags, meta descriptions, robots directives, and Open Graph tags with live character counters and copy-and-paste head code.

    Open tool →
  • Schema Markup Generator

    Generate Article, BreadcrumbList, or FAQPage JSON-LD from your own content. Copy the script and follow worked schema markup examples.

    Open tool →
  • Open Graph Tag Generator

    Free Open Graph tag generator: create og:title, og:description, og:url, og:image, and og:type HTML meta tags for LinkedIn, Facebook, Discord, Slack, and WhatsApp.

    Open tool →
  • SERP Preview Tool

    Free Google SERP simulator and snippet preview tool: test your title tag, display URL, and meta description in an approximate Google search result with live character counts.

    Open tool →
View all seo analysis tools