Connection String Builder
Build or parse PostgreSQL, MySQL, MongoDB, Redis, SQL Server and JDBC connection strings with correct percent-encoding — entirely on this device.
Nothing here connects to a database. This page assembles and reads text — no connection is attempted, and the string never leaves this tab.
Connection string
Fill in the form and press Build string.
The password is shown as MASKED until you reveal it — the masked text is a display, not a working string. Reveal the password to copy or download the working string.
The revealed string carries the password in clear text. Anywhere you paste it — shell history, CI logs, chat — can read it back.
The engine reported nothing about this string.
Parsed fields
Paste a string and press Parse string.
The engine reported nothing about this string.
Press ? for shortcuts · The password is never put in a link, never saved on this device and never part of a shared state — the saved shape has no field for it. Close this tab and it is gone.
Do it offline:$ psql "postgresql://app_user@db.example.internal:5432/orders?sslmode=require"
How to use it
- Pick the database family. The form shows that family's fields, and the port field shows the default as a placeholder — it is never written into the string unless you type it.
- Fill in the host, database and credentials. Password characters that would break a URI — @, :, /, ?, # or a space — are percent-encoded for you, and a note says when that happened.
- Press Build string. The card shows the string with MASKED in the password slot; reveal it deliberately before Copy or Download will hand over the real one.
- For the other direction, open the Parse tab and paste any supported spelling — URI, libpq key=value, ADO.NET or JDBC — to read the fields back as a table, password masked.
Fill in host, port, database, user and password, and get a Postgres connection string with every reserved character percent-encoded — or pick MySQL, MongoDB, Redis, SQL Server or SQLite for that family's form, with JDBC and libpq spellings beside it. A second tab reads a pasted string back into its fields. No connection is attempted, and the password stays out of links and storage.
Examples
Postgres · password with : @ and /postgresql://app_user:RE%3ADACT%40D%2Fpw@db.example.internal:5432/orders?sslmode=requireThe placeholder password RE:DACT@D/pw carries the three bytes that break naive strings; they leave as %3A, %40 and %2F, and libpq decodes them back before authenticating.
Parse a MongoDB replica-set seed listmongodb://app_user@db1.example.internal:27017,db2.example.internal:27018/app?replicaSet=rs0Parsing splits the two seed hosts, the auth database and the replicaSet parameter into fields, and rebuilding from those fields returns this exact string — the byte-stable round trip is the proof the parse was faithful.
SQL Server · ADO.NET beside JDBCServer=db.example.internal,1433;Database=crm;User ID=svc_user;Password="p;ss word";Encrypt=true
jdbc:sqlserver://db.example.internal:1433;databaseName=crm;user=svc_user;password={p;ss word};encrypt=trueTwo escape systems for the same parameters: ADO.NET wraps the semicolon-bearing password in double quotes, the JDBC URL wraps it in braces. Neither percent-encodes anything — that is a URI rule, and neither of these is a URI.
Redis over TLS · database index 2rediss://:RE-DACTED-pw@cache.example.internal:6380/2rediss:// is the TLS scheme; plain redis:// is the other. With no user before the colon this is the classic requirepass form, and the trailing /2 selects database index 2 — Redis names databases by number.
Every example on this page is executed against the same engine that powers the tool, on every build.
Gotchas worth knowing
Why @ in a password breaks a naive string
A URI splits userinfo from host at the last @, user from password at the first colon, and path from query at ? — a raw @, :, /, ? or # inside a password moves a boundary, and the client logs in as the wrong user against the wrong host. RFC 3986 §2.1 defines the escape the builder applies; the parser warns when a paste carries those bytes raw.
mongodb+srv is one host and no port, by definition
The +srv form names a single DNS record; the driver reads SRV entries for the member list and a TXT record for options at connect time. That is why a port or a second host is refused rather than written. The standard seed list — every member spelled out, comma-separated — is the form when you do not control DNS. Nothing is resolved on this page.
The JDBC SQL Server URL is not a URI
jdbc:sqlserver:// looks like a URI but escapes like a properties list: values carrying ; = or a space are wrapped in braces, and a literal } cannot be represented at all — in that one case the JDBC row is omitted with a note instead of shipping a string the driver would misread.
IPv6 hosts wear brackets in URIs, none in key=value forms
In a URI the colon separates host from port, so ::1 must be written [::1] — the builder brackets it and the parser refuses an unbracketed one with the fix named. libpq key=value syntax has no port-colon, so host=::1 goes bare there.
What this page will not do
It never opens a connection — a test button would mean sending your credentials somewhere. The password never rides a share link, this device's storage or a downloaded state file; the saved shape has no field for it. A password inside any URL is readable wherever that URL lands, so for anything real, prefer an environment variable or a secret manager.
Common errors
"oracle" is not a scheme this tool reads. It reads postgresql://, postgres://, mysql://, mongodb://, mongodb+srv://, redis://, rediss://, sqlite:, jdbc:postgresql://, jdbc:mysql:// and jdbc:sqlserver:// strings, libpq key=value lists and ADO.NET Server=…;Database=… strings.- The parse tab names everything it can read, so an unsupported paste fails loudly instead of half-parsing.
The host contains a colon — put the port in the Port field, or write an IPv6 address in brackets, as [::1].- host:5432 pasted whole into the host field is the most common slip; the port has its own field.
A mongodb+srv:// string cannot carry a port — the port comes from the DNS SRV record. Remove the port, or switch to the standard seed-list form.- The srv checkbox and the port field exclude each other by specification, not preference.
FAQ
Is my password sent or stored anywhere when I build a string?
No. Nothing on this page opens a connection or makes a request — the string is assembled in this tab and handed to you. The saved state a share link or the local restore carries has no password field at all, so it cannot ride along even by accident. Closing the tab discards it.
Which form do I need — URI, key=value, or JDBC?
Application frameworks and libpq-based tools usually take the URI; psql equally accepts the key=value spelling, which reads better in configuration files. Java needs the jdbc: form, and .NET takes the ADO.NET semicolon list. The card prints the alternates it can derive from the same fields, so each consumer gets its own spelling.
Why is the port missing from the string I built?
Because you left the port field empty, and this builder never writes a value you did not give it. Every client knows its family's default — 5432 for Postgres, 3306 for MySQL, 27017 for MongoDB, 6379 for Redis, 1433 for SQL Server — so a portless string connects to the default, and a note under the card names the number.
Keyboard shortcuts
- ⌘/Ctrl + Enter
- Build or parse with the current input.
- ⌘/Ctrl + Shift + C
- Copy the built connection string.
- ? or ⌘/Ctrl + /
- Open the shortcut help overlay.
- t
- Cycle theme.
- Esc
- Close the overlay and refocus the form.