buildwiththis home

Best database for a vibe-coded app: Neon vs Cloudflare D1 vs Supabase

Your AI-built app keeps data in a file or in memory, and you want a real free database that's safe from strangers and easy to leave.

Last tested Oct 16, 2026 Re-test due by Nov 15, 2026 Published Oct 16, 2026 Test log (7 entries)

Our pick
Neon100/100
Why
Passed every check with no settings changes. Strangers can't reach the data, unencrypted connections are refused, and the free plan includes a 6-hour restore window.
Not for you if
you also want login, file storage and a dashboard in one place (that's Supabase, 91/100), or your app runs on Cloudflare Workers (D1, 98/100, is the simpler fit).

Short answer: Use Neon (100/100) if you want plain Postgres that's locked down by default: it passed every check, refused unencrypted connections and includes 6 hours of restore on the free plan. Pick Cloudflare D1 (98/100) if your app already runs on Cloudflare Workers. If you use Supabase (91/100), turn on RLS for every table you create with SQL, because new tables were readable and writable by anyone with the public key until we did.

The verdict

Winner

Neon

100/100

Hosted Postgres that scales to zero when idle, with a free plan and no card.

Passed all 7 checks on both runs with no settings changes and no dashboard visits. Strangers got nowhere (no password, no data), unencrypted connections were refused, and the free plan includes up to 6 hours of instant restore. 21 lines of code with Neon's serverless driver. Score: 100/100 (average of two runs).

Visit Neon

Runner-up

Cloudflare D1

98/100

Cloudflare's SQLite database, used from Cloudflare Workers.

Passed all 7 checks on both runs with no settings changes. There's no public way in (an unauthenticated request got 401), the free plan includes 7 days of point-in-time restore, and the export restored into plain SQLite. But it's built to be used from a Cloudflare Worker, and we found no security warnings page for it. Score: 98/100 (average of two runs), 2 points behind Neon.

Visit Cloudflare D1

Also tested

Tested on the same app but not picked. The reasons are in the write-up below.

On this page
  1. Quick answers
  2. Why
  3. Gotchas on default settings
  4. Scores
  5. What it costs
  6. Caveats
  7. Not tested yet
  8. Test log
  9. Affiliate disclosure
  10. Sources

Quick answers

What's the best free database for a vibe-coded app?

In our test, Neon (100/100), with Cloudflare D1 (98) close behind and Supabase (91) third. All three stored, updated and deleted notes correctly, kept them through a restart, handled 50 writes at once and exported to a standard format. Neon won on safe defaults: nothing open to strangers, encrypted connections only, and restore included on the free plan.

Is a Supabase table public by default?

A table you create with SQL is, until you enable row level security. On a brand-new Supabase project (2026-10-16), our table made with SQL was readable and writable by an anonymous request using only the public key. Supabase's docs say the Table Editor turns RLS on for you, but SQL doesn't, and AI coding tools usually create tables with SQL. After we ran alter table ... enable row level security, the same request got no rows and its insert was refused.

Why not just keep my app's data in a JSON file?

Because it loses data. Our starter app stored notes in a JSON file; when we fired 50 saves at once, all 50 said they succeeded but only 1 was kept. Every database we tested kept all 50.

Can I use Cloudflare D1 from Vercel, Netlify or my own server?

Not as your app's main database. Cloudflare's docs reach D1 from a Worker through a binding; the HTTP API is meant for admin tasks. We ran our notes API as a Worker for this reason. If your backend runs elsewhere, Neon or Supabase are the simpler fit.

Can I move my data out later?

Yes, with all three. Neon and Supabase are standard Postgres: we exported both with pg_dump and restored them into a local Postgres with every note. D1 exported a SQLite file through Cloudflare's API, which we restored into local SQLite with every note.

Why

Who this is for: your app works, usually built with AI, but its data lives in a JSON file, local storage or memory. You want a hosted database on a free plan that won’t lose data, isn’t open to strangers, and that you can leave later.

Our pick: Neon (100/100). It’s plain Postgres, and it was the only one of the three that passed every check and every safe-default item without a settings change. Strangers can’t reach the data, unencrypted connections are refused, and the free plan includes up to 6 hours of instant restore if you break something. Setup took 21 lines with Neon’s serverless driver.

Runner-up: Cloudflare D1 (98/100). Also passed everything with no settings changes, and its free plan includes 7 days of point-in-time restore. The catch: D1 is meant to be used from a Cloudflare Worker, so it’s the natural choice only if your app’s backend already runs on Cloudflare. We found no security warnings page for it, which cost it the 2 points.

Also tested: Supabase (91/100). Choose it if you want login, file storage and a database in one place, or your AI tool already set it up. It passed every check, but its defaults are the loosest of the three (below).

It’s close. Neon and D1 were 2 points apart, so we ran both again on fresh databases, as our rubric requires. Both re-runs scored the same as the first. Neon wins on our tie-breaker, safe defaults.

Gotchas on default settings

Supabase: a table made with SQL is open to anyone. On a brand-new project, our notes table created with SQL was readable and writable by an anonymous request with just the public key. Supabase’s docs say the dashboard’s Table Editor turns row level security (RLS) on for you, but SQL doesn’t, and AI coding tools usually write SQL. Fix: run alter table <name> enable row level security; on every table, then add policies for what users may see. Supabase’s Security Advisor flags tables with RLS off. Supabase is replacing the anon key with a publishable key that is just as public, so RLS matters the same either way; see our publishable vs anon key checklist. For outside research on how common this is, see UpGuard’s study and our security check verdict.

Supabase: unencrypted connections are allowed, and no backups on Free. A direct database connection with encryption turned off was accepted. Fix: turn on “Enforce SSL” in Database Settings. Daily backups start on the Pro plan, so export your data yourself (pg_dump) on the free plan.

Neon’s no-signup databases expire. If an AI agent creates a Neon database for you without an account, it’s deleted after 72 hours unless you claim it into a free Neon account. Claim it, or create the database from your own account.

A JSON file loses data. Our starter app kept 1 note out of 50 saves fired at once, and reported success for all 50. Every database kept all 50.

Scores

Scored with our published rubric. Tested 2026-10-16. Neon and D1 are the average of two runs each (both runs scored the same); Supabase had one run.

CriterionNeonCloudflare D1Supabase
Task success (35)5 (7 of 7)5 (7 of 7)5 (7 of 7)
Effort (15)5 (claiming needs a browser)54 (2 export workarounds)
Time (10)555
Cost (10)555
Quality, docs and developer experience (10)555
Ownership (10)5 (pg_dump)5 (SQL export)5 (pg_dump)
Safe defaults (10)5 (4 of 4)4 (3 of 4, no security warnings page)2 (1 of 4)
Total100 (avg of 100, 100)98 (avg of 98, 98)91

All three passed the checks that matter most: create, read, update and delete through the app’s API, notes kept after a restart, 50 simultaneous writes all saved, no secret in the browser, strangers unable to read the data (Supabase only after enabling RLS, as its docs say), and an export that restored elsewhere.

What it costs

All runs cost $0 on the free plans, with no card.

  • Neon Free: $0, no credit card, 100 projects, 100 CU-hours a month per project, 1 GB storage per project, scales to zero after 5 minutes idle, instant restore up to 6 hours or 1 GB of changes (checked 2026-10-16).
  • Cloudflare D1 on Workers Free: 5 million rows read and 100,000 rows written a day, 5 GB total storage, 500 MB per database, 7 days of Time Travel. Queries fail at the daily limit until 00:00 UTC (checked 2026-10-16).
  • Supabase Free: $0 for a 500 MB database, 5 GB egress, 1 GB file storage and 50,000 monthly active users. Free projects pause after 1 week of inactivity, with a limit of 2 active projects. Daily backups come with Pro, from $25/month (checked 2026-10-16).

Caveats

  • Different setups, same API. Each tool ran the same notes API the way its docs suggest: Neon from our Express server over its serverless driver, D1 inside a Cloudflare Worker, and Supabase inside a Supabase Edge Function (our test machine only allows HTTPS traffic, and Supabase’s server key never leaves its dashboard otherwise). Latency isn’t comparable across these setups, so we logged it but didn’t score it.
  • Order matters. Supabase ran first, Neon second and D1 third, so the later runs reused the check script and lessons. Neon’s 37-second setup is flattering.
  • D1’s first minute. In our D1 re-run, requests in the first seconds after creating the Worker got mixed errors. About a minute later everything passed. Give a new Worker a minute before testing it.
  • Conflict to disclose: this site is hosted on Cloudflare Pages. It doesn’t change a score.
  • Runs were done by an AI agent following vendor docs only. Neon used its official no-signup agent API; a person would normally sign up first.

Next step: add login. See our tested pick for adding login to your app. Storing files and images too? See file uploads for your app.

Before you launch: check your app’s security. See our vibe coding security check.

Not tested yet

  • Firebase Cloud Firestore. It needs a console click to turn on for our project; queued for a person.
  • Turso and Convex. Both need a browser signup; queued.

Test log

DateAgentStepResult
Oct 16, 2026Lando (agent)Baseline: the starter notes app (Express API storing notes in a JSON file) against the same check script.Create, list, update, delete and restart passed, but 50 saves at once returned 50 successes and kept only 1 note. That's the problem a database fixes.
Oct 16, 2026Lando (agent)Supabase, run j06-supabase-r1. New free project (cost $0) through the Supabase MCP. Created the notes table with SQL, as the Tables docs show, and probed it with only the public key.The anonymous request read the table (200) and inserted a row (201). Following Supabase's docs, we enabled RLS: the same request then got no rows and the insert was refused (401).
Oct 16, 2026Lando (agent)Supabase: notes API as a Supabase Edge Function using the auto-injected secret key, 54 lines. Ran the 7 checks.All checks passed. Working in 3 min 0 s. $0. Security Advisor showed no warnings once RLS was on. The pg_dump export needed a dedicated database role we created with SQL, because the database password is only shown in the dashboard; it restored with every note.
Oct 16, 2026Lando (agent)Supabase: tried a connection without encryption (sslmode=disable) through the shared pooler.Accepted, unencrypted. Supabase's docs say encryption isn't enforced by default; there's a setting to require it.
Oct 16, 2026Lando (agent)Neon, run j06-neon-r1. No-signup project through Neon's official agent API (claimable, 72-hour life). Notes table and queries with Neon's serverless driver from the same Express app, 21 lines. Ran the 7 checks.All checks passed. Working in 37 s (ran second, reusing the check script). $0. Without the password, Neon's endpoint refused every request; an unencrypted connection got "connection is insecure". pg_dump export restored with every note.
Oct 16, 2026Lando (agent)Cloudflare D1, run j06-d1-r1. New database and a Worker with a D1 binding, both through the Cloudflare API (45 lines). Ran the 7 checks.All checks passed. Working in 3 min 1 s, including about 75 s for the new workers.dev address to get its certificate. $0. Unauthenticated API requests got 401. The SQL export restored into local SQLite with every note.
Oct 16, 2026Lando (agent)Re-runs (rubric: top two within 5 points). Neon j06-neon-r2 and D1 j06-d1-r2 on fresh databases with the same code.Neon: all checks passed again, working in 17 s, 100. D1: our first attempt started within seconds of creating the Worker and got mixed 404 and 500 responses (22 of 50 burst writes failed). About a minute later, after 20 straight successful requests, all checks passed: working in 1 min 51 s, 98. Averages: Neon 100, D1 98. Exports weren't repeated in the re-runs.

Affiliate disclosure

This page has no affiliate links yet. Every link goes to the tool’s own homepage. Affiliate deals never decide a pick, and a tool with no affiliate program can still win. How we make money.

Sources