MongoDB Node Driver
Introduction
Welcome to the documentation site for the official MongoDB Node.js driver. You can add the driver to your application to work with MongoDB in JavaScript or TypeScript. For more information about downloading and installing the Node.js driver, see Download and Install in the Get Started guide.
You can connect using the Node.js driver for deployments hosted in the following environments:
MongoDB Atlas: The fully managed service for MongoDB deployments in the cloud
MongoDB Enterprise: The subscription-based, self-managed version of MongoDB
MongoDB Community: The source-available, free-to-use, and self-managed version of MongoDB
Get Started
Learn how to establish a connection to MongoDB Atlas and begin working with data in the step-by-step Get Started tutorial.
Connect to MongoDB
Learn how to create and configure a connection to a MongoDB deployment in the Connect to MongoDB section.
Databases and Collections
Learn how to interact wth MongoDB databases and collections in the Databases and Collections section.
Read and Write Data
Learn how to find, update, and delete data in the CRUD Operations section.
Transform Your Data with Aggregation
Learn how to use the Node.js driver to perform aggregation operations in the Aggregation section.
Data Formats
Learn how to work with BSON and other data formats in the Specialized Data Formats section.
Optimize Queries with Indexes
Learn how to work with common types of indexes in the Indexes on Collections section.
Run a Database Command
Learn how to run a database command in the Run a Command section.
Atlas Search
Learn how to run Atlas Search queries in the Run an Atlas Search Query section.
Atlas Vector Search
Learn how to run Atlas Vector Search queries in the Run an Atlas Vector Search Query section.
Monitoring and Logging
Learn how to monitor changes to your application and write them to logs in the node-monitoring-and-logging section.
Secure Your Data
Learn about ways you can authenticate your application and encrypt your data in the Secure Your Data section.
Reference
Find more information about Node.js driver versions, compatibility, and third-party tools in the Reference section.
API Documentation
For detailed information about classes and methods in the MongoDB Node.js driver, see the MongoDB Node.js driver API documentation.
Issues & Help
Learn how to report bugs, contribute to the driver, and to find help in the Issues & Help section.
Related Tools and Libraries
Object Document Mappers
MongoDB and our partners provide several object-document mappers (ODMs) for Node.js that let developers work with MongoDB data as objects. One popular ODM is Mongoose, which helps enforce a semi-rigid schema at the application level and provides features to assist with data modeling and manipulation. Prisma, another ODM, helps ensure data consistency by offering a type-safe database client and an intuitive schema.
For more information about using ODMs with MongoDB, see the following resources:
Packages
You can install the following packages to expand the functionality of the Node.js driver:
Package | Description |
---|---|
BSON serialization and deserialization library used by the official
MongoDB Node.js driver | |
C++ extension for Node.js that provides support for Kerberos authentication | |
Library for client-side encryption functionality | |
Legacy Node.js driver with optional callback support | |
Zstandard compression library for Node.js |
For information about each package's version compatibility, see the Component Support Matrix in the Node.js driver Github repository.
Learn
Visit the Developer Hub and MongoDB University to learn more about the Node.js driver.
Developer Hub
The Developer Hub provides tutorials and social engagement for developers.
To learn how to use MongoDB features with the Node.js driver, see the How To's and Articles page.
To ask questions and engage in discussions with fellow developers using the Node.js driver, see the Developer Community forums.
MongoDB University
MongoDB University provides free courses to teach everyone how to use MongoDB.
Take the Following Free Online Courses Taught by MongoDB Instructors
![]() | Learn the essentials of Node.js application development with MongoDB. |
![]() | MongoDB Node.js Developer Path Gain a comprehensive understanding of Node.js application development, complex operations, interactions with MongoDB Atlas datasets, and more. |