Database Connection String Builder

Assemble correct, URL-encoded connection strings for the databases you use most — nothing leaves your browser.

Connection details

Connection strings

postgresql://admin@localhost:5432/mydb
jdbc:postgresql://localhost:5432/mydb
host=localhost port=5432 dbname=mydb user=admin

About this tool

Database connection strings are fiddly and database-specific: the scheme, credential placement, port and database joining, and — most commonly forgotten — percent-encoding special characters in passwords all vary. A single unencoded @ or : in a password breaks the URI. This builder turns a plain form into a correct, properly URL-encoded connection string for PostgreSQL, MySQL, MongoDB, Redis and SQLite.

Credentials are percent-encoded automatically, sensible default ports are pre-filled, and toggles cover SSL/TLS, MongoDB's mongodb+srv DNS seed-list format and arbitrary extra parameters. Where relevant the tool also emits a JDBC URL and a libpq keyword/value string, so you can paste the right form into your ORM, driver or CLI. Nothing you type — host, username or password — is ever transmitted or stored.

How to use

  1. Pick your database

    Choose PostgreSQL, MySQL, MongoDB, Redis or SQLite; the default port fills in.

  2. Fill in the details

    Enter host, credentials, database name and any extra parameters. Passwords are encoded for you.

  3. Toggle the options

    Enable SSL/TLS, or mongodb+srv for managed clusters like Atlas.

  4. Copy the string

    Copy the connection URI, or the JDBC / libpq variant, into your config.

Output formats

FormatUsed by
Connection URIMost drivers and ORMs (scheme://user:pass@host:port/db)
JDBC URLJava drivers for PostgreSQL and MySQL
libpq key/valuepsql and libpq-based Postgres clients
mongodb+srvMongoDB DNS seed-list connections

Credentials are URL-encoded automatically and never leave your browser.

Frequently asked questions