MongoDB – Rename CollectionMongoDB Rename CollectionUse db.collection.renameCollection() method to rename existing collection in MongoDB database.Syntax:db.collection.renameCollection(target, dropTarget) Example:For example, You have a collection with wrong spelling “pproducts“. Let’s use the following command on mongo Shell to correct collection name to “products“.db.pproducts.renameCollection("products") Output:{ "ok" : 1 } Tags Collection, mongodbDoc navigation← MongoDB - Show CollectionMongoDB - Drop Collection →