Next.js App Router vs Pages Router: What to Choose
Next.js has two routing systems today: the original Pages Router and the newer App Router built on React Server Components. If you're starting a new project, or deciding whether to migrate an existing one, here's how they actually differ in practice.
File Structure
Pages Router: each file in pages/ is a route.
pages/
index.tsx -> /
about.tsx -> /about
blog/[slug].tsx -> /blog/:slug
App Router: routes are folders in app/, and each folder needs a page.tsx to actually be routable:
app/
page.tsx -> /
about/page.tsx -> /about
blog/[slug]/page.tsx -> /blog/:slug
Server Components by Default
In the App Router, every component is a Server Component unless you add "use client" at the top of the file. Server Components render on the server and send no JavaScript for that component to the browser, which is a meaningful win for anything that doesn't need interactivity (most of a typical page: layout, static content, data display).
// app/blog/[slug]/page.tsx — runs on the server
export default async function BlogPost({ params }) {
const post = await getPost(params.slug);
return <article>{post.title}</article>;
}
The Pages Router doesn't have this distinction — every component ships to the client, and data fetching happens through getServerSideProps/getStaticProps functions exported alongside the page.
Data Fetching
Pages Router: special exported functions per page.
export async function getServerSideProps() {
const data = await fetchData();
return { props: { data } };
}
App Router: fetch directly inside async Server Components, with Next.js extending the native fetch to support caching and revalidation:
const res = await fetch(url, { next: { revalidate: 60 } });
Layouts
The App Router has built-in nested layouts that persist across navigations without re-rendering (layout.tsx), which the Pages Router has to approximate manually with a custom _app.tsx and component composition.
When to Stick With Pages Router
- A large existing codebase where migrating isn't worth the churn right now.
- Libraries or patterns in your stack that assume the Pages Router's data-fetching model.
When to Use App Router
- New projects — it's where Next.js development is headed, with first-class streaming, Server Components, and nested layouts.
- Apps with a lot of static or server-rendered content where shipping less client JavaScript matters.
Summary
The App Router isn't strictly "better" in every dimension — it has a steeper learning curve around Server vs. Client Components — but it's the direction the framework is investing in. For new projects, starting there saves a future migration; for existing Pages Router apps that work fine, there's no urgency to rewrite.
