What is a connection string and when do you parse one?
A connection string (a text config describing how to connect to a database) is a one-line URL that encodes: the database protocol, user, password, server address, port, database name, and optional parameters such as SSL. It looks like: `postgresql://user:pass@host:5432/dbname?sslmode=require`.
This tool does three things: 1. Parses a pasted URL into individual fields: user, password (masked, click to reveal), host, port, database, parameters. Each field has its own "Copy" button. 2. Builds a URL from a form, when you have the parts separately and want to assemble. 3. Converts between the URL format and the `key=value` format used by `psql` and `mysql` on the command line: `host=localhost port=5432 user=ada`.
Supports PostgreSQL, MySQL, MariaDB, MongoDB (including SRV and replica sets), Redis (TLS), SQL Server, Oracle, and JDBC strings with the `jdbc:` prefix.
How to use it
- Pick a mode: Parse (URL to fields), Build (form to URL), or Key=Value Format (psql/mysql style).
- In Parse mode, paste your connection string. Fields appear automatically. Click the eye icon to reveal the password, the copy icon to copy a single field.
- In Build mode, fill in the form: protocol, user, password, host, port, database, parameters. The URL assembles itself.
- In Key=Value mode, paste a `host=... port=... user=...` line and get the same connection string as a URL.
- Every field has its own Copy button. The full URL has a bigger button next to it.
- The SSL row tells you if SSL/TLS is detected in the parameters. Keys: `sslmode=require`, `ssl=true`, `tls=true`, etc. "Off" means `sslmode=disable` or no param at all.
When this is useful
Common scenarios:
- Onboarding a new dev on the team. You get a connection string in Slack from Heroku/Render/Supabase and need to break it apart to configure local tools (TablePlus, DBeaver, pgcli).
- Migrating a string between formats. An ORM (Prisma, Drizzle) wants a URL, the `psql` command line wants `host=... port=...`. Or vice versa. The converter goes both ways.
- Checking that a password is correctly URL-encoded. A password with `@`, `:`, `/`, `?` must be URL-encoded in a connection string. The parser decodes, the builder encodes.
- Setting up JDBC in Java/Kotlin/Scala apps. JDBC strings have a `jdbc:` prefix that other tools do not understand. The converter adds and removes it.
- MongoDB replica sets. Strings like `mongodb://user:pass@a,b,c/db?replicaSet=rs0` have multiple hosts, the parser lists them all.
- Debugging a broken connection. Paste, see that the typo is in the hostname or the slash before the database name is missing.
If you also work with SQL, see the SQL formatter or the SQL dialect converter.