Better Auth vs Clerk

Better Auth: TypeScript apps that want self-hosted auth in their own database.; Clerk: Shipping polished auth fast without running it yourself.

FieldBetter AuthClerk
PricingOpen sourceFree tier
Open sourceYesNo
Self-hostableYesNo
EcosystemJavaScript / TypeScriptJavaScript / TypeScript
CategoryAuthAuth

Choose Clerk over Better Auth when

Choose it for hosted auth with no security patching on your side. It bills $0.02 per retained user above 50,000 on Pro and holds your users in its database, where Better Auth holds them in yours.

Clerk: hosted, so no security patching on your side. It bills $0.02 per retained user above 50,000 on Pro and holds your users in its database, where Better Auth holds them in yours (pricing).

SourceChecked 25 November 2026

Choose Better Auth over Clerk when

Choose it for an MIT library that stores users and sessions in your own database with no per-user fee. You build the screens, which Clerk supplies, and you apply its security updates yourself.

Better Auth: an MIT library that stores users and sessions in your own database, with no per-user fee, and you apply its security updates yourself (LICENSE, security release). You build the screens; Clerk supplies them.

SourceChecked 25 November 2026

Better Auth

A framework-agnostic authentication library for TypeScript with email/password, OAuth, sessions and a plugin system.

Choose Better Auth if

TypeScript apps that want self-hosted auth in their own database.

Why it’s here

Better Auth is a TypeScript auth framework that runs inside your app and keeps users, sessions and accounts in your own database: SQLite, Postgres, MySQL, or an ORM adapter such as Prisma or Drizzle (installation). With no database configured it switches to stateless mode, where the session lives in a signed or encrypted cookie; most plugins still need a database (session management, installation). Plugins add organizations with teams, passkeys, SAML and OIDC SSO, and SCIM provisioning (organization, passkey, SSO, SCIM).

Pick it when

  • You are starting a TypeScript project and want auth tables in your own database with no per-user fee.
  • You are on Auth.js. The same team maintains both and publishes a migration guide (guide).
  • You need your app to act as an OAuth or OpenID Connect provider. Version 1.7 expanded that, with DPoP, back-channel logout and SCIM Groups (1.7 post).

Skip it when

  • Nobody on your team can apply security updates promptly. See Watch out for.
  • You want someone else to host the user database and patch it. Clerk does both and ships prebuilt components (Clerk docs).
  • You need the 1.x upgrade path to be uneventful this quarter. The 1.7 release changed the database schema in a minor version and broke sign-ins (account change).

Pricing

The framework is free. The optional Better Auth Infrastructure dashboard, read 2026-11-17, is Starter at $0 (1 dashboard seat, 10,000 audit logs a month) and Pro at $20 a month (unlimited seats, 20,000 audit logs, then $0.0001 per event) (pricing).

Current state

The latest stable release is 1.7.25, published 2026-11-14; 1.8.0-beta.10 is on the beta tag (releases). The licence is MIT, copyright Bereket Engida (LICENSE). Better Auth Inc. took over maintaining Auth.js on 2025-09-22 and announced on 2026-07-07 that it is joining Vercel, citing a shared commitment "to keeping auth open source, framework and platform agnostic" (Auth.js post, Vercel post).

Setup

npm install better-auth
npx auth@latest migrate

migrate works only with the built-in Kysely adapter; with Prisma or Drizzle, run generate and apply the schema yourself (installation).

Watch out for

You own the patching. The 2026-11-03 release fixed 12 advisories, 1 critical (Expo authorization proxy), 2 high (phone numbers claimed before verification, desktop sign-in returning the server secret), 8 medium and 1 low. Two medium ones matter in any setup: OAuth sign-in could treat an unverified provider email as verified, and revoked sessions could stay valid with secondary storage or the cookie cache. Update every @better-auth/* package to the same version (security release). Version 1.7.0 added a required issuer column to the account table; 1.7.3 reverted it, and databases that already migrated need a manual cleanup (account change).

Better Auth on GitHub

Clerk

Hosted authentication and user management with prebuilt sign-in components, organisations and session handling.

Choose Clerk if

Shipping polished auth fast without running it yourself.

Why it’s here

Clerk is a hosted auth service: prebuilt sign-in, profile and organization components, a user database and session handling you do not run. In Next.js, npx -y clerk@latest init writes the provider, middleware and auth routes (quickstart). Each session token is a JWT that expires after 60 seconds and is refreshed in the background, which limits what a stolen token is worth (how Clerk works).

Pricing

From the official pricing page, read 2026-11-17, in US dollars (pricing):

  • Hobby (free): 50,000 monthly retained users (MRUs) per app, up to 3 social connections, sessions fixed at 7 days, no MFA, no passkeys, 1 day of logs.
  • Pro: $25 a month, or $20 billed annually. 50,000 MRUs included, then $0.02 each up to 100,000 and $0.018 each up to 1,000,000. So 100,000 MRUs on monthly billing costs $25 + 50,000 x $0.02 = $1,025. Includes MFA, passkeys, custom session length and 1 enterprise SSO connection; each extra connection is $75 a month.
  • Business: $300 a month ($250 annually). Adds 10 dashboard seats, the SOC 2 report and priority support with no response-time SLA. The 99.99% uptime SLA is Enterprise only.
  • Add-ons: B2B Authentication Enhanced at $100 a month ($85 annually) lifts the 20-member cap per organization and adds verified domains and custom roles. SMS codes cost $0.01 each in the US and Canada.

A user counts only if they return at least 24 hours after signing up, so a sign-up that never comes back is never billed.

Pick it when

  • You want sign-in, profile and organization screens without building them, with SDKs for React, Next.js, Expo, Astro and native Android (docs index).
  • You sell to businesses and need SAML or OIDC SSO soon: one connection is in the Pro price.
  • Retention tracks revenue. Clerk's own FAQ says it is easiest to justify when it does (FAQ).

Skip it when

  • You need auth to run on your own servers. Clerk sells only hosted plans.
  • Your app is free, ad-supported or low revenue per user. Clerk's FAQ warns that per-MRU pricing "may feel expensive once you outgrow the free tier".

Current state

@clerk/nextjs 7.10.2 was published 2026-11-17, after 7.10.0 on 2026-11-14 and 7.9.26 on 2026-11-12 (releases). The clerk/javascript repository is MIT, copyright Clerk Inc (LICENSE); it holds the SDKs, not the hosted service.

Setup

npx -y clerk@latest init

Watch out for

You cannot migrate users from a development instance to production (migrating). Leaving is possible: the dashboard exports a CSV that includes hashed passwords, but moving to another provider ends every active session. Production Backend API calls are limited to 1,000 requests per 10 seconds per instance, and the currentUser() helper counts against that limit (rate limits). Directory Sync billing starts on 2027-01-01 (pricing).