parse-mongo-url

JSON →
library 1.1.1 ·javascript abandoned
verified Jun 5, 2026

Parses MongoDB connection strings into structured objects. Based on the url_parser.js from the MongoDB Node.js native driver v2.0. Version 1.1.1 is stable but has no recent updates (last release in 2017). Lightweight with zero dependencies. Provides a simple API to extract hosts, database name, authentication, and options from MongoDB URIs. Suitable for legacy projects, but for new code consider using the official mongodb driver's built-in parsing or the `mongodb-connection-string-url` package.