libSQL connection string builder
Build a Turso or libSQL database URL with its auth token for TypeScript, Python, Go and environment variables, or paste one to see the host, whether TLS is on, and when the token expires. It all runs in your browser: nothing you type is sent anywhere.
Open this connection in SQLly
Opens SQLly's connection editor filled in.
Open this connection in SQLly
Private by design. The builder and decoder are plain JavaScript running in this tab. The page sends no request with what you type, stores nothing (not even in your browser), and keeps working offline once loaded. The Open in SQLly link goes from your browser straight to the app on your computer.
libSQL connection string formats
A Turso database is addressed by a libsql://<database>-<organization>.turso.io URL plus an auth token (a JWT). libsql:// means TLS; a self-hosted sqld on your own machine usually listens on plain http://127.0.0.1:8080.
The decoder reads the token's payload right here in your browser to show its expiry and whether it is read-only. It does not verify the signature, and it does not send the token anywhere.
Database URL Turso CLI, every libSQL SDK
libsql://mydb-myorg.turso.io
URL with auth token Go database/sql, @libsql/client, SQLly
libsql://mydb-myorg.turso.io?authToken=your_auth_token
Local sqld self-hosted libSQL server
http://127.0.0.1:8080
Placeholders such as your_password are just that: build your own string with the form above. More about connecting SQLly to libSQL: SQLly for libSQL.
libSQL URL schemes and options
From the @libsql/client source and Turso's SDK reference.
| Keyword | Synonyms | Default | What it does |
|---|---|---|---|
libsql:// |
- | - | TLS; the client picks HTTPS or secure WebSockets. |
https:// / wss:// |
- | - | TLS over a specific transport. |
http:// / ws:// |
- | - | Plain text, for a local sqld. |
file: |
- | - | A local libSQL/SQLite file (embedded). |
authToken |
- | - | Query parameter carrying the auth token; or pass authToken / auth_token in client options. |
tls |
- | 1 | ?tls=0 turns TLS off for libsql://; needs an explicit port. |
TURSO_DATABASE_URL / TURSO_AUTH_TOKEN |
- | - | Environment variable names Turso's quickstarts use. |
Common libSQL connection errors
401 Unauthorized
Why: The auth token is missing, expired, revoked, or belongs to another database or organization.
Fix: Create a new token with turso db tokens create <database> and paste it into the decoder to check its expiry.
Connection refused on 127.0.0.1:8080
Why: No local sqld is running, or it listens on another port.
Fix: Start sqld (for example turso dev for a local development server) and use the URL it prints.
libSQL connection string FAQ
What is a Turso database URL?
libsql://<database>-<organization>.turso.io, shown by turso db show <database>. Pair it with an auth token from turso db tokens create <database>.
Is it safe to put the auth token in the URL?
It works (?authToken=), but the URL then becomes a secret that ends up in logs and shell history. Prefer passing the token separately, for example in the TURSO_AUTH_TOKEN environment variable.
Does this tool check my token?
It decodes the token's payload in your browser to show the expiry date and whether it is read-only. It does not check the signature and never sends the token anywhere.
Other engines
Connect once. Then just write SQL.
SQLly is a native SQL workbench for macOS, Windows and Linux. Paste a connection string into its connection editor, keep passwords in your system keychain, and get schema-aware IntelliSense on libSQL and more.