Build connection string

Create a database connection string with host, credentials, TLS, and driver options.

freeworks offlinenothing uploaded
ToolConnection String Builder
Input
Output
Put this on your own site

The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.

Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.

Preview

How it works

Driver, host, port, database, user, password, TLS, and extra options are serialized into the selected key-value or URI syntax. Values containing separators are quoted or percent-encoded for that format.

  • Driver defaults are starting hints, not server guarantees.
  • Driver-specific options remain explicit.

Worked example

PostgreSQL Connection URI
Build a PostgreSQL connection URI with credentials and SSL
Input
											Driver: postgresql
Host: db.example.com
Port: 5432
Database: myapp
Username: admin
Password: secret
SSL: true
										
Output
												postgresql://admin:[email protected]/myapp?sslmode=require
											

When to use this

Application secrets, migration tools, and local database READMEs build connection strings.

Edge cases

  • @ or # in URI passwords must be encoded.
  • IPv6 hosts need brackets in a URI authority.
  • TLS options differ between drivers.

References