Skip to content
Monghoul
Free tool · Runs in your browser

MongoDB Connection String Parser

Paste any mongodb:// or mongodb+srv:// URI for a clean breakdown of user, hosts, database, and every option. With warnings for missing TLS, deprecated flags, and other silent footguns.

Paste a MongoDB connection string
Accepts mongodb:// and mongodb+srv:// URIs. Credentials, options, and warnings are decoded locally — nothing leaves your browser.
Try a sample
Paste a connection string above to see each component parsed.

What the parser checks for

Missing TLS on a remote host

Plain mongodb:// to any non-localhost address is flagged. Credentials in cleartext is the fastest way to compromise a cluster.

Deprecated ssl option

The ssl= option was renamed to tls= years ago. Drivers still accept it but newer documentation no longer mentions it.

Explicit port on +srv

mongodb+srv:// gets the port from DNS SRV records. Adding :27017 to the host either errors or is silently ignored, depending on the driver.

Multiple hosts with +srv

+srv accepts exactly one hostname. The SRV record is what resolves to many. Multi-host SRV URIs are a common copy-paste mistake.

authSource assumption

If you have a username and a /database but no authSource, the driver will authenticate against the listed database, not admin. Often wrong.

Password in URI

Any non-empty password triggers a reminder not to paste the URI into chat, screenshots, or source-controlled configuration files.

Frequently asked questions

What is a MongoDB connection string?

A URI the driver uses to find and authenticate to a MongoDB cluster. It encodes the scheme (mongodb:// or mongodb+srv://), credentials, one or more hosts, an optional database name, and query-string options like replicaSet, tls, readPreference, retryWrites, and authSource.

mongodb:// vs mongodb+srv://, which should I use?

mongodb+srv:// is what Atlas hands you. The driver does an SRV lookup to discover cluster members from a single hostname, and TLS is on by default. Use mongodb:// when you have a fixed list of hosts (your own replica set) or when DNS SRV isn't an option.

What is authSource and when do I need it?

authSource tells MongoDB which database holds the user account. It defaults to the database in the URI path, or admin if none is set. If you put /shop in the URI but the user lives in admin, authentication will fail unless you add authSource=admin.

Why does the parser warn about missing TLS?

By default, mongodb:// connects without TLS. That's fine for localhost but catastrophic for a remote cluster, because credentials and query data travel in cleartext. Add tls=true to the options, or switch to mongodb+srv:// which implies TLS.

Is the password ever sent anywhere?

No. Parsing happens entirely in your browser. The password is decoded locally, masked by default, and can be revealed only by clicking Show. Still, treat any connection string with embedded credentials like a secret.

Can I use special characters in the username or password?

Yes, but you must percent-encode them. @ becomes %40, : becomes %3A, / becomes %2F, # becomes %23, and so on. The parser decodes these for display. If the URI doesn't encode the characters properly, the driver may parse auth boundaries incorrectly.

Manage a lot of connection strings?

Monghoul stores connections in an organized tree, with folders, favourites, and color coding. The connection-string import handles every option this parser recognizes.

Download Monghoul