Database URL Parser

See what every part of a database connection string means

Examples:

Connects to PostgreSQL database shop on db.example.com:5432 as app_user, encrypted with TLS.

Connection

Scheme
postgresql

Tells the client which database to talk to: PostgreSQL.

Username
app_user

The database user to log in as. Its permissions decide what this connection can do.

Password
••••••••

The password for that user, shown decoded.

Host
db.example.com

The server's address: a host name or IP address.

Port
5432

The network port the server listens on.

Database
shop

The database to open on the server.

Options

sslmode
require

How strictly to use TLS encryption. require: Always use TLS, but don't check the server's certificate.

connect_timeout
10

How long to wait for the connection to open, in seconds.

application_name
checkout

A label for this client, shown in the server's list of connections.

Database URL Parser guide

Most apps get their database from a single connection URL, usually in a DATABASE_URL environment variable. That one line packs in the database type, the login, the server, the database name, and a string of driver options. The Database URL Parser splits it into labelled rows and explains each one, so you can check where an app is pointed before it connects.

Example

A typical PostgreSQL URL. The next section takes it apart.

postgresql://app_user:s3cret@db.example.com:5432/shop?sslmode=require

What each part means

  • Scheme. postgresql:// names the database engine, which tells the client which protocol to speak. A jdbc: prefix marks a Java URL, and a +driver suffix, as in postgresql+psycopg2, names the library SQLAlchemy should use.
  • Username and password. app_user and s3cret, the login. The password is hidden on screen until you click Show.
  • Host and port. db.example.com is the server, and 5432 is the port it listens on. When the URL leaves the port out, the parser shows the engine's default, such as 3306 for MySQL or 6379 for Redis.
  • Database. shop, the database to open. For Redis it is a number from 0 to 15, and for SQLite the whole URL is a file path.
  • Options. Everything after the ?. sslmode=require turns on TLS encryption. The parser explains the common options for each driver, such as connect_timeout, authSource, replicaSet, and charset.

Special characters in passwords

Inside a URL, @ separates the login from the host, / starts the database name, and # starts a fragment. A password that contains one of these raw breaks the URL for most drivers, often with a confusing error about an unknown host. Percent-encode them: @ becomes %40, / becomes %2F, and # becomes %23. The parser reads the password up to the last @ and warns you when it finds a raw character.

When it helps

  • Checking that a deploy points at the right database and host before you run a migration.
  • Debugging a connection that fails, by confirming the port, database name, and TLS settings.
  • Reading a MongoDB Atlas or other hosted database string to see which options it sets.
  • Turning a JDBC or SQLAlchemy URL into the plain host, port, and database a GUI client asks for.

Frequently asked questions

What does the Database URL Parser do?
It splits a database connection URL into its parts - scheme, username, password, host, port, database, and options - and explains in plain words what each one does, with a one-line summary of where the URL connects.
Which databases does it understand?
PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, CockroachDB, MongoDB (including mongodb+srv), Redis, and SQLite. It also reads JDBC URLs, SQLAlchemy dialect+driver schemes like postgresql+psycopg2, and a pasted .env line such as DATABASE_URL="...".
Why does my connection fail when the password has special characters?
Characters like @, /, and # have a meaning inside a URL, so a raw @ in the password makes many drivers read the wrong host. Percent-encode them: @ becomes %40, / becomes %2F, and # becomes %23. The parser warns you when it spots one.
Is it safe to paste a URL with a real password?
Parsing happens entirely in your browser and nothing is sent anywhere. The password is hidden on screen until you click Show, so it stays private if you are sharing your screen.