check MongoDb database size

How to check MongoDb database size?

Sometimes we may need to check MongoDb database size and it is a handful to know. In this post, we will learn to check MongoDb database size.


  1. Login to MongoDb database
  2. Switch to the database with use command. Eg: use database_name
  3. Now, we can run the command: db.stats()
  4. The command shows the details of the database:
How to check MongoDb database size? database detail

5. We can see the database name zvls and the storageSize which is the actual used size in the database zvls. Hence, it is using the 1253376 bytes of the data and is equivalent to 1.25 mb.


Notify of
Inline Feedbacks
View all comments