Insert Documents
On this page
Important
Inserting documents is not permitted in MongoDB Compass Readonly Edition.
Compass provides two ways to insert documents into your collections: JSON Mode and a Field-by-Field Editor.
- JSON Mode (New in Compass 1.20)
- Allows you to write or paste JSON documents in the editor. Use this mode to insert multiple documents at once as an array.
- Field-by-Field Editor
- Provides a more interactive experience to create documents, allowing you to select individual field values and types. This mode only supports inserting one document at a time.
Procedure
To insert documents into your collection:
Click the Add Data dropdown and select Insert Document.
Select the appropriate view based on how you would like to insert documents.
Click the
{ }
brackets for JSON view. This is the default view.Click the list icon for Field-by-Field mode.
Limitation
The Insert Document button is not available if you are connected to a Data Lake.