Headless CMS for Next.js: Sanity vs Contentful vs Payload vs Strapi
A factual comparison of Sanity, Contentful, Payload and Strapi for Next.js sites: hosting, licences, data storage, preview and how to choose.
Sanity, Contentful, Payload and Strapi all work well with Next.js, but they suit different teams. In short: Contentful is a fully hosted platform for organisations that want a managed service; Sanity pairs a hosted content store with an editing studio you customise in code; Payload is an open-source CMS that installs inside your Next.js app; and Strapi is an open-source CMS you run as a separate Node.js service or on Strapi Cloud.
The right choice depends less on features (all four handle structured content, media and APIs) and more on where your content lives, who maintains the system, and how your editors want to preview changes. Here is a factual comparison at the time of writing (November 2026).
The four options side by side
| SanityContentfulPayloadStrapi | ||||
|---|---|---|---|---|
| Hosting model | Hosted Content Lake; Studio is an app you deploy or embed in your site | Hosted platform | Self-hosted, deploy anywhere | Self-hosted on any Node.js host, or Strapi Cloud |
| Licence | Studio is MIT open source; Content Lake is a hosted service | Commercial service | MIT open source | MIT for Community Edition; code in ee/ folders under an enterprise licence |
| Where content is stored | Sanity's Content Lake | Contentful's platform | Your database (MongoDB or Postgres) | Your database (SQLite, PostgreSQL, MySQL or MariaDB) |
| Query style | GROQ | REST and GraphQL APIs | Direct database access from your Next.js code, plus generated APIs | Generated REST and GraphQL APIs |
| Next.js fit | next-sanity package; Studio can run as a route in your app |
Live Preview SDK and Draft Mode guides for the App Router | Installs into your existing /app folder |
Separate back end your Next.js site calls over HTTP |
Pricing models differ (hosted plans, usage tiers, or your own hosting costs) and change often, so compare current plans directly on each vendor's pricing page rather than relying on figures in articles.
Sanity: a hosted store with a studio you shape in code
Sanity keeps content in its hosted, real-time Content Lake, while the editing interface, Sanity Studio, is an MIT-licensed single-page app you configure in code. With the next-sanity package you can mount the Studio as a route inside your Next.js site, so editors log in at something like /studio. Content is queried with GROQ, and the docs show typed queries using defineQuery. Visual Editing connects the Studio to an App Router front end through Draft Mode, so editors can see draft changes on the real page as they edit.
Tends to suit: content-heavy marketing sites that want a tailored editing experience without running a database.
Contentful: a managed platform with established workflows
Contentful is a hosted service. Your Next.js app reads published content through its delivery APIs (REST or GraphQL) and drafts through a preview API that uses a separate access token, which its Draft Mode guide shows how to switch on in Next.js. The Live Preview SDK supports the App Router through a client-side provider, and inspector mode uses Content Source Maps to link page elements back to fields. Contentful's own docs list some limitations for live updates, for example GraphQL filters aren't supported, so check them against your planned queries.
Tends to suit: larger organisations with several sites or teams that want a managed service and don't want to host anything.
Payload: the CMS inside your Next.js app
Payload describes itself as a Next.js native CMS that can install directly in your existing /app folder. You define content in TypeScript config, Payload generates a React admin panel, and your pages can read straight from the database (MongoDB or Postgres) without an HTTP round trip. It is MIT licensed. Payload joined Figma in June 2025, and its announcement states that Payload remains open source.
The trade-off is ownership: you run and back up the database, handle upgrades and secure the admin panel, just as you would for any application.
Tends to suit: developer-led teams who want one codebase, full control of their data, and room to build app-like features alongside content.
Strapi: a self-hosted content API
Strapi 5 runs as its own Node.js service that generates REST and GraphQL APIs for each content type. You can host it on any Node.js host or use Strapi Cloud. Community Edition code is MIT licensed, while features in its ee/ directories fall under an enterprise licence, so check which features you need (its docs list things such as Releases, Review Workflows and Audit Logs) and which plan includes them.
Tends to suit: teams that want an open-source CMS with a familiar admin interface, serving content to several front ends such as a website and a mobile app.
How to choose
- 1 Where must the data live? If you need content in your own database or region, Payload and self-hosted Strapi give you that directly. Sanity and Contentful are hosted services, so check their data processing terms with your legal team.
- 2 Who maintains it? Hosted platforms remove server upkeep. Self-hosted options mean you own updates, backups and security patches, usually under a maintenance plan.
- 3 How do editors want to preview? Ask editors to try each preview flow on a real page. Click-to-edit preview is often what wins internal support.
- 4 How many front ends? One Next.js site favours an embedded option like Payload. Several channels favour a standalone API.
- 5 What does the budget look like over three years? Compare plan costs against hosting and developer time for self-hosting, using current vendor pricing.
Build a small proof of concept (one page type, preview, and a publish-to-live flow) in your top two choices before committing. A day or two of testing often settles it.
Frequently asked questions
Which headless CMS is best for Next.js?
There isn't a single best one. All four integrate well; choose based on hosting, data ownership, editor experience and budget.
Can we switch CMS later?
Yes, but it is a migration project: content models, rich text formats and media all need converting. Keeping CMS queries in one data layer of your Next.js app makes a future switch easier.
Do we need a headless CMS at all?
Not always. For a small marketing site, a visual builder or traditional CMS can be simpler. Our platform comparison covers those options.
Need help choosing or building with a headless CMS?
We build Next.js sites on headless content platforms through our Next.js development service, from content modelling to preview and deployment. For more background, see React vs Next.js and our guide to headless Shopify with Next.js. If you'd like help shortlisting, talk to us.
Sources: Sanity and Next.js (Sanity docs), Sanity on GitHub, Live preview live updates (Contentful docs), Draft Mode with Contentful (Contentful docs), Payload on GitHub, Payload is joining Figma (Payload blog), Strapi 5 documentation, Strapi licence (GitHub)
(over to you)
Planning a build like this?
Tell us what you're building and we'll come back with ideas and next steps.
Keep reading
All articles
React & Next.js
· 8 min read
Back button hijacking: find and fix it before Google does
Read article
React & Next.js
· 8 min read
Chrome Web Install API: adding an install button to your web app
Read article
React & Next.js
· 6 min read
React Compiler in production: how to roll it out safely
Read article
