Short answer: Next.js needs a server only for some features. If you use them, deploy to Vercel Hobby or Netlify Free, which both run the whole framework. If you don't, export the site as static files and host them anywhere: Cloudflare Pages, GitHub Pages or Snapy.
- First, does your site need a server?
- The five free options compared
- Option 1: Vercel Hobby (full Next.js)
- Option 2: Netlify Free (full Next.js)
- Option 3: Cloudflare Pages (static export)
- Option 4: GitHub Pages (static export)
- Option 5: Snapy (static export, no Git)
- The static export config
- When a static build fails
- Sharing the build with a client before it is live
First, does your site need a server?
Next.js can build every page ahead of time and hand you a folder of plain files. That is a static export, and it works for marketing sites, docs, blogs and portfolios.
According to the Next.js static export guide
(version 16.4), these do not work in a static export: dynamic routes without
generateStaticParams(), route handlers that read the request, cookies, rewrites,
redirects, headers, proxy (the new name for middleware), Incremental Static Regeneration,
image optimization with the default loader, draft mode, server actions and intercepting
routes.
If your app uses any of them, skip to Vercel or Netlify. If not, every option below works.
The five free options compared
| Host | Runs server features | Free allowance | Catch |
|---|---|---|---|
| Vercel Hobby | Yes | 100 GB transfer, 1M function invocations, 100 deploys a day | Non-commercial, personal use only |
| Netlify Free | Yes | 300 credits a month | Over the limit, every project on the account pauses |
| Cloudflare Pages | No, static export | 500 builds a month, 20,000 files, 25 MiB a file | Full-stack Next.js is pointed at Workers instead |
| GitHub Pages | No, static export | 1 GB site, 100 GB a month bandwidth (soft) | Public repo on GitHub Free; no business or SaaS sites |
| Snapy | No, static export | 1 zip of up to 400 files and 150MB unzipped | 20 live links on the free plan; needs trailingSlash: true |
Each row is read from the vendor's own page on 7 October 2026. Free tiers change often, so check the linked page before you commit.
Option 1: Vercel Hobby (full Next.js)
Vercel makes Next.js, so everything works with no configuration. Import the Git repository at vercel.com, accept the detected settings, and every push deploys.
From Vercel's Hobby plan page: the plan is free and includes 100 GB of fast data transfer, 1,000,000 function invocations, 5,000 image transformations and 100 deployments a day. Two catches. The fair use guidelines restrict Hobby to non-commercial, personal use, so a client or company site belongs on Pro. And there is no overage billing on Hobby: if you exceed a limit, you usually wait 30 days to use that feature again.
Option 2: Netlify Free (full Next.js)
Netlify's Next.js docs say it supports the App Router, server rendering, ISR and middleware through its OpenNext adapter, with no configuration. Connect the repository and deploy.
The free plan is credit-based: 300 credits a month. From Netlify's pricing page, a production deploy costs 15 credits, bandwidth 20 credits per GB, web requests 2 credits per 10,000 and compute 10 credits per GB-hour. So 300 credits is, for example, 10 deploys (150) plus 5 GB of traffic (100) plus 250,000 requests (50). Netlify's FAQ says that when a site reaches its monthly limit it pauses until the next cycle, and if one project exceeds its limits, all projects on the account are paused. The free plan never charges you.
Option 3: Cloudflare Pages (static export)
Cloudflare's own Next.js page now recommends its vinext tool on Workers for full-stack Next.js, and Pages for a static export. For the static route, follow Cloudflare's static Next.js guide:
- Push the project, with
output: 'export', to a GitHub repository. - In the Cloudflare dashboard go to Workers & Pages, Create application, the Pages tab, then Import an existing Git repository.
- Choose the Next.js (Static HTML Export) preset: build command
npx next build, build directoryout. - Deploy. The site lands on a
*.pages.devaddress.
Free plan limits: 500 builds a month, one build at a time, 20 minutes per build, up to 20,000 files per site and 25 MiB per file.
Option 4: GitHub Pages (static export)
GitHub ships a Next.js workflow. In the repository, open Settings, Pages, set the
source to GitHub Actions and pick the Next.js workflow. It builds with next build,
uploads ./out, and runs actions/configure-pages with static_site_generator: next,
which injects the basePath a project site needs (it lives at
username.github.io/repo-name, not at the root).
GitHub's limits: published sites up to 1 GB, a soft bandwidth limit of 100 GB a month, a 10-minute deploy timeout, and a soft limit of 10 builds an hour when you do not use a custom Actions workflow. On GitHub Free the repository has to be public. And GitHub says Pages is not for running an online business, an e-commerce site or SaaS.
Option 5: Snapy (static export, no Git)
Snapy hosts a zipped static site, so there is no repository and no build server: you build on your own machine and upload the result.
- In
next.config.js, setoutput: 'export',trailingSlash: trueand, if you use<Image>,images: { unoptimized: true }(config below). - Run
npx next build. - Zip the contents of the
outfolder, soindex.htmlsits at the top of the zip. If everything is inside one wrapper folder, Snapy strips that folder for you. - Drop the zip on free HTML hosting, choose a name such as
launchto getlaunch.snapy.page, and confirm your email with the code Snapy sends. Hosting a page needs a free account with a confirmed email.
Why trailingSlash: true: by default Next.js writes /about as about.html, and Snapy
serves /about from about/index.html. With the option on, Next.js writes exactly that.
The limits, from Snapy's own upload rules: a zip can hold 400 files and 150MB
unzipped, the free plan has 20 live links at a time and 1 GB of storage, and every
hosted page is sent with noindex until you switch on "findable in search" for that link.
There is no fallback to index.html for unknown paths, so client-only routes that have no
HTML file of their own return a 404 when opened directly. Next.js pages built from your
app folder each get their own file, so they are fine. A custom domain is part of Snapy Pro.
A static export from Next.js 16 writes several small files per page, so a site with a few hundred pages can pass the 400-file cap. Cloudflare Pages or GitHub Pages suit those better.
The static export config
/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'export',
trailingSlash: true, // writes about/index.html instead of about.html
images: { unoptimized: true } // the default image loader needs a server
};
module.exports = nextConfig;
Instead of unoptimized, the Next.js docs also allow a custom image loader that points at
an image service. For dynamic routes, export generateStaticParams() from the page and
return every value to build:
export function generateStaticParams() {
return [{ slug: 'hello-world' }, { slug: 'second-post' }];
}
When a static build fails
- A dynamic route has no params: add
generateStaticParams(), and do not setdynamicParams: trueon that route. - Image errors: add
images: { unoptimized: true }or a custom loader. - cookies(), headers(), redirects, rewrites, a server action or proxy in use: these need a server. Remove them or use Vercel or Netlify.
- A route handler you want to keep: a
GEThandler can be prerendered if you addexport const dynamic = 'force-static'and it does not read the request.
Sharing the build with a client before it is live
If the point of deploying is to show someone your work, a link to a running site is not always what they need. Snapy can also turn a PDF of the design, or a screenshot, into a link that opens in any browser, and its free plan emails you the first time it is opened. See turning a PDF into a link or image to link.