Try Studio 3T for Free

Export Wizard

Export entire MongoDB collections, views, query results, or specific documents to CSV, JSON, BSON/mongodump, SQL, or another collection with the Export Wizard. Download it here.

Looking to import, not export? View the Import Wizard documentation which covers how to import data from CSV, JSON, BSON/mongodump, SQL, and another collection to MongoDB.

Supported export formats

Studio 3T lets you export:

  • Entire collection(s) or view(s)
  • Current query result
  • Specific documents

…while querying in Visual Query BuilderIntelliShellAggregation Editor, SQL Query, and other parts the application.

The collections/views/results/documents can then be exported to:

  • JSON
  • CSV
  • SQL
  • BSON/mongodump
  • To another collection

Open the Export Wizard

Once connected to a MongoDB database, the Export Wizard can be accessed two ways:

  • Click on Export found in the Global Toolbar or
  • Right-click on any server, database, or collection and choose Export

Export MongoDB to JSON

When exporting MongoDB to JSON, you have the option of either exporting:

  • JSON mongo shell / Studio 3T
  • JSON mongoexport

Exporting JSON mongo shell/Studio 3T exports a collection to a rich, type-conserving collection.json file, in the JSON format used in the mongo shell, which makes for an easy paste job.

Exporting JSON mongoexport produces a JSON format that the mongoexport tool generates.

  1. Select JSON in the export wizard and click Next.
  2. Choose between JSON mongo shell/Studio 3T or JSON mongoexport.
  3. Choose the export target file destination and click Next
  4. Review the export summary and click Start Export.

Studio 3T also has the option of saving and loading frequently-used export job settings.

Settings can be saved on the last page of the Export Wizard, or loaded from the first page.

Export MongoDB to CSV (e.g. Excel)

  1. Choose CSV in the export wizard and click Next.
  2. Choose your CSV format options and click Next.
  3. Here, choose the fields to be exported and click Next.
  4. Choose the target file destination for the export and click Next.
  5. Review the export summary and click Start Export. Choose where the data should be exported to, or simply export to Clipboard.

Need to export MongoDB to CSV? Get the latest version of Studio 3T.

Export MongoDB to SQL

Moving data from collections to tables? MongoDB to SQL Migration lets you export MongoDB collections directly to a SQL database or file and configure MongoDB to SQL mappings before export:

  1. Open the Export Wizard, choose SQL, and click Next.
  2. Name your SQL table and choose your SQL format.
  3. Choose the fields to be exported.
  4. Studio 3T matches the Source Type with the closest SQL type, but can be manually overriden. Rename the SQL column if needed.
  5. Review the export summary and click Start Export.

Choose whether you want to add statements for Create or Drop Table, or to use and auto-incremented, additional column as a primary key.

Export MongoDB to SQL is a feature available in Studio 3T Pro and Enterprise. Studio 3T supports all the major SQL databases: Oracle, Microsoft SQL Server, MySQL, and PostgreSQL.

Export MongoDB to BSON/mongodump

  1. Open the export wizard, choose mongodump, and click Next.
  2. Choose between two export options: BSON – mongodump folder or BSON – mongodump archive.
  3. Select the export target folder or archive file.
  4. Review the export summary and click Start Export

Export to another collection

  1. Open the export wizard and choose Another Collection.
  2. Choose the target database, target collection and export mode, then click Next.
  3. Read over the Export Summary and once everything looks good, click Start Export.

Check out other time-saving Studio 3T features:

Updated on November 29, 2019

Was this article helpful?

Related Articles