Free tool
Turn a DATABASE_URL into config.
Paste a Postgres, MySQL, MongoDB or Redis URL. Get its parts, the settings for your framework, and the commands to move the database to another server.
This page reads it in your browser and sends nothing you paste anywhere.
What's in a database URL
A database URL holds a whole connection in one line, in the shape scheme://user:password@host:port/database?options. Hosts such as Railway, Heroku, Render, Supabase and Neon hand you one as DATABASE_URL. The scheme names the engine. postgres:// and postgresql:// are the same, mongodb+srv:// finds its servers through DNS, and rediss:// is Redis over TLS.
Most frameworks can read the URL as it is. Laravel reads it from DB_URL, Rails from DATABASE_URL, Prisma and node-postgres take it whole, and Django reads it through the dj-database-url package. Laravel, Django and Rails also take the parts one by one, and the converter writes those settings so you can see which value goes where.
Options after the ?, such as sslmode=require, carry over where the framework has a setting for them. Rails takes all of them. Django's OPTIONS takes the ones libpq or mysqlclient knows. node-postgres takes sslmode, application_name and options. Prisma keeps the whole URL. Laravel gets a line to add for sslmode. The converter names any option it leaves out.
Pooled and direct connections
Supabase lists four ways to connect to one database: direct, its shared pooler in session mode, the same pooler in transaction mode, and a dedicated pooler. Neon gives you two URLs, pooled and direct. A pooled URL shares a small set of server connections between many clients, which suits serverless functions that open a connection per request. A direct URL connects each client straight to Postgres, with no pooler between. In transaction mode a pooler hands the server connection back after every transaction, so a migration tool or pg_dump that expects one session from start to finish needs the direct URL. The converter names the mode when it recognises the host, and writes the direct URL for a Neon or Supabase transaction-mode pooled one. Supabase's direct host is IPv6 unless the project has the IPv4 add-on. From an IPv4-only network, use session mode on port 5432 of the pooler host instead.
Moving the database
The move commands dump the old database to a file and load it into the new one. They only name the variables DATABASE_URL and NEW_DATABASE_URL. To set the first, type read -rs DATABASE_URL; export DATABASE_URL, press Enter and paste the old URL. Then do the same for NEW_DATABASE_URL with the new one. For Postgres that's the new database's direct or session-mode URL, since pg_restore can't run through a transaction pooler. For a Neon or Supabase transaction-mode pooled URL the dump reads DIRECT_URL instead, and the converter shows the direct URL to paste into it. read -s doesn't echo what you paste, and the URL never appears in a command, so your shell history doesn't save it. The MySQL commands ask for the password instead, and the database you restore into must already exist. Put the new server's host, port and user in place of NEW_HOST, NEW_PORT and NEW_USER. mysqldump's --events needs the EVENT privilege, so if the dump stops with error 1044, grant it or drop --events. Dumped routines and events keep their DEFINER clauses, and restoring them on managed MySQL may need SUPER, SET_USER_ID, or SET_ANY_DEFINER on MySQL 8.2 and later. The app should stop writing while the dump runs, or the new copy misses whatever came in after it started. For Redis the converter writes a redis-cli --rdb snapshot command, and the Redis answer above covers a switch by replication. A Redis URL with a password and no user gets default as its user, because redis-cli 6 and 7 refuse the empty one.
Questions
Is the URL I paste sent anywhere?
No. The page reads it in your browser and makes no request with it. The box hides the password in the results only, not in the URL you pasted, and the copy buttons still copy the real value.
How do I put special characters in a database URL password?
Percent-encode them: @ is %40, # is %23, / is %2F, : is %3A and a space is %20. PostgreSQL's connection URI rules require it for any character that means something in a URL. The converter decodes them, because framework config takes the raw password.
What's the difference between port 6543 and 5432 on Supabase?
On a pooler.supabase.com host, 6543 is the pooler in transaction mode and 5432 is the pooler in session mode. On a db.<ref>.supabase.co host, 5432 connects straight to the database and 6543 goes through its dedicated pooler. Transaction mode keeps no session state or prepared statements, so run migrations over a direct or session connection.
What does -pooler mean in a Neon host name?
It sends the connection through Neon's PgBouncer in transaction mode. Take -pooler out of the endpoint ID for a direct connection, which Neon recommends for migrations and pg_dump.
How do I move a Postgres database to another server?
Dump it with pg_dump -Fc, then load it into the new database with pg_restore --no-owner --no-acl. The converter writes both commands from your URL. The two pg_restore flags leave out the old server's owners and grants, so the restore works when the user names differ. Run both over a direct connection.
How do I move a Redis database to another server?
Run redis-cli --rdb dump.rdb against the old server to save a snapshot, and put the file in the new server's data directory before it starts. The snapshot holds the whole instance, every logical database included, not only the one the URL selects. To switch with the old server still live, run REPLICAOF with the old host and port on the new server. REPLICAOF also copies the whole instance, every logical database included, and replaces all the data already on the new server. Set masterauth first if the old server has a password, and masteruser too if the URL names an ACL user other than default. For a rediss:// server, also set tls-replication yes and give the new server its own TLS certificate settings. Wait until INFO replication shows master_link_status:up, stop writes to the old server, and check that the new server's slave_repl_offset matches the old server's master_repl_offset. Then run REPLICAOF NO ONE and point the app at the new server.
Why is there no port in a mongodb+srv URL?
A mongodb+srv URL names one host, and the driver looks up the servers and their ports in that host's DNS SRV record. The +srv form also turns TLS on.
Sources
- RFC 3986: percent-encoding
- RFC 6335: port numbers
- PostgreSQL: connection URIs (libpq)
- Supabase: connecting to Postgres
- Neon: connection pooling
- MySQL: port reference
- Redis: configuration
- MongoDB: connection string formats
- Laravel: database configuration
- dj-database-url
- Django: the DATABASES setting
- Rails: configuring a database
- Prisma: connection URLs
- node-postgres: Pool
- PostgreSQL: pg_dump
- PostgreSQL: pg_restore
- MySQL: mysqldump
- MongoDB: mongodump
- MongoDB: mongorestore
- Redis: redis-cli
- Redis: REPLICAOF
- Redis: replication
- Redis: INFO
Database backups on another of your servers, included
See how it worksFacts checked 2026-10-16.