Knowledge base · Studio 3T Desktop IDE

How to Copy and Paste MongoDB Documents

By Thomas Zahn · Updated

In Studio 3T, you can reliably (and easily) copy MongoDB documents and paste them across databases and collections.

Watch the video on Vimeo

1. Open your source MongoDB collection in Studio 3T and select the documents that you would like to copy – either by selecting the documents themselves or any of their fields.

2. Right-click and choose “Copy Selected Documents To Clipboard” from the popup menu – or use the keyboard short-cut Ctrl+C or Shift+Cmd+C. (Note that just Cmd+C would copy the selected individual fields rather than the entire documents)

Highlight the documents you wish to import

3. Next, open your MongoDB target collection.

4. Right-click anywhere and select “Paste Documents” (or simply press Ctrl+V or Cmd+V), and the documents are copied into the target collection. Easy as that.

And voilà:

import doc

And the best is: Copy & paste in Studio 3T is 100% reliable and lossless! All types (including complex ones such as Code-with-Scope, Timestamp, or fine-grained ones such as Int32, Int64) are supported and preserved.

Studio 3T also pastes documents with their original _id. By default, if a duplicate document already exists, the to-be-pasted document will be inserted with a new ObjectId in its _id field.

If you need more fine-grained control over how duplicate documents should be handled, you can do so via the import dialog.

Don’t forget to check out other helpful tips on how to update field values, modify MongoDB indexes, and more. If you haven’t downloaded our MongoDB GUI yet, here you go. Happy copy & pasting!

With your consent, we and third-party providers use cookies and similar technologies on our website to analyse your use of our site for market research or advertising purposes, including personalized advertising (“performance”), to provide you with additional functions (“functional”), and to show content from social media platforms, such as embedded videos (“social media”). This may result in the creation of pseudonymous usage profiles and the transfer of personal data to third countries, including the USA, which may have no adequate level of protection for the processing of personal data. Please choose for which purposes you wish to give us your consent and store your preferences by clicking on “Accept selected”. You can find further information in section 9 of our Privacy Policy.

Manage consent preferences