Astro vs Next.js is the question almost everyone asks when they start a new website with modern JavaScript tooling. Both frameworks turn components into HTML, both support static pages and server rendering, both have a large community. And yet they are built for very different jobs.
The short answer: Astro is a framework for content, Next.js is a framework for applications. Astro ships no JavaScript to the browser by default and only loads code where you explicitly ask for it. Next.js is built on React and always ships the React runtime, even on pages that only show text. For a blog, a company site or documentation, Astro is usually the better choice. For a dashboard, a logged-in area or an app with lots of interaction, Next.js is stronger.
We have an opinion on this because this very site, getmind.io, runs on Astro, while several of our Next.js applications run on the same server. To back that up with more than experience, on October 15, 2026 we built a fair test: the same blog with 200 posts, once in Astro 7.3.8 and once in Next.js 16.4.1 (released the day before), both as a static export, both on the same server running Node.js 22. Three results up front:
1. An Astro post page contained zero scripts. The same page from Next.js loaded six scripts totalling 569 KB of JavaScript (174 KB compressed).
2. In Lighthouse (mobile), the largest element appeared after 0.75 seconds with Astro and after 1.4 to 1.9 seconds with Next.js. Both still scored 100.
3. Astro built faster (2.1 vs 3.8 seconds) and needed half the memory (356 vs 766 MB).

Astro vs Next.js: The Fundamental Difference
To understand why the two produce such different numbers, you need to know where they come from.
What is Next.js?
Next.js is a React framework developed by Vercel. It came out in 2016 and solved a real problem at the time: plain React apps were assembled entirely in the browser, so search engines and users first saw an empty page. Next.js renders React components ahead of time, on the server or at build time, and sends finished HTML. React then takes over the page in the browser (this is called hydration), and from there everything behaves like a single-page app: page changes without a full reload, state is preserved, forms react instantly.
Today Next.js uses the App Router with React Server Components. Components can run only on the server and then send no JavaScript of their own to the browser, which has cut the amount of code considerably. What always remains is the React runtime, the Next.js router and a data package (the RSC payload) the browser uses to reconstruct the page. More on that in our test.
Next.js can generate static pages (SSG), render pages on the server per request (SSR), regenerate static pages in the background (ISR), and has built-in Server Actions and Route Handlers, meaning backend code lives right inside the project. It is a full-stack framework.
What is Astro?
Astro appeared in 2021 and took the opposite approach. An Astro page is plain HTML first. Components are rendered at build time (or on the server), and their JavaScript is thrown away afterwards. If a page does need something interactive, say an image slider, a search box or a calculator, you mark exactly that component as an island. Only that island gets JavaScript; the rest of the page stays static.
The twist: islands can be written in React, Vue, Svelte, Solid or Preact, even mixed within one project. Astro itself isn’t tied to any UI framework. Content is typically written in Markdown or MDX, and Content Collections let Astro validate at build time that every post has the fields it needs.
Astro now does server rendering too, with Server Islands, Actions and middleware. In January 2026, Cloudflare acquired the company behind Astro. The framework remains open source under the MIT license. That means both frameworks now have a big hosting company behind them: Next.js has Vercel, Astro has Cloudflare.
The difference in one sentence
Next.js assumes your site is an application and makes exceptions for static content. Astro assumes your site is a document and makes exceptions for interactivity.
The differences at a glance
| Criterion | Astro | Next.js |
|---|---|---|
| Core idea | content, HTML first | applications, React first |
| JavaScript in the browser | none by default | always React runtime + router |
| UI frameworks | React, Vue, Svelte, Solid, Preact, none | React only |
| Rendering | static, server, Server Islands | static, server, ISR, streaming |
| Navigation | normal page loads (optional View Transitions) | client-side navigation without reload |
| Backend in the project | endpoints, Actions | Route Handlers, Server Actions |
| Markdown/MDX | built in, with schema validation | via extra packages |
| Backed by | Cloudflare (since January 2026) | Vercel |
| Learning curve | gentle, close to HTML | steeper (React, server/client boundary, caching) |
| Typical projects | blogs, docs, marketing, portfolios | SaaS, dashboards, shops, portals |
Our Test Setup
A fair comparison needs identical conditions, so we kept both projects as bare as possible: no styling, no extras.
- Content: 200 Markdown files with frontmatter (title, date), each around 1,000 words of filler text with one subheading. 1.6 MB in total, generated from a fixed random seed so both projects contain exactly the same text.
- Pages: a home page listing all posts, and one post page per Markdown file.
- Astro 7.3.8: a Content Collection with the
globloader and a schema, pages as.astrofiles, no integrations. - Next.js 16.4.1: App Router,
generateStaticParams, Markdown read withgray-matterandmarked,output: 'export'for a purely static export. For the server test, also built without export and run withnext start. - Server: our own Linux server with 12 cores, Node.js 22.23. Every measurement was repeated; we report ranges, not single values.
- Tools: GNU
timefor build duration and memory, Lighthouse 13.4.1 (mobile, simulated throttling, headless Chrome), autocannon 8 for load.
For context: both projects do the same thing, but Next.js needs two extra packages for Markdown that Astro has built in. That’s not a trick, it’s exactly how you would normally build a Markdown blog in Next.js.
Test 1: Installation and Dependencies
Before building anything, it’s worth looking at node_modules.
| Astro | Next.js | |
|---|---|---|
npm install | 9.99 s | 7.13 s |
node_modules size | 158 MB | 354 MB |
| Files | 9,416 | 10,494 |
| Packages in tree | 192 | 36 |
The result is mixed. Next.js installs faster and has far fewer individual packages, because Vercel bundles almost everything into the next package, including the compiler as a precompiled binary. In exchange, the folder is more than twice as large. Astro pulls in many small packages from the ecosystem (Vite, Rollup, unified/remark, Shiki).
In day-to-day work this rarely matters. It does matter when you build many projects on one server or in CI pipelines. Fewer packages means a smaller supply-chain attack surface; more megabytes means slower Docker builds. Call it a draw.
Test 2: Build Time and Memory
We ran every build three times from scratch (cache folders deleted).
| Astro 7.3.8 | Next.js 16.4.1 (export) | |
|---|---|---|
| Build duration | 2.12 to 2.50 s | 3.73 to 3.83 s |
| Peak RAM | 355 to 384 MB | 765 to 771 MB |
| Pages generated | 201 | 203 (incl. 404 and _not-found) |

Astro was about 40 percent faster and used half the memory. Memory is the more interesting number: by default Next.js spawns several worker processes for prerendering (“5 workers” in our log), and each one loads React and the Next.js server. On a small VPS with 1 or 2 GB of RAM, that can decide whether a build finishes or gets killed by the kernel. We cover realistic server sizing in What is a VPS?.
For comparison, our real site: getmind.io builds 216 pages in two languages with Astro, including social preview images, a check of all language pairs and a link checker that runs over the finished HTML. At 200 pages, build time is a non-issue for either framework. At 20,000 pages it wouldn’t be.
Test 3: What Actually Reaches the Browser
This is the heart of the comparison. We counted the generated files and looked closely at a single post page.
| Astro | Next.js | |
|---|---|---|
| Total output | 2.4 MB, 201 files | 14 MB, 1,021 files |
| HTML files | 201 | 204 |
| JavaScript files | 0 | 9 |
Extra .txt files | 0 | 808 |
| HTML of one post page | 6,423 bytes (1,316 gzip) | 18,348 bytes (3,129 gzip) |
| Scripts on the post page | 0 | 6 |
| JavaScript per post page | 0 bytes | 569,120 bytes (174,333 gzip) |

The Astro page is an HTML document. That’s it. No script, no framework, no data payload.
The Next.js page contains the same text, plus:
- Three large JavaScript bundles of 230 KB, 186 KB and 113 KB (uncompressed). These are essentially React, React DOM and the Next.js client with its router.
- Three smaller bundles for the Turbopack runtime and the page code.
- The RSC payload, embedded once in the HTML (via
self.__next_f) and again as separate.txtfiles per page. That’s where the 808 text files come from: Next.js writes several variants per page so the client router only needs to fetch data on a click, not the whole HTML.
To avoid a false impression: this JavaScript isn’t useless. It makes navigating between pages faster, because after the first load the browser only fetches small data packets. The large bundles end up in the browser cache and aren’t downloaded again on the second page. For an app where users click around a lot, that’s a real advantage. For a blog post someone reaches from Google, reads and leaves, it’s pure overhead.
And when Astro does need React?
The comparison is only fair if we also measure what Astro costs once interactivity is added. So we added a small “Like” button in React to the Astro post page, as an island with client:visible:
---
import Like from '../../components/Like.jsx';
---
<article><Content /></article>
<Like client:visible />
Result: the page now references two scripts totalling 213 KB (66 KB gzip), essentially React DOM. That’s clearly less than Next.js (174 KB gzip), but no longer zero. And the important difference: with client:visible, the browser only loads that JavaScript once the button scrolls into view. Someone who just skims the start of the article never downloads React. With client:load it would load immediately, with client:idle once the browser has nothing else to do.
The lesson: Astro isn’t magically faster. It just makes “no JavaScript” the default and using it a deliberate decision. In Next.js it’s the other way round.
Test 4: Lighthouse and Core Web Vitals
Now the question users and Google care about: how fast does the page feel? We served both static outputs with the same simple Node server (serve, with gzip) and ran Lighthouse three times each in mobile mode.
| Astro | Next.js | |
|---|---|---|
| Performance score | 100 / 100 / 100 | 100 / 100 / 100 |
| First Contentful Paint | 616 to 622 ms | 618 to 623 ms |
| Largest Contentful Paint | 754 to 766 ms | 1,358 to 1,921 ms |
| Total Blocking Time | 0 ms | 56 to 61 ms |
| Time to Interactive | 754 to 766 ms | 1,916 to 1,921 ms |
| Bytes transferred | 2,816 | 142,925 |
| Requests | 2 | 7 |
Both get a perfect score, and honestly that’s the most important result for anyone who likes Next.js: a statically exported Next.js site is not slow. Text appears just as fast.
But the largest visible element (LCP) showed up two to two and a half times later with Next.js, and the page only became fully interactive after almost two seconds, because the browser first has to download, decompress and execute 140 KB of JavaScript. Lighthouse throttles to a simulated slow mobile network and a 4x slower CPU for this. On a fast laptop on Wi-Fi you won’t notice. On a three-year-old Android phone on a train you will.
Without compression it gets obvious
In our first run we accidentally used a server without gzip (Python’s built-in http.server). That’s not an exotic case; it happens with misconfigured servers more often than you’d think. Result:
| Without compression | Astro | Next.js |
|---|---|---|
| Performance score | 100 / 100 / 100 | 98 / 90 / 90 |
| Largest Contentful Paint | 750 to 754 ms | 2,252 to 3,585 ms |
| Bytes transferred | 7,130 | 476,554 |
Astro barely changes, because there’s hardly anything to transfer. With Next.js, LCP climbs to as much as 3.6 seconds, past the 2.5-second threshold above which Google rates it as “needs improvement”. The less you ship, the less your server configuration can break. How compression and caching through a CDN help is covered in What is a CDN?. You can check your own site with our Core Web Vitals test.
An animated side-by-side from Devsplainers (April 2026). A good visual companion to our numbers, especially the part on islands architecture.
Test 5: Running a Server With next start
Many Next.js projects aren’t deployed as a static export but run with next start as a Node server. That’s required as soon as you use server rendering, ISR, middleware or Server Actions. So we built the same project without output: 'export' and started it with next start. We served the Astro site as static files via serve, also a Node process, so the comparison isn’t skewed against Node.
Load test: autocannon with 32 concurrent connections for 10 seconds, always the same post page.
Astro (static, serve) | Next.js (next start) | |
|---|---|---|
| Requests per second (mean) | 9,000 | 3,349 |
| Mean latency | 3.1 ms | 9.1 ms |
| 97.5th percentile latency | 5 ms | 22 ms |
| Server process RAM | approx. 145 MB | approx. 191 MB |
Next.js still handles thousands of requests per second, which is enough for nearly any website. But the same server delivers almost three times as many requests with static files. And in practice you wouldn’t serve an Astro site through Node at all, but directly from the web server. getmind.io is a folder of HTML files behind Caddy, without a single running Node process. A post responds live with a time to first byte of 47 ms. Why we use Caddy is explained in Caddy vs Nginx.
We also checked memory for the five Next.js applications running on the same server: 117 to 188 MB per process, permanently, even when nobody is visiting. That’s not a problem, but it is a difference from a static site, which uses nothing at all when idle.
A real-world mistake we made ourselves while testing
During this test we tried to stop our test servers with pkill -f "next-server". The command didn’t just stop the test processes; it killed all five production Next.js services on the server, because they all share the same process name. systemd restarted them within 5 to 10 seconds, because the services run with Restart=always. Without that setting, those sites would have stayed down.
Two lessons, both directly relevant to this comparison. First: a Next.js server is a running process, and running processes can be killed. You can’t “accidentally stop” a static Astro site. Second: if you run Node processes on a shared server, stop test processes by process group or PID, never by a name pattern. And every production service belongs under systemd with automatic restarts. Our guide on creating a systemd service shows how.
Test 6: Development Server
What does daily work feel like? We started both dev servers with an empty cache and measured when the first post page responded and how quickly a second page followed.
Astro (astro dev) | Next.js (next dev, Turbopack) | |
|---|---|---|
| First page after start | 2.6 to 2.9 s | 2.6 s |
| Second page | 14 to 15 ms | 86 to 88 ms |
| RAM (all processes) | approx. 500 MB | approx. 750 MB |
On startup they’re neck and neck; Turbopack has made Next.js much faster here than the old Webpack days. After that, Astro serves further pages faster because it doesn’t need to build client bundles per route. In practice, 90 milliseconds isn’t noticeable. The higher memory use can be on weaker laptops.
Where Next.js Clearly Wins
After this many numbers in Astro’s favour, it would be dishonest to downplay Next.js’s strengths. There are projects where we pick Next.js without hesitation, and we do.
Applications with lots of state. A shop back office, an admin area, a dashboard with filters, tables and live data. Almost every component is interactive. Astro islands would cover the whole page, and then you’re better off with a React framework built for exactly that.
Client-side navigation. Next.js switches pages without reloading the browser. An open menu, a playing video, the contents of a cart all persist. Astro can do smooth transitions with View Transitions, but component state is lost without extra work.
Backend in the same project. With Server Actions you write a function that runs on the server and call it straight from a form. Authentication, database access, payments: the Next.js ecosystem has ready-made, well-documented libraries for all of it (Auth.js, Prisma/Drizzle, Stripe examples). Astro has Actions and endpoints, but the choice of ready-made solutions is smaller.
Teams and hiring. Next.js is the most widely used React framework. If you’re hiring, finding someone for Next.js is much easier. A team with React experience is productive in Next.js from day one.
Dynamic routes at scale. For sites with millions of possible URLs, such as product pages rendered on demand and then cached, ISR is very handy. We cover how Next.js resolves dynamic URLs in detail in Next.js Dynamic Routes.
Where Astro Clearly Wins
Content sites. Blogs, magazines, documentation, company sites, landing pages, portfolios. Anything people mostly read. There’s no technical reason to ship a JavaScript framework to the browser here, and Astro doesn’t.
Markdown and MDX. Content Collections check at build time that every post has a title, a date and a category. If something is missing, the build fails with a clear message. On getmind.io we use this for 170 posts in two languages. A mistyped date or an unknown category never goes live.
Running without a server. A static Astro site is a folder. You can put it on any web server, any CDN, any cheap web host. There’s no Node process that can crash, leak memory or need security updates. A vulnerability in React or Next.js doesn’t affect a static Astro site, because no such code exists at runtime.
Freedom of UI framework. You can put a Svelte component next to a React component. That’s handy for migrations, and for teams that don’t want React at all.
Getting started. An .astro file looks like HTML with a script block on top. Anyone who knows HTML and a bit of JavaScript understands it immediately. In Next.js you first need to understand React, then the boundary between server and client components ('use client'), then the caching behaviour. It’s not rocket science, but it’s a steeper curve. If you’re new to web development, we recommend you learn TypeScript first, whichever framework you choose.

Why getmind.io Runs on Astro
We deliberately chose Astro for this site, and after several months in production we’d do it again. A few concrete reasons from daily use:
- Every post is an MDX file. We write in an editor, a build produces HTML, an
rsyncputs it on the server. No database backups, no admin login that needs hardening. - Interactive tools still exist. Our image compressor, the Core Web Vitals test and a TypeScript playground all run on getmind.io. They load their JavaScript only on their own pages. The articles aren’t affected.
- Our own checks in the build. Because the output is just HTML files, we can check them with simple scripts: does every German post have an English counterpart? Does a German post accidentally link to the English version? Is a placeholder left over somewhere? If anything breaks, nothing goes live.
- Attacks hit nothing. In our server logs we see hundreds of requests to
/wp-admin,/.envor/api/every day. On a static site there’s nothing behind them that could answer. They all end in a 404.
We won’t hide what bothered us either: every change needs a build. Fixing a typo “quickly in the browser” isn’t possible. For a non-technical team that would be a real obstacle, and you’d need a CMS in front of it. Your options for that are in our overview of modern WordPress alternatives.
Hosting and Costs
Your framework choice directly affects where and how cheaply you can host.
Astro (static) runs anywhere: on cheap shared hosting, GitHub Pages, Cloudflare Pages, Netlify or your own server behind Nginx or Caddy. Traffic spikes aren’t a problem because only files are served.
Next.js (static export) runs anywhere too, but gives up server features like ISR, middleware, Server Actions, and built-in image optimization via next/image without a custom loader.
Next.js (server) needs an environment that keeps Node.js running: a VPS, a container, or a platform like Vercel. Vercel is the most convenient path since the framework comes from the same company. With lots of traffic or many projects, though, costs can rise quickly. We compared the options in Vercel alternatives. Our own setup: Next.js with next start as a systemd service on our own server, with a reverse proxy in front.
Astro (server) also needs a runtime but has adapters for Node, Cloudflare Workers, Netlify and Vercel. Since the Cloudflare acquisition, the Cloudflare integration is especially tight, but Astro explicitly says all other adapters will continue to be maintained.
Migrating: From Next.js to Astro and Back
Next.js to Astro is surprisingly easy for content sites. With the React integration you can keep using your React components, as islands or rendered purely on the server. Markdown content moves into a Content Collection. The hardest part is usually routes with server logic and anything built on next/router or next/navigation. Important: keep your URLs identical, or set up 301 redirects so you don’t lose your Google rankings.
Astro to Next.js makes sense when a content site turns into an application, for example when a blog suddenly gets user accounts, paid content and a dashboard. Often the cleaner path is to build the application in Next.js and keep the content part in Astro separately, for example on a subdomain. The two frameworks don’t have to compete. Many companies run exactly this combination: marketing site in Astro, product in Next.js.
An in-depth conversation from the agency Pagepro about architecture, performance and choosing per project (December 2024). The versions are older, but the core arguments still hold.
Astro vs Next.js: Making the Call for Your Project

Choose Astro if …
- your site is mostly read (blog, docs, company site, landing page, portfolio),
- load time and Core Web Vitals matter to you, especially for mobile visitors from search,
- you want cheap hosting without a running server,
- your content comes from Markdown or a headless CMS,
- you don’t want to be locked into React.
Choose Next.js if …
- your site is an application, with login, user data, dashboards or lots of interaction,
- navigation without reloads and preserved state matter,
- you want backend logic in the same project (Server Actions, API routes),
- your team knows React or you’re specifically hiring React developers,
- you need to render pages on demand and regenerate them in the background (ISR).
Choose both if … you have a product site with marketing content and a web application. That’s not a workaround; it’s often the cleanest architecture.
Checklist: Astro or Next.js in Five Questions
| Question | Leans Astro | Leans Next.js |
|---|---|---|
| What do visitors mostly do? | read | click, type, manage |
| Are there user accounts? | no | yes |
| How many components are interactive? | a few | nearly all |
| Where should it run? | static host, CDN | Node server, Vercel, container |
| What does the team know? | HTML, some JS | React |
If three or more answers land in one column, you have your decision.
Frequently Asked Questions About Astro vs Next.js
What is the difference between Astro and Next.js?
Astro is a framework for content-driven websites that ships plain HTML without JavaScript by default and only loads interactivity selectively through islands. Next.js is a React framework for web applications that always ships the React runtime and in return offers client-side navigation, Server Actions and flexible server rendering.
Is Astro faster than Next.js?
For content sites, yes. In our test with identical 200 posts, the largest element appeared after 0.75 seconds with Astro and after 1.4 to 1.9 seconds with Next.js (Lighthouse, mobile). Astro transferred 2.8 KB instead of 143 KB. Both still scored 100 in Lighthouse. For highly interactive applications the gap shrinks, because Astro would then have to load a lot of JavaScript too.
Is Astro better than Next.js?
Not in general. For blogs, documentation and company sites Astro is usually the better choice because it’s faster, simpler and cheaper to run. For applications with login, dashboards and lots of state, Next.js is better because it’s built for exactly that and has a larger ecosystem.
Can I use React components in Astro?
Yes. With the official React integration (npx astro add react) you can use React components in Astro pages. Without a directive they’re rendered on the server only and ship no JavaScript. With client:load, client:idle or client:visible they become interactive in the browser. In our test a small React island cost about 66 KB gzip, loaded only when it became visible.
Can Astro do server rendering like Next.js?
Yes. Astro can render pages on the server per request, with adapters for Node.js, Cloudflare, Netlify and Vercel. Server Islands let you drop dynamic sections into otherwise static pages. Next.js-style ISR isn’t built in; you get something similar with cache headers and a CDN.
Is Next.js overkill for a blog?
For a pure blog, usually yes. Next.js works fine for blogs and gets good Lighthouse scores, but it ships the React runtime on every page, which a post doesn’t need to be read. If the blog is part of a larger Next.js application, keeping everything in one project can still make sense.
Is Astro good for SEO?
Yes. Astro ships finished HTML that search engines can read without JavaScript, and it achieves excellent Core Web Vitals. Sitemaps, canonical tags and structured data are easy to add. Next.js is also good for SEO as long as pages are rendered on the server or statically.
Does Cloudflare own Astro now?
The Astro Technology Company, the company behind Astro, was acquired by Cloudflare in January 2026. The framework itself remains open source under the MIT license and continues to run on all platforms. Next.js is developed by Vercel, is also open source and runs without Vercel too.
Which framework is easier to learn?
Astro. An Astro component looks like HTML with a small script block. For Next.js you need to understand React plus the distinction between server and client components, folder-based routing and caching behaviour. If you already know React, though, you’ll find your way around Next.js quickly.
Can I build an online store with Astro?
For small stores with few products and an third-party checkout (such as a Shopify Buy Button or Stripe Checkout), yes. For stores with cart logic, customer accounts and lots of filters, an application framework like Next.js or a dedicated shop system is usually the better fit. A middle ground is a headless store with Astro for product pages and islands for the cart.
Can you combine Astro and Next.js?
Yes, and it’s often a good solution. A typical setup is a marketing site in Astro on the main domain and the actual application in Next.js on a subdomain or a sub-path behind a reverse proxy. Shared React components can be used in both projects.
Conclusion
The Astro vs Next.js comparison gave a clear but not one-sided result in our test. For a 200-post blog, Astro led in every measurement: no JavaScript instead of 174 KB per page, half the time to the largest element, faster builds with half the memory, almost three times the requests per second. At the same time, Next.js reached a perfect Lighthouse score and handled thousands of requests per second. It isn’t a slow framework; it’s built for a different job.
So our advice is simple: don’t ask which framework is better, ask whether you’re building a website or an application. For a website, pick Astro. For an application, pick Next.js. And if you have both, use both. That’s exactly what we do: getmind.io runs on Astro, our applications run on Next.js, on the same server, each with the tool that fits the job.