Developer Tools
Database Connection String Builder
Build database connection strings for Postgres, MySQL, MongoDB, Redis, SQL Server, and more. Fill in host, port, user, password, TLS, and options.
Driver
Pick the database driver you are building a URI for.
Both postgres:// and postgresql:// are accepted by libpq. Use sslmode=require for transit encryption.
Authentication
Hosts
Multiple hosts form a seed list for replica sets and failover.
Database
TLS
Toggle transport encryption on or off, or leave the driver's default.
Require TLS sets sslmode=require.
Query options
Each option becomes a key=value pair in the query string.
No options yet. Add things like application_name, replicaSet, authSource, or any driver-specific flag.
Presets
One-click templates for the most common setups.
Connection URI
Drop into env vars, code, or any standard driver.
postgresql://postgres:********@localhost:5432/postgres?sslmode=disable
Notes and warnings
- Password is set but TLS is off. The password will travel in plain text.
.env file line
DATABASE_URL=postgresql://postgres:********@localhost:5432/postgres?sslmode=disable
docker-compose env
- DATABASE_URL=postgresql://postgres:********@localhost:5432/postgres?sslmode=disable
JSON config snippet
{
"DATABASE_URL": "postgresql://postgres:********@localhost:5432/postgres?sslmode=disable"
}CLI command
psql "postgresql://postgres:postgres@localhost:5432/postgres?sslmode=disable"
Pasteable into a local shell. Quote credentials with care on shared machines.
How this is encoded
- Usernames and passwords are percent-encoded so characters like @, /, :, and % do not break parsing.
- IPv6 hosts are bracketed automatically when colons are detected.
- Default ports are filled in as placeholders but omitted from the URI if you leave the port blank.
- Builder runs locally. No connection is opened, no DNS is resolved, nothing leaves the browser.
How to use
- Pick a driver in the top grid. Each tile shows the scheme, default port, and whether TLS is implicit for that driver.
- Fill in the username and password. The mask-password toggle hides the password in every output panel so the page is screenshot-safe.
- Enter one or more hosts. Drivers that support seed lists (Postgres failover, MongoDB seed list, CockroachDB) let you add or remove host rows.
- Set the database name (or the database index for Redis, or the vhost for AMQP) and pick the TLS mode. Require TLS sets the driver's standard flag.
- Add any driver-specific options as key, value rows (replicaSet, authSource, application_name, retryWrites, encrypt). They become query parameters, or semicolon properties for JDBC SQL Server.
- Copy the final URI, or grab the ready-to-paste .env line, docker-compose env line, JSON config snippet, or CLI command from the output panels.
About this tool
Database Connection String Builder is the inverse of the connection string parser. Pick the driver (PostgreSQL, MySQL, MariaDB, MongoDB seed list, MongoDB SRV, Redis, Redis TLS, SQL Server URL, SQL Server JDBC, CockroachDB, ClickHouse, RabbitMQ AMQP and AMQPS), then fill in structured fields: username, password, one or more hosts with ports, database name, TLS mode, and a free-form list of driver-specific key, value options. The tool percent-encodes the userinfo segment so a literal @, /, :, or % in a password does not corrupt the URI; brackets IPv6 hosts automatically when colons are detected; respects the default port for the chosen driver as a placeholder while omitting an empty port from the final string; converts between standard URL-style query parameters and the JDBC semicolon property syntax used by jdbc:sqlserver://host:port;property=value;property=value; and applies driver-specific defaults for TLS (sslmode=require on Postgres and CockroachDB, useSSL=true on MySQL, tls=true on MongoDB, encrypt=true on SQL Server, secure=true on ClickHouse) when you toggle TLS on. The output panel shows the canonical URI plus three deployment shapes ready to paste: a .env file line keyed by the driver's conventional variable name (DATABASE_URL, MONGODB_URI, REDIS_URL, JDBC_URL), a docker-compose environment line, and a one-key JSON config snippet. A driver-aware CLI command is also generated where it makes sense: psql for Postgres, mongosh for MongoDB and MongoDB SRV, redis-cli for Redis (with -u for TLS), sqlcmd for SQL Server, mysql and mariadb for the MySQL family, cockroach sql for CockroachDB, and clickhouse-client for ClickHouse. A masked-password toggle is on by default so the page is safe to screenshot and share. A Notes and warnings panel catches the most common mistakes: a port outside 1 to 65535, multi-host MongoDB without a replica set name, multiple hosts on a driver that takes only one, and a non-empty password with TLS disabled. Seven presets cover everyday setups (Postgres on localhost, Postgres on cloud with TLS, MySQL on localhost, MongoDB Atlas SRV, MongoDB replica set, Redis TLS, SQL Server JDBC) so you can apply a template and tweak from there. Useful for writing a fresh env var on a new project, normalizing a connection string before handing it to a deploy pipeline, learning each driver's URI shape, and prepping config blocks for docker-compose and Kubernetes manifests. Everything runs in your browser. No database is contacted, no DNS is resolved, no credentials are uploaded.
Free to use. Works in your browser. No signup, no login.
Related tools
You may also like
Database Connection String Parser
Decode database URIs with driver detection, host breakdown, TLS check, and warnings.
Open tool
DeveloperURL Parser
Break a URL into protocol, host, path, query params, and fragment with decoded values.
Open tool
DeveloperOAuth Authorization URL Builder
Build OAuth 2.0 / OIDC authorization URLs with PKCE, provider presets, and a paste-and-parse inspector.
Open tool
DeveloperSet-Cookie Builder
Form-driven Set-Cookie header builder with conflict warnings and server snippets.
Open tool
DeveloperDockerfile Generator
Build a production Dockerfile with multi-stage build, non-root user, BuildKit cache, and healthcheck.
Open tool
DeveloperOpenSSL Command Builder
Form-driven openssl command builder for keys, CSRs, certificates, hashing, and more.
Open tool