Docs Menu
Docs Home
MongoDB Compass
/ /

Modify Single Document

On this page

  • Limitations
  • Procedure
  • Cancel Changes
  • Modify Multiple Documents

You can edit existing documents in your collection.

When you edit a document in List or Table view, Compass performs a findOneAndUpdate operation and updates only those fields that you have changed.

When you edit a document in JSON view, Compass performs a findOneAndReplace operation and replaces the document.

  • Modifying documents is not permitted in MongoDB Compass Readonly Edition.

Select the appropriate tab based on whether you are viewing your documents in List, JSON, or Table view:

Document View Selection
click to enlarge

To exit the edit mode and cancel all pending changes to the document, click the Cancel button.

You can use the bulk update operations workflow to update multiple documents in Compass. For details, see Modify Multiple Documents.


You can also use the db.collection.updateMany() method in the embedded MongoDB Shell to update multiple documents in a single operation.

← Insert Documents