Next.js llms.txt · AI Docs Browser · mdream

[llms.txt Tools](https://mdream.dev/llms-txt/nextjs/llms-txt)

# Next.js llms.txt

Browse Next.js documentation as markdown. Click any page in the sidebar to view it, or copy the full llms.txt for your AI tools.

nextjs.org/llms.txt

[Raw llms.txt](https://nextjs.org/docs/llms.txt) [Raw llms-full.txt](https://nextjs.org/llms-full.txt)

Copy Markdown [](https://nextjs.org/llms.txt)

llms.txt

Getting Started

Installation

Project Structure

Layouts and Pages

Linking and Navigating

Server and Client Components

Fetching Data

Mutating Data

Caching

Revalidating

Error Handling

CSS

Image Optimization

Font Optimization

Metadata and OG images

Route Handlers

Proxy

Deploying

Upgrading

Guides

AI Coding Agents

Analytics

Authentication

Backend for Frontend

Caching (Previous Model)

CDN Caching

CI Build Caching

Content Security Policy

CSS-in-JS

Custom Server

Data Security

Debugging

Deploying to Platforms

Draft Mode

Environment Variables

Forms

How Revalidation Works

ISR

Instrumentation

Internationalization

JSON-LD

Lazy Loading

Development Environment

Next.js MCP Server

MDX

Memory Usage

Migrating

Migrating to Cache Components

Multi-tenant

Multi-zones

OpenTelemetry

Package Bundling

PPR Platform Guide

Prefetching

Preserving UI state

Preventing Flash

Production

PWAs

Public pages

Redirecting

Rendering Philosophy

Sass

Scripts

Self-Hosting

Server Actions

SPAs

Static Exports

Streaming

Tailwind CSS v3

Testing

Third Party Libraries

Upgrading

Videos

View transitions

API Reference

Directives

Components

File-system conventions

Functions

Configuration

CLI

Adapters

Edge Runtime

Turbopack

Glossary

Architecture

Accessibility

Fast Refresh

Next.js Compiler

Supported Browsers

Community

Contribution Guide

Rspack

Optional

Pages Router

## What is Next.js's llms.txt?

Next.js publishes an `/llms.txt` file that provides AI systems with a structured index of its documentation. It follows the [llms.txt specification](https://llmstxt.org), organizing links to guides, API references, and tutorials under section headings so that LLMs like ChatGPT, Claude, and Gemini can quickly understand what Next.js offers and where to find details.

Pass

Spec

7

Sections

88

Links

41.3 KB

Size

~10.6k

Tokens

Sections: Getting Started · Guides · API Reference · Glossary · Architecture · Community · and 1 more

## Add Next.js Docs to Your AI Assistant

Select your tool to see how to add Next.js's llms.txt as a documentation source.

Cursor

 Windsurf

 Claude Code

 ChatGPT

 Zed

 Copilot

1. 1

   Open any chat or composer panel
2. 2

   Type @Docs and select "Add new doc"
3. 3

   Paste the URL: https://nextjs.org/llms.txt
4. 4

   Wait for the green dot (indexing complete)
5. 5

   Reference @Docs in chat when asking about Next.js

Cursor crawls the URL and indexes all subpages. Add a trailing slash to index child pages too.

## Spec Compliance 2 notes

## Frequently Asked Questions

Where is Next.js's llms.txt file?

Next.js publishes its llms.txt at https://nextjs.org/llms.txt. This file provides a structured, markdown-formatted index of Next.js's documentation that AI systems can consume to understand the project's APIs, guides, and references.

How do I use Next.js's llms.txt with AI coding assistants?

Copy the llms.txt content and paste it into your AI assistant (Cursor, Windsurf, Claude, ChatGPT) as context. This gives the AI an accurate map of Next.js's documentation so it can provide better code suggestions and answers about Next.js.

What does Next.js's llms.txt contain?

Next.js's llms.txt contains 7 sections and 88 documentation links in 41.3 KB (~10.6k tokens). Key sections include Getting Started, Guides, API Reference, Glossary, Architecture, Community.

How many tokens does Next.js's llms.txt use?

The concise llms.txt index is approximately 10.6k tokens (41.3 KB). Most AI assistants can fit this within their context window. For the full expanded documentation, look for an llms-full.txt variant which embeds all content inline.

What is Next.js?

The React Framework for the Web. Next.js's llms.txt file helps AI systems understand this by providing a structured overview of its documentation, making it easier for developers to get accurate AI-assisted help when working with Next.js.

Can I generate an llms.txt for my own project?

Yes. Use the free llms.txt generator at mdream.dev/tools/llms-txt/generator to crawl your site and produce a spec-compliant llms.txt file. You can also validate existing files with the llms.txt validator.

## Browse More llms.txt Files

[SvelteKit Web development, streamlined](https://mdream.dev/llms-txt/nextjs/llms-txt/sveltekit) [Nuxt The Intuitive Vue Framework](https://mdream.dev/llms-txt/nextjs/llms-txt/nuxt) [Astro The web framework for content-driven websites](https://mdream.dev/llms-txt/nextjs/llms-txt/astro) [Vue.js The Progressive JavaScript Framework](https://mdream.dev/llms-txt/nextjs/llms-txt/vue) [SolidJS Simple and performant reactivity for building user interfaces](https://mdream.dev/llms-txt/nextjs/llms-txt/solidjs) [Qt Documentation Comprehensive documentation for Qt and related products. Each product](https://mdream.dev/llms-txt/nextjs/llms-txt/qt-documentation) [Analog The fullstack Angular meta-framework](https://mdream.dev/llms-txt/nextjs/llms-txt/analog) [Taleshape Documentation](https://mdream.dev/llms-txt/nextjs/llms-txt/taleshape-documentation)

[View all 99 projects ](https://mdream.dev/llms-txt/nextjs/llms-txt)

## Related Tools

[<h3>llms.txt Generator</h3>Generate an llms.txt for your own project.](https://mdream.dev/llms-txt/nextjs/tools/llms-txt/generator) [<h3>llms.txt Validator</h3>Validate your llms.txt against the official spec.](https://mdream.dev/llms-txt/nextjs/tools/llms-txt/validator)

© 2026 [Harlan Wilton](https://github.com/harlan-zw) · [MIT](https://github.com/harlan-zw/mdream/blob/main/license)

[GitHub](https://github.com/harlan-zw/mdream) [Discord](https://discord.com/invite/275MBUBvgP)