Netlify Database

Managed Postgres built into the Netlify platform, with branching per deploy

Intermediate
Screenshot of Netlify Database, Managed Postgres built into the Netlify platform, with branching per deploy

What is Netlify Database?

Netlify Database is a developer tool. A managed Postgres primitive inside Netlify: automatic provisioning, repository-tracked migrations, and an isolated database branch for every deploy preview and AI agent run.

Netlify Database is a fully managed Postgres database that ships as part of the Netlify platform. Provisioning, schema migrations and branching are handled by the platform, so a team can attach a production-grade relational store to a project without standing up a separate database vendor, writing connection plumbing or running migration scripts by hand. It is aimed at developers building full-stack applications on Netlify who want relational data close to the rest of their stack. The defining idea is database branching that mirrors the deploy model. Production deploys are the only ones permitted to touch the main database. Every deploy preview gets its own branch, seeded with a copy of production data at the moment the preview is created, and any schema or data changes made inside that preview stay isolated. The same logic applies to AI agent runs: each run receives its own branch, so an agent can iterate on schema and queries without any path to corrupting live data. Migrations are tracked in the repository and applied automatically on every production deploy and deploy preview, which keeps the schema aligned with the code that is actually running. In practice the workflow is familiar to anyone using Netlify already. Data is queried from Functions, Edge Functions, builds and Agent Runners. The CLI exposes structured JSON output and non-interactive flags so scripts and agents can drive it programmatically, and a published skill file gives coding agents context on schema changes. Where a team might otherwise pair Netlify hosting with an external Postgres provider and a hand-rolled staging database, this removes the staging drift problem entirely, at the cost of tying the database to one hosting platform. Access is limited to credit-based plans, and an active database draws down credits for compute and bandwidth, with storage free until July 1, 2026. Teams on legacy plan structures should confirm eligibility before planning around it.

How do you use Netlify Database?

  1. 1Confirm your plan supports Netlify Database
    The database is offered on credit-based plans only. Check the billing and usage documentation to understand how compute and bandwidth draw down credits before you provision anything.
    Netlify Database — Confirm your plan supports Netlify Database
  2. 2Provision the database for your project
    Create the database from the Netlify project so that provisioning is handled for you. No connection strings or external dashboards need to be assembled by hand.
  3. 3Write your first migration
    Add migration files to the expected directory layout in your repository. Review the migrations page for file structure and ordering rules before committing.
    Netlify Database — Write your first migration
  4. 4Query data from your functions
    Read and write relational data from Functions or Edge Functions. Deploy previews and agent runs are automatically pointed at their own branch, so no code changes are needed to switch targets.
    Netlify Database — Query data from your functions
  5. 5Open a pull request to test on an isolated branch
    Pushing a branch or opening a pull request creates a deploy preview wired to a fresh database branch seeded from production. Break things freely there and reset the branch if needed.
    Netlify Database — Open a pull request to test on an isolated branch
  6. 6Drive it from the CLI or an agent
    Use the Netlify CLI to script database work with JSON output and non-interactive flags, or hand the published skill file to your coding agent so it understands the schema conventions.

Pros and cons

Pros

  • Zero-config provisioning removes the separate database vendor and connection setup stepAI
  • Every deploy preview gets its own branch seeded from production data, so schema experiments stay isolatedAI
  • Agent runs each receive an isolated branch, making it safe to let AI agents change schema and dataAI
  • Migrations live in the repository and apply automatically on production deploys and previewsAI
  • CLI is designed for automation with structured JSON output and non-interactive flagsAI

Cons

  • Only available on credit-based plans, so teams on other plan structures cannot use itAI
  • Active databases consume credits for compute and bandwidth, which makes cost forecasting less predictable than flat pricingAI
  • Storage is free only until July 1, 2026, so long-term cost is uncertainAI
  • Tightly coupled to Netlify hosting, which makes a later move to another platform costlyAI
  • No stated support for non-Postgres engines or self-hosted deploymentAI

How much does Netlify Database cost?

Pricing

Available on credit-based plans only. An active database consumes credits for compute and bandwidth used. Database storage space is free until July 1, 2026. Full detail lives in the billing and usage documentation.

Learn more

Integrations

Built into Netlify: Functions, Edge Functions, builds, Agent Runners and deploy previews all connect to the database directly. The CLI and the published Netlify Database skill let external agents work with it.

Learn more

Features

Managed Postgres with automatic provisioning and migrations tracked in your repository. Production deploys alone reach the main database, while deploy previews and each AI agent run get an isolated branch copied from production data. Works with Functions, Edge Functions, builds and Agent Runners, with CLI commands built for programmatic use.

Frequently asked questions about Netlify Database

  • How much does Netlify Database cost?
    Available on credit-based plans only. An active database consumes credits for compute and bandwidth used. Database storage space is free until July 1, 2026. Full detail lives in the billing and usage documentation.
  • How do you use Netlify Database?
    The walkthrough on this page covers 6 steps: 1. Confirm your plan supports Netlify Database 2. Provision the database for your project 3. Write your first migration 4. Query data from your functions 5. Open a pull request to test on an isolated branch 6. Drive it from the CLI or an agent.
  • What platforms does Netlify Database support?
    Netlify Database is available on Web App.
  • What does Netlify Database integrate with?
    Built into Netlify: Functions, Edge Functions, builds, Agent Runners and deploy previews all connect to the database directly. The CLI and the published Netlify Database skill let external agents work with it.
  • What are the limitations of Netlify Database?
    Only available on credit-based plans, so teams on other plan structures cannot use it. Active databases consume credits for compute and bandwidth, which makes cost forecasting less predictable than flat pricing. Storage is free only until July 1, 2026, so long-term cost is uncertain.

Status

StatusActive
Views0
Outbound clicks0
Added11/3/2026

Platforms

Web App

Pricing

Paid