Build and parse MySQL, PostgreSQL, MongoDB, Redis, Elasticsearch and RabbitMQ connection strings with correct URI syntax, real SSL/TLS and pooling params, and safe URL-encoding — entirely offline.
A backend developer's connection-string cheat sheet made interactive. Fill in host, port, credentials and extra params to get a correct, properly-encoded URI for six drivers — or paste an existing string to instantly decompose it back into its parts. Nothing you type ever leaves your browser.
DB Connection String Builder Pro is part of the Web Utility Suite. It runs entirely client-side with no build step, no frameworks, and no network calls — open index.html from disk and it works. Switch between MySQL, PostgreSQL, MongoDB, Redis, Elasticsearch and RabbitMQ tabs, fill in the form, and get a live, correctly-formatted connection string with the password masked by default. Paste a real connection string into reverse mode and it detects the driver and repopulates every field — including the SSL/TLS toggle and pooling params.
- Six drivers, real URI formats:
mysql://,postgresql://(with thepostgres://alias),mongodb://(withmongodb+srv://DNS-seedlist mode and multi-host replica sets),redis://(withrediss://for TLS),http(s)://for Elasticsearch, andamqp(s)://for RabbitMQ — each with its correct, IANA/vendor-documented default port. - SSL/TLS toggle per driver, with the correct mechanism — a query param where that's how the driver signals it (MySQL
?ssl-mode=REQUIRED, PostgreSQL?sslmode=require, MongoDB?tls=true), or a scheme swap where that's how it's really done (Redisrediss://, Elasticsearchhttps://, RabbitMQamqps://— which also flips the default port from 5672 to the IANA-registered 5671).postgresql://app_user:s3cr3t@db.example.com:5432/my_app?sslmode=require - MongoDB replica sets — a "Replica set (multiple hosts)" toggle builds the real comma-separated
host1:port1,host2:port2,host3:port3authority plus?replicaSet=name, mutually exclusive withmongodb+srv://(SRV already encodes a seed list via DNS):mongodb://app_user:s3cr3t@h1:27017,h2:27017,h3:27017/my_app?replicaSet=rs0 - Connection pooling params, only where the driver actually supports them via the URI — MySQL/mysql2 (
connectionLimit,queueLimit,waitForConnections), PostgreSQL (libpq's realconnect_timeoutplus Prisma's documentedconnection_limit/pool_timeoutconvention, labeled honestly as such), MongoDB (maxPoolSize,minPoolSize,serverSelectionTimeoutMS), and RabbitMQ (heartbeat,connection_timeout). Redis and Elasticsearch clients don't pool via the URI, so no fake params are offered there.mysql://app_user:s3cr3t@db.example.com:3306/my_app?connectionLimit=10&queueLimit=0&waitForConnections=true - Elasticsearch (new) — the real
http(s)://user:pass@host:9200node-URL shape used by the official clients, with no fabricated database/index path. - RabbitMQ / AMQP (new) — the real
amqp://user:pass@host:5672/vhostshape from RabbitMQ's own URI spec; the default vhost/is correctly percent-encoded as%2Fwhen present (encodeURIComponenthandles this generically, the same way every other field is encoded):amqps://guest:guest@rabbit.example.com:5671/%2F?heartbeat=60 - Redis with a real password/DB-index form —
redis://:password@host:port/0(no username, leading:— the documented pre-ACL/password-only form) alongside the standardusername:passwordACL form, plusrediss://for TLS. - Correct URL-encoding — usernames, passwords and virtual-host/vhost names are run through
encodeURIComponent(which also correctly escapes/to%2F), while the structural:and@separators are left untouched. - JDBC form for MySQL — optionally emits the
jdbc:mysql://host:port/db?user=...&password=...form used by Java database drivers. - Reverse mode — paste any supported connection string (including
jdbc:mysql://…and multi-host MongoDB replica sets) and it parses host, port, database, username, password, SSL/TLS state, pool params and extra query parameters back into the form, auto-detecting the driver and any scheme variant (postgres,mongodb+srv,rediss,https,amqps). See TESTS.md for traced round-trip examples covering every driver. - Password masking — the generated string masks the password by default; a reveal toggle shows it, and Copy always copies the real, unmasked value.
- Extra parameters — a simple
key=value-per-line box becomes a properly-encoded query string; it never collides with the structured SSL/pool params (the structured value always wins over a manually-typed duplicate key). - Privacy-first persistence — non-sensitive fields (including SSL/pool toggles and values) are restored on your next visit via
localStorage; passwords are never persisted. - Dark & light themes, fully responsive down to 360px, accessible, and keyboard-driven.
- 100% client-side — there are no network calls anywhere in this tool. Safe to use with real credentials on your own machine.
No dependencies, no build step.
git clone https://github.com/kasapdev/db-connection-string-builder-pro.git
cd db-connection-string-builder-proThen simply open index.html in any modern browser (double-click it, or file:// it). That's it.
- Pick a driver tab: MySQL, PostgreSQL, MongoDB, Redis, Elasticsearch, or RabbitMQ.
- Fill in host, port, database (DB index for Redis, virtual host for RabbitMQ, none for Elasticsearch), username, password, and any extra parameters.
- Toggle driver-specific options as needed — JDBC form for MySQL, the
postgres://alias,mongodb+srv://or a replica set for MongoDB, SSL/TLS, and pooling/connection-tuning params where the driver supports them. - Copy the generated connection string with the Copy connection string button — it always copies the real, unmasked value.
- To reverse-engineer an existing string, paste it into the Reverse mode field and click Parse (or press Ctrl/⌘+Enter while focused there).
| Action | Shortcut |
|---|---|
| Parse pasted string (reverse field) | Ctrl/⌘ + Enter |
| Show shortcuts help | ? |
| Close dialog | Esc |
Screenshots coming soon.
- Multi-host support for MongoDB replica set strings
- SQLite / SQL Server / Oracle connection string formats
- .env file export (
DB_HOST=,DB_PORT=, …) alongside the URI - Connection string strength/sanity linting (missing password, default ports, etc.)
MIT Licensed. Part of the Web Utility Suite.
One of 45+ zero-dependency vanilla JS tools, all free and open source — see the full list.