Parse a database DSN into scheme, host, port, credentials, path, and options.
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.
URI delimiters split scheme, authority, credentials, host, port, path, and query parameters; percent-encoded components are decoded at field boundaries. Driver aliases are mapped to normalized fields.
mysql:host=localhost;port=3306;dbname=myapp;charset=utf8mb4
Driver: mysql Host: localhost Port: 3306 Database: myapp Charset: utf8mb4 Format: php-pdo PARAMETERS Host: localhost Port: 3306 Dbname: myapp Charset: utf8mb4
DATABASE_URL parsing, migration dashboards, and secret scanners parse DSNs.