Skip to content

Blog

What is Sanity CMS? How it works, what it costs and when to pick it

Frank Spin9 min read

Sanity is a headless CMS: a hosted database for your content (the Content Lake) plus an editing app (Sanity Studio) that you configure in code. You describe your content types in TypeScript, editors fill them in the Studio, and your website or app fetches the content through an API, usually with Sanity's query language GROQ. Sanity hosts the content; you host the website. The Free plan covers 20 users and 10,000 documents; the paid Growth plan is $15 per user per month (prices checked on sanity.io on 1 December 2026).

We build on Sanity ourselves: the free Verso template, our content models and the UI Pro page builder all run on it. This guide explains the parts, what the free plan really holds (with numbers from Verso's demo site), what you pay once you outgrow it, and when another CMS is the better pick.

How Sanity works#

A traditional CMS such as WordPress stores the content and also draws the pages. Sanity only does the first half. It stores content as JSON documents and hands them to whatever asks: an Astro or Next.js site, a mobile app, an email tool. That split is what "headless" means. It also means there is no theme to install and no page that appears by itself: someone writes the front end.

A Sanity project has three parts.

How the parts of Sanity fit together: editors work in Sanity Studio, which saves documents in the Content Lake that Sanity hosts; your website or app reads them through the API and CDN with GROQ.HOSTED BY SANITYYOU CONFIGUREYOU BUILD AND HOSTSanity StudioEditing app (React, MIT)Content types inTypeScript, in GitEditorsWrite, edit, publishin the StudioContent LakeDocuments as JSONDrafts and historyDatasetsAPI and CDNGROQ, GraphQLImage URLsYour websiteAstro, Next.js or anyframework: you writethe pagesOther channelsAn app, a newsletter,a search indexsavesquery with GROQat build or per visit
The three parts of a Sanity project. Sanity hosts the Content Lake and its APIs; you configure the Studio in code and build the site that reads from it.
  • The Content Lake is the database, run by Sanity in its own cloud. Each project has one or more datasets (for example production and staging). You cannot host the Content Lake yourself.
  • Sanity Studio is the editing app. It is a React application, open source under the MIT licence (the sanity package, version 6.25 on npm on 1 December 2026). You define the content types and the Studio builds the forms from them. You can host it yourself or run sanity deploy to publish it on a *.sanity.studio address; deploying Sanity Studio compares the two.
  • The APIs are how your site reads and writes content: GROQ and GraphQL for queries, a CDN for cached reads, an asset pipeline that resizes and crops images by URL, and listeners for live updates.

Content types are code

In most hosted CMSs you click content types together in a web interface. In Sanity they are TypeScript files in your Studio project, kept in Git with the rest of your code:

import { defineField, defineType } from 'sanity';

export const post = defineType({
  name: 'post',
  type: 'document',
  fields: [
    defineField({ name: 'title', type: 'string', validation: (rule) => rule.required() }),
    defineField({ name: 'slug', type: 'slug', options: { source: 'title' } }),
    defineField({ name: 'publishedAt', type: 'datetime' }),
    defineField({ name: 'body', type: 'array', of: [{ type: 'block' }, { type: 'image' }] }),
  ],
});

That is the whole definition of a blog post: the Studio shows a form with these four fields, validates the title and makes the slug from it. A change to a content type is a code change, reviewed and deployed like any other. For developers that is the main reason to choose Sanity; for a team without a developer it is the main reason not to.

Rich text is stored as Portable Text, an open JSON format, not as HTML. The site decides how each paragraph, link or embedded image is drawn, which is why the same text can go to a web page and an app.

GROQ, the query language

GROQ (Graph-Relational Object Queries) is Sanity's own query language, with an open specification. One query filters, follows references and shapes the result, so the site gets exactly the fields it needs:

*[_type == "post" && defined(slug.current)] | order(publishedAt desc)[0...10]{
  title,
  "slug": slug.current,
  publishedAt,
  "author": author->name
}

The last ten posts, newest first, with the author's name pulled from the referenced author document. Sanity's TypeGen reads your schema and your queries and writes TypeScript types for the results. Our page builder tutorial uses GROQ and TypeGen for a whole page of sections.

What editors get

The Studio is real-time: two people can edit the same document and see each other's changes as they type. It has drafts and publishing, document history, and the Presentation tool: the live page beside the form, where clicking a heading on the page opens its field. Paid plans add comments, tasks and scheduled drafts; the Free plan has none of those three.

Sanity Studio's Presentation tool: the live page on the left and, on the right, the form of the hero section whose heading was clicked, with field hints and warnings.
The Presentation tool in Sanity Studio, from our UI Pro page builder: click the heading on the page (left) and its field opens in the form (right). The hints under each field and the warning icons come from the schema.

What the Free plan holds#

The Free plan costs nothing and has no time limit. These are its limits, from Sanity's pricing page and technical limits documentation on 1 December 2026:

LimitFreeGrowth
Price$0$15 per user per month, billed monthly
Users20 (no more)Up to 50
Roles2 (Administrator, Viewer)5 (adds Editor, Developer, Contributor)
Datasets2, public only2, public or private
Documents10,00025,000
Unique attributes per dataset2,00010,000
API CDN requests1 million a month1 million a month
API requests (not cached)250,000 a month250,000 a month
Bandwidth100 GB a month100 GB a month
Assets100 GB100 GB
Over the limitNot possiblePaid per unit, except documents

Two numbers decide whether a site fits.

Documents. Every page, post, author and settings document counts once. A draft of a published document counts as a second document, and each version in a content release counts too. Uploaded images and files do not: they use the asset quota. Sections of a page builder are objects inside the page, so a page with twelve sections is still one document. Verso's demo site, a marketing site with five pages, four blog posts and a settings document, is 10 documents and 12 images. A company site with a few hundred pages and a blog uses a few percent of the 10,000.

Unique attributes. This limit is less known. Sanity counts every distinct field path and data type across the dataset: sections[].heading as a string is one attribute, the same path as a number would be a second. Every section type adds its own fields. By our count of field paths and types in Verso's demo content, its five pages with 16 different section types, the posts and the settings come to about 220 attributes, roughly a tenth of the Free plan's 2,000. A page builder with a hundred section types and many layout options can reach the limit long before the document limit.

At the document limit the Free plan does not charge you: it stops. Nobody can create a new document, including a new draft, until you delete content or upgrade. The Free plan has no paid overages for requests or bandwidth either. A static site that fetches its content at build time makes few requests; a site that queries Sanity on every visit should use the CDN API: on Free, once the monthly request or bandwidth quota is used up, further requests fail and the site's content stops loading until the quota resets or you upgrade (the Studio keeps working).

What Sanity costs when you outgrow Free#

Growth is $15 per user per month. A team of four editors and one developer pays $75 a month. There is no annual discount on self-serve plans; annual billing is for Enterprise only. Growth adds the Editor, Developer and Contributor roles, private datasets, comments, tasks and scheduled drafts (content releases are a separate add-on), and lets you pay for usage over the included amounts instead of being stopped:

  • API CDN requests: $1 per 250,000
  • API requests: $1 per 25,000
  • Bandwidth: $0.30 per GB
  • Assets: $0.50 per GB
  • Increased quota add-on: $299 a month, which raises Growth to 50,000 documents in total (and 5 million CDN requests, 1 million API requests, 500 GB of bandwidth and assets)
  • An extra dataset: $999 a month each (up to 2)

Documents are the exception: Growth also stops at 25,000 unless you buy the add-on. Enterprise has custom pricing and adds SAML single sign-on, custom roles, an uptime SLA and higher limits (1,000,000 documents or more).

Review sites list Sanity's prices with old plan names and old numbers. The only reliable source is sanity.io/pricing; check it before you plan a budget, as we did for this table.

When Sanity is a good pick, and when it isn't#

Sanity suits you when:

  • a developer builds and maintains the site, and you want content types in code and Git;
  • the same content goes to more than one place (a site in two frameworks, an app, a newsletter);
  • editors need to work on the same documents at the same time, or want the page beside the form while they edit;
  • you want a static site that rebuilds when content changes, with no database of your own to run.

Building with Astro? Which CMS for Astro compares Sanity with nine other options, including the Git-based ones.

Look elsewhere when:

  • nobody on the team writes code: with Sanity, a new field or a new kind of page needs a developer. WordPress, Webflow or a site builder lets editors do that themselves;
  • the content must stay on your own servers. The Studio is open source, but the Content Lake is only available as Sanity's hosted service. Payload and Strapi are open-source CMSs you can host yourself;
  • you need more than 2 datasets or 25,000 documents but not an Enterprise contract: the add-ons ($299 a month for 50,000 documents in total, $999 a month per extra dataset) add up quickly;
  • you want a finished site, not a content store. Sanity ships no themes and no front end; templates such as Verso fill that gap but are still code you deploy.

Start a Sanity project#

One command creates a Studio, a project and a dataset on the Free plan, after you sign in:

npm create sanity@latest

The command asks for a project name, a dataset and a template. If your site then reports a CORS error when it calls the API, add its address as a CORS origin; fixing Sanity CORS errors shows where. To start with a finished site instead of an empty Studio, pass a template; this one sets up Verso, a marketing site with a page builder for Astro:

npm create sanity@latest -- --template themesdev/verso-astro

From there, three of our guides cover the next steps: the Sanity page builder tutorial (sections, GROQ, TypeGen, Astro and React), the free content models for things that appear on many pages (questions, people, testimonials, figures), and all our Sanity schemas and templates.

FAQ#

Is Sanity free?

Yes, for up to 20 users and 10,000 documents, with no time limit. The Free plan has 2 public datasets, 1 million API CDN requests and 100 GB of bandwidth a month. When you reach a limit, Sanity blocks new documents or fails further API requests instead of charging you. The paid Growth plan is $15 per user per month.

Is Sanity open source?

The Studio is: the sanity package is MIT-licensed, and you can change it and host it yourself. The Content Lake, where the content is stored, is a hosted service and is not open source. GROQ has an open specification.

What is Sanity Studio?

The editing app of Sanity. It is a React application that builds its forms from the content types you define in TypeScript. You can host it with your site or publish it with sanity deploy on a *.sanity.studio address.

Is Sanity a headless CMS?

Yes. Sanity stores content and serves it through APIs; it does not draw web pages. Your site, built with Astro, Next.js or anything else that can make an HTTP request, fetches the content and renders it.

Do drafts count toward Sanity's document limit?

Yes. A draft is stored as a separate document from the published version, so a published document with unpublished changes counts twice. Uploaded images and files do not count as documents; they use the asset quota.

What is GROQ?

Sanity's query language. A GROQ query selects documents, follows references to other documents and returns only the fields you ask for, in the shape you ask for. Sanity also offers a GraphQL API, but most Sanity projects and templates use GROQ.

Built on Tailwind CSS v4

1750 finished blocks on shadcn/ui, React and Astro

UI Pro, from €199

Build it with

Preview

Open the page
In UI Pro: get it, €199 once

With every block and theme. 400+ buyers since 2020. Plans

UI Pro

Build your next site from finished blocks

Every block, page template and website theme from €199, paid once, with every update and everything we add later. Not ready? The free blocks are open to everyone.

blocks
1750
page templates
55
website themes
33
The Case study page template from UI Pro, built from its blocks.

This page is built from UI Pro blocks: Zandloper (article-14), Rooilijn (call-to-action-07).