Back to blog
Opinion

Headless CMS: pay for Sanity or use Decap for free?

By Flávio Emanuel · · 11 min read

In five years of freelancing, I recommended headless CMS to 47 clients. Almost split: 24 Sanity, 23 Decap. None asked to switch after six months. But the story was very different when I chose wrong.

The problem isn’t “which CMS is better”. It’s “which CMS is better for your client, at their scale, with their budget”.

This post is the map I didn’t have when I started.

The big trade-off

Sanity you pay for. Starts with limited free tier (500MB storage, 200k requests/month). Then paid: $99/month ($15 per 1M requests, $7 per 100GB storage).

Decap is free. Totally free. You host in your Git repo (GitHub, GitLab). Only cost if you want premium features: Decap CMS Pro ($20/month per editor), automations, advanced webhooks.

But that simplicity hides complexity. Decap is Git-first. Sanity is API-first.

Sanity: you edit in the panel, click “publish”, the API returns new data. Instant. Normalized structure.

Decap: you edit in the panel, click “save”, it commits to GitHub, triggers workflow, site rebuild. If your site has 500 pages, rebuild takes 3-5 minutes. Your client sees “saved” but the site doesn’t change for a few minutes.

Not small. Not a technical detail. It’s the experience your client has every day.

Feature comparison

FeatureSanityDecapWinner
Base cost$99/month (or free tier)FreeDecap
Simultaneous editorsUnlimited (paid tier)1 editor at a time (free)Sanity
Instant publishYes (API call)No (rebuild required)Sanity
VersioningBuilt-inGit nativeTie
Media library100GB+ (paid)Hosted in repoDecap (no cost)
API richnessVery rich (GROQ)Simple structure (YAML)Sanity
Visual customizationHigh (React components)Medium (Netlify widgets)Sanity
SupportExcellentCommunity (Open Source)Sanity
Scalability1B+ requests/month200-500 pages comfortableSanity
Auto backupsYesYes (Git history)Tie

Simple: Sanity is for when you want professional DX. Decap is for when you don’t want to spend.

Sanity: when it’s worth paying

I used Sanity for:

  1. E-commerce with +200 SKUs (automotive)

    • 4 simultaneous editors updating catalog
    • Needs instant publish (stock changes in real time)
    • Had 15k API requests/day
    • Final cost: $199/month (5M requests tier)
  2. Agency with 8 clients in one Sanity

    • Multitenancy (8 datasets, one per client)
    • Each client has their own editor
    • Sanity handles this natively
    • Cost: $299/month split across 8 clients ($37 per client)
  3. SaaS app with integrated blog

    • Blog is Sanity, app is Next.js
    • Needs webhooks to invalidate cache
    • Needs two access levels (author, editor)
    • Cost: $150/month for this use case

Pattern I see: if you have more than 1 editor, or need real-time publish, or have >50k requests/month, Sanity makes sense.

The math: $99/month = $1188/year. If you charge client $50 more (margin you gain from better DX + less rework), it pays for itself in 2 months.

Decap: when it’s the right choice

I used Decap for:

  1. Static blog of freelancer

    • 30 posts
    • 1 editor (the freelancer themselves)
    • Rebuild per new post = ok (5min)
    • Cost: free
  2. Designer portfolio site

    • 12 projects
    • Updates occasionally
    • Client doesn’t complain about rebuild
    • Images supported in repo (up to 100MB is fine)
    • Cost: free
  3. SaaS landing page

    • Copy and images change, structure doesn’t
    • Fast redeploy (Netlify, 1min)
    • 1 owner/editor
    • Cost: free

Pattern: Decap works well for sites that change rarely, sites with 1-2 editors, and when client doesn’t care about publish delay.

And one case I sometimes forgot: client who wants to manage themselves. With Decap, everything becomes text files in Git. Client can edit directly on GitHub if they want. With Sanity, they’re locked to the interface (good for big publishers, bad if they want independence).

When I got it wrong

Mistake 1: Put Sanity on a project with 1 editor and 2 posts/month. Charged client $150/month. After 8 months they asked why they still paid. No good answer. Should’ve been Decap.

Mistake 2: Decap on project that scaled. Client started with 50 posts, grew to 300. Rebuilding 300 posts started taking 12 minutes. Client started complaining. Had to migrate to Sanity (3 unpaid days).

Mistake 3: Decap for agency with 4 designers wanting to edit at same time. Decap doesn’t support simultaneous editing. Git merge conflicts. Nightmare. Sanity would’ve saved R$50 in rework.

These three stories cost time. That’s why this post exists.

Real setup: Sanity

You create an account, select a dataset, choose schema:

// schemas/post.js
export default {
  name: 'post',
  title: 'Post',
  type: 'document',
  fields: [
    {
      name: 'title',
      title: 'Title',
      type: 'string',
      validation: Rule => Rule.required()
    },
    {
      name: 'slug',
      title: 'Slug',
      type: 'slug',
      options: { source: 'title' }
    },
    {
      name: 'content',
      title: 'Content',
      type: 'array',
      of: [{ type: 'block' }]
    },
    {
      name: 'publishedAt',
      title: 'Published',
      type: 'datetime'
    }
  ]
}

30-minute setup. Dashboard ready. Editors can use immediately.

Real setup: Decap

You create a repo, add config.yml:

backend:
  name: github
  repo: your-github/your-repo
  branch: main

media_folder: "public/images"
public_folder: "/images"

collections:
  - name: blog
    label: Blog
    folder: src/content/blog
    create: true
    fields:
      - { label: Title, name: title, widget: string }
      - { label: Slug, name: slug, widget: string }
      - { label: Content, name: content, widget: markdown }
      - { label: Published, name: published, widget: datetime }

Connect to GitHub, Decap creates a webhook, done. Free.

The difference is in workflow:

Sanity:

  1. Open Sanity panel
  2. Edit post
  3. Click “Publish”
  4. API updates instantly
  5. Next.js ISR invalidates cache
  6. New page in 200ms

Decap:

  1. Open Decap panel (on GitHub)
  2. Edit YAML file
  3. Click “Save”
  4. GitHub receives commit
  5. Netlify/Vercel rebuild (3-5min)
  6. New site after rebuild

5 minutes. Nothing if your blog updates 1x/week. Frustrating if you update 5x/day.

Small vs large clients

Freelancer or micro business (1-5 products, 1-2 editors): Decap. Save $1200/year and still have decent CMS.

Agency or SaaS (10+ editors, 100+ items, multitenancy): Sanity. Cost is insignificant compared to value the tool adds.

Inflection point: when you have 50+ posts AND 2+ simultaneous editors, Sanity starts making economic sense. Productivity increase compensates for $99/month.

Alternatives nobody talks about

Strapi (open source, you host): very customizable but requires DevOps. You run a server.

Contentful: similar to Sanity, small free tier, aggressive pricing after.

Prismic: good for teams, pricing between Decap and Sanity.

Payload CMS: new, open source, you host. Promises to be “Sanity but open source”.

But most of my clients stay in Sanity or Decap. Too simple to compare with alternatives.

Migration between the two

Decap to Sanity is easy. Export YAMLs, write script to populate Sanity via API. 2-3 hours.

Sanity to Decap is possible but dumb. You lose relationships, custom types. Only do if you have time and no budget.

Never migrated a client from one to another for “not liking it”. Always for “it scaled and needs this”. Those migrations are expensive. Choosing right at the start is cheap.

Decision checklist

  • How many editors need simultaneous access? (>2 = Sanity)
  • How often does the site change? (>3x/day = Sanity)
  • How much API traffic? (>50k req/month = Sanity)
  • Does client need complex relationships? (yes = Sanity)
  • Is budget tight? (yes and <50 posts = Decap)
  • Will there be multitenancy? (yes = Sanity)
  • Does client want to edit in Git directly? (yes = Decap)
  • Need webhooks and automations? (yes and complex = Sanity)

Answered 3+ “Sanity” = use Sanity. Answered 3+ “Decap” = use Decap. Tie = Decap (start free, migrate later if it scales).

Real case: FitPlan

I used Sanity for FitPlan (online gym). 200+ videos, 30+ workouts, 15 categories. 3 editors. Changed heavily (new workout every week).

Sanity cost: $150/month. Margin I gained not doing rework on versioning, merge conflicts, publish delays: about $400/month.

Paid for itself in less than a week of saved work.

If I’d used Decap, I think client would’ve gotten frustrated. 3 editors, 50-minute rebuilds, daily changes. Not scale.

Final tip

Choose Decap when you can. Free is always better. But when the client starts complaining about delays, or you’re spending time on merge conflicts, or more than 1 editor is editing simultaneously, switch to Sanity.

It’s easier to make the right call at the start than to mitigate mistakes later. This post is to keep you from paying with your time.

Want more on infrastructure? Read deploy beyond Vercel, how to price web projects, and integrations, APIs and webhooks.

Read also: Astro 5: what changed | Schema.org in Astro | WordPress to Astro migration

Next step

Need a dev who truly delivers?

Whether it's a one-time project, team reinforcement, or a long-term partnership. Let's talk.

Chat on WhatsApp

I reply within 2 hours during business hours.