Skip to main content
A D1 connection is three strings: the database name, your Cloudflare account ID, and an API token. Every query leaves as an HTTPS request to the Cloudflare API, and the dialect on the other end is SQLite. The driver is not in the app. Picking in the Choose a Database sheet offers the download before the form opens, and opening a saved connection installs it without asking. Settings > Plugins > Browse > installs it up front. See Plugins.

Connection settings

No host, no port, and no SSL pane: the endpoint is fixed and always HTTPS.
Cloudflare D1 connection form with Database, Account ID, and API Token fields

The Cloudflare D1 connection form

Click Test Connection to verify, then Save & Connect.

Connection URL

The token is not in the URL. See Connection URL Reference.

Getting your credentials

1

Copy the account ID

It is in the right sidebar of the Cloudflare dashboard, or run npx wrangler whoami.
2

Create the token

On Cloudflare API Tokens, click Create Token, pick the Custom token template, and add the permission Account > D1 > Edit.
3

Save and copy it

Cloudflare shows the token once. Paste it into API Token.
The token reaches every D1 database in its account, not only the one you connect to.

Databases and schema

The toolbar’s database switcher lists every D1 database in the account and moves between them without reconnecting. It creates and drops them too. A tab keeps the database it opened on for its whole life: see Tabs. Browsing, EXPLAIN QUERY PLAN, data editing, and export behave as they do for SQLite.

Limitations

  • Nothing survives between statements. Each query is an independent HTTP request with no session state: PRAGMA settings and temp tables do not carry. Put what a statement needs into that statement.
  • No multi-statement transactions. Every statement auto-commits alone, with no rollback.
  • A column cannot be renamed or retyped, and a foreign key cannot be edited. Recreate the table and copy the rows across.
  • No bulk import through the plugin. Run wrangler d1 execute <name> --file=dump.sql, which needs wrangler installed.
  • 10 GB per database, Cloudflare’s limit. Shard across databases for more.
  • Cloudflare’s API rate limits apply. A limited request surfaces as an error carrying the retry delay Cloudflare returned.

Troubleshooting

Authentication failed. Check your API token and Account ID.: The token lacks D1 Edit, the Account ID belongs to a different account, or the token expired or was revoked. Database ’…’ not found in account: Confirm the name or UUID with wrangler d1 list, and confirm the token reaches the account that owns it. Rate limited by Cloudflare. Retry after … seconds.: Wait the stated interval. If it repeats, refresh less often and lower the page size.