Pick your database engine and fill in the details to get both a native URI and a JDBC URL (plus ADO.NET for SQL Server). Correct default ports and SSL options per engine. Nothing leaves your browser.
Connecting to a SQL database requires a well-formed connection string. The exact shape depends on the engine and the driver, a JDBC URL for Java, a native URI for many languages, or an ADO.NET string for .NET. This guide explains the structure, components, and common options, using PostgreSQL as the primary example.
A connection string is a single string that tells a database driver how to connect: the server's location, the database name, credentials, and connection options. Java applications typically use a JDBC URL; other ecosystems use a URI or an ADO.NET-style string. This tool generates all of the relevant forms for each engine.
jdbc:postgresql://[host]:[port]/[database]?key1=value1&key2=value2
jdbc:, marks this as a JDBC URL.postgresql, the database type (the sub-protocol / driver).[host], the hostname or IP address of the server.[port], the server port; PostgreSQL defaults to 5432.[database], the name of the database to connect to.key=value pairs.jdbc:postgresql://localhost:5432/mydb?user=myuser&password=mypassword&ssl=true
This connects to the mydb database on localhost as myuser over an SSL connection.
5432, JDBC jdbc:postgresql://, URI postgresql://.3306, JDBC jdbc:mysql:// / jdbc:mariadb://.1433, JDBC jdbc:sqlserver://host:port;databaseName=… (semicolon-separated), plus an ADO.NET form.1521, JDBC jdbc:oracle:thin:@//host:port/service (uses a service name, not a database name).jdbc:sqlite:/path/to/database.db.user, the username to authenticate with.password, the password for authentication.ssl, enable SSL/TLS (true or false).sslmode (PostgreSQL), disable, require, verify-ca, or verify-full.sslMode (MySQL) / encrypt (SQL Server), the equivalent per-engine encryption controls.connectTimeout, maximum time to wait for a connection to be established.socketTimeout, maximum time to wait for data on a socket.applicationName, a name for your app, useful in server-side logs and monitoring.currentSchema, the default schema to use for the connection.localhost for a local database or the server's IP/hostname for a remote one, and confirm the port matches the server's configuration.ssl=true and an appropriate sslmode (e.g. verify-full).psql or a GUI before wiring it into your app.A JDBC URL is prefixed with jdbc: and is consumed by Java's JDBC drivers. A native URI (e.g. postgresql://…) is what many non-Java languages and libraries expect. They carry the same information in slightly different syntax, this tool generates both.
No, a connection string targets a single database. To use several databases you create separate connection strings and connections.
PostgreSQL 5432, MySQL/MariaDB 3306, SQL Server 1433, Oracle 1521. SQLite is file-based and has no port. If your server uses a custom port, set it explicitly.
Confirm the host, port, and credentials, check that firewalls/security groups allow access, and enable verbose logging in your driver or database server to see the underlying error.
VisuaLeaf
VisuaLeaf connects to PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, SQLite and more, with a visual query builder, schema diagrams, charts, and a query profiler. The same modern client also speaks MongoDB.