Pricing update: Free users

Next.JS Content Management System


Sanity is an open-source, API-based CMS that pairs perfectly with Next.js.

Be on the cutting edge of JavaScript across front and back end. Write serverless calls to the Sanity API in Next.js and connect your app to a performant, extensible CMS in only a few lines of code.

It's the fastest, most developer-friendly way to build and ship digital content.

npm install -g @sanity/clisanity init
  • One stack, all React

    Like Next.js, Sanity is written in React. Have happy, productive developers work in one framework across your product.

  • Powerful APIs at your fingertips

    Pair the most popular React framework with the most powerful and flexible API of any headless CMS. Query documents with GraphQL and GROQ when you build your pages; make them interactive with the ease of Next.js's serverless API.

  • Take it worldwide

    Both Next.js and Sanity contain in-built support for internationalization, allowing your content to go global faster and more easily than ever before.

Fully configured templates - deploy in 5 minutes

Worry about writing code after you're already up and running.

With Sanity's Next.js starters, you can deploy a full-stack, best practices content app in a few short clicks. Create an interactive blog with comments, an ecommerce site with Shopify, a fully-featured video conferencing platform, and much more.

Next.js e-commerce
A fully customizable e-commerce site with a simple Next.js front-end.
Next.js Blog with Comments
A blog site with posts and comments stored together for management
HULL - Headless Shopify starter built on Next.js

Or get started using the CLI

Prefer the CLI? Deploy an instance of Sanity studio (npm install -g @sanity/cli && sanity init), create a Next.js app, and begin fetching data for static site generation in a tiny amount of code. Iterate on blazing fast content at record speed.

Combine Next.js's getStaticProps() with Sanity's native JavaScript client and connect your front end to a user-friendly, fully-featured CMS in the time it takes to make coffee.

const sanityClient = require("@sanity/client");
export const client = sanityClient({
  projectId: process.env.NEXT_PUBLIC_SANITY_ID,
  dataset: "production",
  useCdn: true,
export default function Home({ post }) {
  return (

export async function getStaticProps({ params }) {
  //use Sanity's home-grown query language GROQ to build anything you can imagine
  const post = await client.fetch('*[_type == "post"][0]');

  return {
    props: {

That's all the code you need. Seriously.

Best in class developer and user experience

Give everyone on your team something to celebrate. Next.js puts the essentials of modern React development at your fingertips. With Sanity, get a back end that can keep up with it, and enjoy a performant, user-friendly CMS with the extensibility of a managed database.

Live previews

With your own repo, studio, and front end published, wire up Next.js and Sanity's real-time serverless previews and see exactly what your content looks like before it's published.

CDNs everywhere

Pair Next.js's Vercel with Sanity's edge-cached global CDN and deliver content at lightspeed across your stack. From incrementally publishing changes on your front end, to deploying changes to a customized React studio, do everything at the speed of modern web development.

The biggest communities with the most tools

Take advantage of a React stack that's well-loved the world over.

Visit Sanity Exchange to find guides, starters, plugins, snippets, and themes to easily customize your workflow with Next.

Ever add user auth across your React app with a plugin? Wouldn't it be nice to deploy to Vercel straight from your CMS? The community has written plentiful guides, from styling your site to integrating it with third party APIs.

"@sanity_io with next.js. I don't think there is a more flexible CMS out there."

A dream stack for beginner and advanced devs alike

There's no better stack to learn the basics of modern JAMstack development. Next abstracts the hardest bits of front end app dev, while still leaving you full freedom. Sanity removes the headaches of devops, self-hosting, and rigid content models and gives you total creative control.

Learn more with our own FreeCodeCamp tutorial!

Developers love working with Sanity:

  • “’s just SO easy. I made both the site and CMS in about half a day total. Modeled the ThemeUI and content schema in GraphQL SDL, wrote the custom bits for the editor in React, and barely had to anything on the Gatsby side. I don’t know how the DX could be much better!?”


  • “I’m loving Sanity. Tried several others SaaS CMS providers and didn’t find any that offered the level of data modeling that Sanity provides.  On top of that - with Sanity your content editor is a react app that you can fully customize.”


  • “The CMS is made with react and it’s open source so you can extend/tweak it unlike competitors like Contentful. Content modeling is flexible and powerful. It has a generous free tier and after that you pay only what extra you need.“


Powering exceptional digital experiences everywhere

National GeographicNetlifyNikeFigmaSonosFlexMovemberreMarkableCondé NastCloudflareBrex

Build a Next.JS CMS

Generous quota included. Pay-as-you-go for users, usage and features on all plans. Host a DIY studio for free, or serve enterprise content with confidence.