Connection String Builder
Fill in the fields to build a valid connection string, or paste one to break it into its parts. Works for PostgreSQL, MySQL, MongoDB, Redis, SQL Server, and more.
Enter a host.
¿Qué es Connection String Builder?
A database connection string packs the host, port, credentials, database name, and driver options a client needs to connect into one line — and every database uses its own format for that line. Most follow a URI shape (scheme://user:password@host:port/database?options), but the exact scheme, default port, SSL flag, and even the shape itself vary: PostgreSQL, MySQL, MongoDB, and Redis are URI-based, while SQL Server traditionally uses ADO.NET-style Key=Value; pairs instead. This tool works both directions — fill in the individual fields (host, port, database, credentials, SSL, extra options) to build a valid connection string for PostgreSQL, MySQL, MongoDB, Redis, SQL Server, or any custom URI scheme, or paste an existing connection string to break it apart into those same fields for editing.
Cómo usar Connection String Builder
- Switch to the Build tab (the default) and pick a database type from the dropdown.
- Fill in host, port (leave blank to use the dialect's default), database, username, and password as needed.
- Toggle Use SSL/TLS if the connection needs encryption — it sets the right flag or scheme for the selected database.
- For MongoDB, optionally toggle mongodb+srv for the Atlas-style DNS-seedlist form, which omits the port.
- Copy the generated connection string from the box at the bottom, or switch to the Parse tab and paste an existing string to break it back into editable fields.
Ejemplos
PostgreSQL, built from fields
Entrada: host=localhost, database=mydb, user=app, password=secret, ssl=on
Salida: postgresql://app:secret@localhost:5432/mydb?sslmode=require
MongoDB Atlas (+srv), built from fields
Entrada: host=cluster0.mongodb.net, database=mydb, user=app, password=secret, srv=on
Salida: mongodb+srv://app:secret@cluster0.mongodb.net/mydb
SQL Server, built from fields
Entrada: host=sql.internal, database=mydb, user=sa, password=secret
Salida: Server=sql.internal,1433;Database=mydb;User Id=sa;Password=secret;Encrypt=False;
Parsing an existing string
Entrada: redis://:mypassword@cache.internal:6379/0
Salida: host=cache.internal, port=6379, database=0, password=mypassword
Errores comunes
- Pasting a password containing @, :, or / directly into a manually-typed connection string without encoding it — the URI parser reads those characters as structural, not literal. Build the string here instead so encoding happens automatically.
- Forgetting that mongodb+srv:// omits the port entirely — adding one manually is invalid for that form.
- Assuming every driver uses the same SSL query parameter name — sslmode, ssl, and tls are all real conventions used by different databases and even different drivers for the same database; verify against your specific driver if the connection silently ignores your SSL setting.
- Treating a SQL Server ADO.NET string as a URI (or vice versa) — they are genuinely different formats, not just different field names in the same shape.
Por qué usar esta herramienta
- Both directions in one tool: build from fields, or parse an existing string back into editable fields.
- Covers PostgreSQL, MySQL, MongoDB (including +srv), Redis (including TLS via rediss://), SQL Server, and any custom URI scheme.
- Automatic percent-encoding of credentials for the URI-based dialects, so special characters never break the string.
- Runs entirely client-side — a connection string containing a live password never leaves your browser.