Better-Auth vs Clerk: Why I Stopped Paying for Clerk

By Aziz Ali
better-authclerkauthenticationsaasindie-hacker

Clerk is slick. The docs are beautiful, the UI components work out of the box, and you can get auth running in 20 minutes. I get it — I've been there. But the moment your SaaS hits 10,000 MAUs, you're staring at a $250/month auth bill that only climbs from there. Better-Auth is free, open-source, and runs entirely on your own infrastructure. Here's why I made the switch and haven't looked back.

The Pricing Reality That Nobody Talks About

Clerk's free tier gives you 10,000 MAUs — sounds generous until your product starts getting traction. After that, you're on a paid plan:

  • 10k–50k MAUs: ~$25–$250/month
  • 50k–100k MAUs: $250–$600+/month
  • 100k+ MAUs: Custom pricing (brace yourself)

For a bootstrapped founder, that's a meaningful recurring cost on top of hosting, your database, Stripe fees, and everything else. You're paying to authenticate your own users — users you acquired, on your product, talking to your database. That never sat right with me.

Better-Auth is MIT-licensed and self-hosted. You pay zero in licensing. Your only costs are your own infrastructure (a few database rows per user). At 100k users, your auth cost is effectively $0.

Feature Comparison: Better-Auth vs Clerk

Feature Better-Auth Clerk
Pricing Free (self-hosted) Free up to 10k MAU, then paid
OAuth Providers ✅ All major ones ✅ All major ones
Email/Password
Magic Links
Multi-tenancy / Orgs ✅ Built-in ✅ Built-in
MFA / 2FA
Pre-built UI components ❌ (DIY with shadcn)
Data ownership ✅ Your DB ❌ Clerk's infra
Self-hosted
TypeScript-first
Framework agnostic Partial
TanStack Start support Limited

The one place Clerk genuinely wins is the pre-built UI components. <SignIn />, <UserButton />, <OrganizationSwitcher /> — they just work and look polished. Better-Auth doesn't ship UI; you build it yourself with shadcn/ui (which takes maybe two hours and looks exactly how you want).

Developer Experience: Setting Up Better-Auth

With Better-Auth on TanStack Start + Drizzle + Bun, setup is straightforward. Here's the core server config:

// src/lib/auth.ts
import { betterAuth } from "better-auth";
import { drizzleAdapter } from "better-auth/adapters/drizzle";
import { db } from "./db";

export const auth = betterAuth({
  database: drizzleAdapter(db, {
    provider: "pg",
  }),
  emailAndPassword: {
    enabled: true,
  },
  socialProviders: {
    github: {
      clientId: process.env.GITHUB_CLIENT_ID!,
      clientSecret: process.env.GITHUB_CLIENT_SECRET!,
    },
    google: {
      clientId: process.env.GOOGLE_CLIENT_ID!,
      clientSecret: process.env.GOOGLE_CLIENT_SECRET!,
    },
  },
});

And the client:

// src/lib/auth-client.ts
import { createAuthClient } from "better-auth/client";

export const authClient = createAuthClient({
  baseURL: import.meta.env.VITE_APP_URL,
});

That's it. No vendor lock-in. No external API calls for every session validation. Auth runs in your own process, hits your own DB. If you want a deeper walkthrough of the TanStack Start integration, I wrote about the full auth setup for TanStack Start.

Where Clerk Still Makes Sense

I'm not going to pretend Better-Auth is the right call for everyone.

Use Clerk if:

  • You're building an enterprise product where compliance and SOC2 certification matter out of the box
  • You need Clerk's pre-built organization management UI immediately (their org UI is genuinely excellent)
  • You have a tight deadline and can't afford the 2-hour shadcn UI integration time
  • Your company will be paying a vendor for auth and nobody will ever question the bill

Use Better-Auth if:

  • You're a bootstrapped indie hacker watching every dollar of infrastructure spend
  • You want data ownership (your users' auth data lives in your DB, not Clerk's cloud)
  • You're using TanStack Start, Remix, or any non-Next.js framework where Clerk support is spotty
  • You care about long-term cost predictability — $0 doesn't change as you scale

The decision tree is pretty simple:

flowchart TD
    A[Need auth for your SaaS?] --> B{VC-backed or bootstrapped?}
    B -->|Bootstrapped / Indie| C{Worried about MAU pricing?}
    B -->|VC-backed, enterprise| D[Clerk — great DX, compliance ready]
    C -->|Yes| E[Better-Auth — free, self-hosted]
    C -->|No, under 10k MAUs| F{Timeframe?}
    F -->|Ship NOW, no UI time| D
    F -->|Can spare 2hrs on UI| E

Data Ownership Is a Real Concern

This one gets underplayed. With Clerk, your users' identity data lives on Clerk's servers. If Clerk has downtime, your auth has downtime. If Clerk changes pricing or shuts down, you have a painful migration ahead.

With Better-Auth, everything lives in your own Postgres database — emails, sessions, OAuth tokens. You control it. You can query it. You can migrate it wherever you want. When I was building BetterStarter, this was non-negotiable: I wanted the boilerplate to give founders full control of their stack.

I've also seen founders get burned by Clerk's "organization" data not being easily exportable. That's a bad position to be in if you ever need to move.

The Performance Angle

Every Clerk session validation makes an API call to Clerk's servers. Better-Auth validates sessions against your own database — which is already in the same datacenter as your app (or even the same machine in local dev).

In practice, this means:

  • Clerk: ~50–150ms added latency per auth check (external API round-trip)
  • Better-Auth: ~1–5ms per auth check (local DB query)

For most SaaS apps this isn't a bottleneck, but it's a real architectural difference worth knowing.

FAQ

Is Better-Auth production-ready in 2026? Yes. It's actively maintained, has a solid community, and is being used in production by multiple indie SaaS products. The API is stable and the TypeScript types are excellent.

Does Better-Auth support multi-tenancy / organizations? Yes — Better-Auth ships with an organizations plugin that handles multi-tenant auth, member roles, and invitations. It's not as pretty out of the box as Clerk's org UI, but the functionality is equivalent.

How long does it take to set up Better-Auth vs Clerk? Clerk gets you to a working login flow in about 20 minutes. Better-Auth takes closer to 2–3 hours when you include writing your own sign-in/sign-up UI with shadcn. Both have good docs.

Can I migrate from Clerk to Better-Auth? Yes, but it requires a user migration. You'll need to export your users from Clerk, hash passwords (Clerk uses their own), and import into your DB. OAuth-only users are easier since they just re-authenticate via the social provider.

Does Better-Auth work with TanStack Start? Absolutely — it's framework-agnostic and works great with TanStack Start. The auth setup guide for TanStack Start covers the exact integration.


My honest take: if you're an indie hacker shipping a SaaS, Better-Auth is the right call. You save money, you own your data, and the setup isn't actually that painful. The $0 auth bill at 100k users will feel pretty good.

If you want all of this pre-wired — Better-Auth, Drizzle ORM, Stripe, Plunk email, shadcn/ui — without spending a weekend on boilerplate, BetterStarter ships it all for a one-time $99. No subscriptions, no MAU fees, just your product.