Zero Signup ToolsFree browser tools

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

  1. Pick a driver in the top grid. Each tile shows the scheme, default port, and whether TLS is implicit for that driver.
  2. Fill in the username and password. The mask-password toggle hides the password in every output panel so the page is screenshot-safe.
  3. Enter one or more hosts. Drivers that support seed lists (Postgres failover, MongoDB seed list, CockroachDB) let you add or remove host rows.
  4. 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.
  5. 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.
  6. 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

All tools
All toolsDeveloper Tools