Connection settings
No host, no port, and no SSL Mode: the endpoint is fixed and always HTTPS.


The Cloudflare D1 connection form
Connection URL
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.
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:
PRAGMAsettings 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 needswranglerinstalled. - 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.
- A binary value cannot be written through the API. Saving a BLOB cell fails with
Cloudflare D1 cannot bind a binary value through its API.Write the value in a query as anX'…'literal instead. - On iPhone and iPad an edited value travels inside its statement, and D1 refuses a statement over 100 KB. Edit a larger value on the Mac.
Troubleshooting
Authentication failed. Check your API token and Account ID.
Cloudflare refused the token for this account. Check that the token has Account > D1 > Edit and that the Account ID is the account that owns the database. Create a new token if this one expired or was revoked.Database ’…’ not found in account
The account holds no database by that name or UUID. Confirm it withwrangler d1 list. Check that the token reaches the account that owns it.
’…’ is not a Cloudflare D1 database name or UUID
A D1 name holds only letters, digits,- and _, and starts with a letter or digit. Look for a typo or a pasted space in Database. Paste the database UUID from the Cloudflare dashboard instead.

