Connection String Parser & Builder.
Parse database URLs, JDBC, PDO DSN and ADO.NET strings, or build them, for Postgres, MySQL, SQL Server, MongoDB, Redis.
Runs in your browserAbout Connection String Parser & Builder
Connection String Parser & Builder reads a database connection string in any of the common shapes and shows what is inside it: engine, hosts, port, database, user name, password and extra options. It accepts URIs such as postgres://, mysql://, mongodb:// and mongodb+srv:// with several hosts, redis:// and rediss://, amqp:// for RabbitMQ, JDBC URLs including SQL Server's semicolon form, PHP PDO DSNs, ADO.NET key=value strings with quoted values, and libpq keyword strings. It then writes the same connection back out in the other formats your stack may need: a URI, a JDBC URL, a PDO DSN, ADO.NET for Npgsql, MySQL or SQL Server, libpq keywords and the DB_ or REDIS_ lines of a Laravel .env file. Build mode does the reverse from separate fields. Percent-encoding is the most common source of trouble: a password like p@ss/w0rd must be written p%40ss%2Fw0rd inside a URI, otherwise drivers split the string at the wrong @ or slash. The parser decodes such escapes, warns when credentials contain characters that should have been encoded, and the builder encodes them for you. Other traps it flags are a port on a mongodb+srv URI, which is not allowed, and a non-numeric Redis database. Defaults are filled in when a port is missing, for example 5432 for PostgreSQL. Because connection strings hold passwords, this tool is marked sensitive: the input is never put in the page link or history, and all processing happens in your browser with no network requests.
How to Use
- Paste a connection string in parse mode, or switch to build mode and fill in host, database and credentials.
- Check the components, including decoded credentials and options, and any notes about encoding problems.
- Copy the format you need from the formats table, such as JDBC or Laravel .env.
Frequently Asked Questions
Why does my password break the connection URL?
Characters such as @, /, :, ? and
Which formats can it read?
Database URIs (PostgreSQL, MySQL, MariaDB, SQL Server, MongoDB including +srv, Redis, AMQP), JDBC URLs, PHP PDO DSNs, ADO.NET key=value strings and PostgreSQL libpq keyword strings.
Why is an ADO.NET string read as SQL Server?
SQL Server and MySQL Connector/NET use the same Server=…;Database=… style, so the parser cannot tell them apart. Strings with Host= or Username= are read as Npgsql (PostgreSQL). Use build mode to choose MySQL explicitly.
Is my password stored or sent anywhere?
No. The tool runs in your browser, makes no network requests, and as a sensitive tool it never writes your input into the URL or browser history.
Related Tools
Encode and decode URL components.
Split AWS ARNs into partition, service, region, account and resource, or build an IAM policy statement.
Pretty print, minify, and validate JSON.
Format and beautify SQL queries.
Encode and decode Base64 strings.
Build a Conventional Commits message with scope, body, breaking change and footers, plus the git command.