The database for
modern applications

MongoDB is a general purpose, document-based, distributed database built for modern application developers and for the cloud era.

No database makes you more productive.

Try MongoDB free in the cloud!
Used by millions of developers to power the world's most innovative products and services
THE DOCUMENT MODEL

As a programmer, you think in objects. Now your database does too.

MongoDB is a document database, which means it stores data in JSON-like documents. We believe this is the most natural way to think about data, and is much more expressive and powerful than the traditional row/column model.
{
  "_id": "5cf0029caff5056591b0ce7d",
  "firstname": "Jane",
  "lastname": "Wu",
  "address": {
    "street": "1 Circle Rd",
    "city": "Los Angeles",
    "state": "CA",
    "zip": "90404"
  },
  "hobbies": ["surfing", "coding"]
}

Rich JSON Documents

  • The most natural and productive way to work with data.

  • Supports arrays and nested objects as values.

  • Allows for flexible and dynamic schemas.

> db.users.find({ "address.zip" : "90404" })
{ "_id": "5cf0029caff5056591b0ce7d", "firstname": "Jane", "lastname": "Wu", "address": { "zip": "90404" } }
{ "_id": "507f1f77bcf86cd799439011", "firstname": "Jon", "lastname": "Davis", "address": { "zip": "90404" } }
{ "_id": "5349b4ddd2781d08c09890f3", "firstname": "Jim", "lastname": "White", "address": { "zip": "90404" } }
{ "_id": "5bf142459b72e12b2b1b2cd", "firstname": "Jeff", "lastname": "Taylor", "address": { "zip": "90404" } }
{ "_id": "5cf003283b23d04a40d5f88a", "firstname": "Jerry", "lastname": "Miller", "address": { "zip": "90404" } }
{ "_id": "5bf142459b72e12b2b1b2cd", "firstname": "Jai", "lastname": "Williams", "address": { "zip": "90404" } }
{ "_id": "5cf0036deaa1742dd225ea35", "firstname": "Jess", "lastname": "Johnson", "address": { "zip": "90404" } }
{ "_id": "54495ad94c934721ede76d90", "firstname": "Jill", "lastname": "Brown", "address": { "zip": "90404" } }
{ "_id": "566eb3c704c7b31facbb0007", "firstname": "Janet", "lastname": "Jones", "address": { "zip": "90404" } }
{ "_id": "5a999cc461d36489a27f2563", "firstname": "Jan", "lastname": "Smith", "address": { "zip": "90404" } }

Powerful query language

  • Rich and expressive query language that allows you to filter and sort by any field, no matter how nested it may be within a document.

  • Support for aggregations and other modern use-cases such as geo-based search, graph search, and text search.

  • Queries are themselves JSON, and thus easily composable. No more concatenating strings to dynamically generate SQL queries.

session.start_transaction()
order = { line_items : [ { item : 5, quantity: 6 } ] }
db.orders.insertOne( order, session=session );
for x in order.line_items:
  db.inventory.update(
    { _id  : x.item } ,
    { $inc : { number : -1 * x.quantity } },
    session=session
  )
session.commit_transaction()

All the power of a relational database, and more...

  • Distributed multi-document ACID transactions with snapshot isolation.

  • Support for joins in queries.

  • Two types of relationships instead of one: reference and embedded.

MADE FOR THE CLOUD

MongoDB Atlas - the global cloud database

MongoDB Atlas is the multi-cloud database service for MongoDB available on AWS, Google Cloud, and Azure. Best-in-class automation and built-in proven practices provide continuous availability, elastic scalability, and support with regulatory compliance.  Learn more →

Ready to get started?

Launch a new cluster or migrate to MongoDB Atlas with zero downtime.

A RICH PLATFORM

More than just a database

MongoDB is a true data platform with a comprehensive suite of tools to make working with data remarkably easy for everyone, from developers to analysts to data scientists.

Charts

  • The fastest way to create visualizations of MongoDB data.

  • Built for the document model.

  • Visualize live data from any of your MongoDB instances. Available on MongoDB Atlas.

Learn more →

BI Connector

  • Allow any BI tool that can speak the MySQL protocol to work with your MongoDB data.

  • Leverage the BI tools your organization already uses.

  • Perform federated analytics, combining data from MongoDB and other databases.

Learn more →

Compass

  • Search, visualize, and work with your data through an intuitive GUI.

  • Manipulate your data with a powerful visual editing tool.

  • Understand performance issues with visual explain plans and manage your indices.

Learn more →

Ready to get started?

Launch a new cluster or migrate to MongoDB Atlas with zero downtime.