---
source: https://iinventedlight.com/library/notes/cloudflare-d1.md
title: "Cloudflare D1: serverless SQL in Workers"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "CC-BY-4.0 (Cloudflare docs); CC-BY-4.0 (Cloudflare docs source); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "Summary by iinventedlight (AI-assisted). Sources: Cloudflare docs, D1 get started; Cloudflare docs source, D1 get started (source). CC-BY-4.0 (https://raw.githubusercontent.com/cloudflare/cloudflare-docs/production/LICENSE). Copyright Cloudflare, Inc."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-18
status: published
approved_by: "Cole Withington, 2026-11-20 13:14 PT: \"Publish the full batch and rewrite the 6 live notes\""
checked_on: 2026-11-18
as_of: 2026-11-18
confidence: medium
untested: "Not reproduced (2026-11-18). Official docs and source files were read; no test suite, server, or API call was run for this note."
category: coding-references
topic_area: "code-web: cloudflare d1"
tags: [cloudflare, d1, sql, workers, sqlite]
client: Librarian
sources:
  - id: S1
    title: "D1 get started"
    publisher: Cloudflare docs
    url: https://developers.cloudflare.com/d1/get-started/
    accessed: 2026-11-18
    license: "CC-BY-4.0"
  - id: S2
    title: "D1 get started (source)"
    publisher: Cloudflare docs source
    url: https://raw.githubusercontent.com/cloudflare/cloudflare-docs/production/src/content/docs/d1/get-started.mdx
    accessed: 2026-11-18
    license: "CC-BY-4.0"
---
# Cloudflare D1: serverless SQL in Workers
**Answer:** D1 is Cloudflare's native serverless SQL database. The get-started guide covers creating a first database, defining a schema, and connecting a Cloudflare Worker to the database with a binding so you can query it from the Worker.

## Examples

```bash
npx wrangler d1 create my-database
```

## Rules

- You can follow the same steps in the CLI or in the dashboard.
- Bind the database to the Worker before you query it in code.

## See also


## Claims

- id: C1
  claim: The guide connects a Worker to a D1 database.
  source: S1
  evidence: "Connecting a Cloudflare Worker to your D1 database"

- id: C2
  claim: D1 is Cloudflare's native serverless SQL database.
  source: S2
  evidence: "Cloudflare's native serverless SQL database"

- id: C3
  claim: The guide starts by creating your first D1 database.
  source: S2
  evidence: "Creating your first database"

## Sources

- [S1] D1 get started. Cloudflare docs. https://developers.cloudflare.com/d1/get-started/ . License: CC-BY-4.0. Accessed 2026-11-18.

- [S2] D1 get started (source). Cloudflare docs source. https://raw.githubusercontent.com/cloudflare/cloudflare-docs/production/src/content/docs/d1/get-started.mdx . License: CC-BY-4.0. Accessed 2026-11-18.

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Cloudflare docs, D1 get started; Cloudflare docs source, D1 get started (source). CC-BY-4.0 (https://raw.githubusercontent.com/cloudflare/cloudflare-docs/production/LICENSE). Copyright Cloudflare, Inc. Text was condensed and changed from the originals.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
