With Studio 3T’s Export Wizard, you can export MongoDB collections, views, queries, query results, or specific documents to CSV, JSON, BSON/mongodump, SQL, or another collection.
Download the Export Wizard here and jump ahead to the relevant chapter:
- Export MongoDB to CSV
- Export MongoDB to JSON
- Export MongoDB to SQL (Oracle, Microsoft SQL Server, MySQL, and PostgreSQL)
- Export MongoDB to BSON/mongodump
- Export to another MongoDB collection
Open the Export Wizard
Once connected to a MongoDB database, open the Export Wizard by clicking on Export in the Global Toolbar.

Alternatively, you can right-click on any server, database, or collection in the Connection Tree and choose Export (Collections, Buckets, Views).

Or right-click anywhere on a Result tab (Collection Tab, SQL Query, IntelliShell), or any input or output panel in Aggregation Editor and choose Export.

Export sources
With Studio 3T, you can export the following throughout the application:
- Entire collections
- Entire views
- The current query result of a
find()
or aggregation query - The current cursor
- Specific documents

For all exports, you can choose one of six actions from the toolbar:
- Save the export as a task, which you can execute on-demand or schedule for later
- Execute the task immediately
- Add, edit or remove export units

Change the export source
While configuring your export, you can also change the export source (e.g. connection, database, collection) at any time.
Under Export source in the Export unit tab, you can:
- Click to change the source from your list of databases or connections
- Drag the source from the Connection Tree directly into the tab

If you’re exporting find()
query results, you can edit them directly in the Query bar of any Export unit tab.
The Query bar also validates your JSON as you type.

Change the export file path
You can also configure the default target folder in the Export Overview tab. Studio 3T will remember any changes to this path.

Export MongoDB to CSV (e.g. Excel)
Open the Export Wizard and select your export source.
This screen only appears if you haven’t chosen an item in the Connection Tree, run a previous query, or selected specific documents.

Next, choose CSV as the export format then click Next.

Studio 3T performs a partial scan of 100 documents to automatically detect fields within your collection.
To detect all fields, you can click on Full scan – which might take some time – or manually add the missing fields by clicking on Add custom field.

Click Finish. This will open the Export overview tab and display the Export unit #1 – CSV tab by default.
The Export unit – CSV tab has six sections.
- Export source – Displays the source connection, database, and collection. You can change this by clicking within the blue dotted box, or by dragging the source from the Connection Tree directly into the tab.
- Select fields – Add or remove custom fields and check or uncheck fields to be included in the export.
- Select target – Choose between clipboard or file, and define the file path as needed.

4. CSV format – Configure settings like preset, delimit, record separator, etc.
5. Other options – Configure non-formatting settings like how to treat null values, column headers, etc.
6. Output preview – Click on the arrow button to expand the preview of the CSV file.

To configure global export options, go to the Export overview tab.

After configuring the export, you can run the export immediately by clicking on Execute in the toolbar.

You can also run multiple CSV exports at once by adding more export units.
To save time, you can save your CSV export as a task, which you can then schedule to run later.
To track your export’s progress, check the Operations window on the bottom-left hand corner.
From here you can also directly view the export file. Right-click on an export in the same window and choose Open in File Explorer (Windows, Linux) or Reveal in Finder (macOS).

Export MongoDB to JSON
Open the Export Wizard and choose your export source.
This screen below will appear if you haven’t chosen an item in the Connection Tree, run a previous query, or selected specific documents.

In this example, we will export the current query result of the find()
query { "package": "Premium" }
, which we built using Visual Query Builder.


Next, select JSON as the export format and click Next.

Click Finish. This will open the Export overview tab and display the Export unit #1 – JSON tab by default.
The Export unit – JSON tab has five sections.
- Export source – Displays the source connection, database, and collection. Make sure that the source is correct. In this example, we are exporting the current query result of the
find()
query{ "package": "Premium" }
. You don’t need to go back to the original query to edit it – you can do so edit directly in the Query bar. - Format options – Choose between JSON mongo shell/Studio 3T or JSON mongoexport.
3. Select target – Select between clipboard or file, and define the file path as needed.

4. Other options – Choose to export with commas between documents, or export as document array.
5. Output preview – Click on the arrow to display the JSON preview, which dynamically updates as you configure the export settings.
Switch to the Export overview tab to configure global export options.

Once your unit is export-ready, click on Execute to run the export immediately.

Alternatively, run multiple JSON exports at once by adding more export units, or save the JSON export as a task, which you can then schedule to run later.
You can track your JSON export’s progress in the Operations window, on the bottom-left hand corner.

To view the export file, right-click on an export in the same window and choose Open in File Explorer (Windows, Linux) or Reveal in Finder (macOS).
Export MongoDB to SQL
Open the Export Wizard and choose SQL as the export format. Click Next.

Choose one of the supported SQL databases: MySQL Server, Microsoft SQL Server, PostgreSQL, and Oracle Database.

Then, select the fields to include in the SQL export.
Studio 3T partially scans the first 100 documents in the collection to detect fields and map source types to SQL column types.

To detect all fields, click on Full scan or manually add the missing fields by clicking on Add custom field.
To override the auto-detected SQL column names and SQL column types, double-click on a cell and edit the value.
Click Finish. The Export overview and Export unit #1 – SQL tabs will open.
The Export unit – SQL tab, where you can further edit the export, has seven sections.
- Export source – Displays the source.
- SQL format – Displays the target SQL format.
- Select fields – Here you can add or remove custom fields, move fields up or down, check or uncheck, and edit SQL field names and types.

4. Select target – Select between clipboard or file, and define the file path as needed.
5. SQL table name – Enter the SQL table name.
6. Other options – Configure other settings like adding “CREATE TABLE” and “DROP TABLE IF EXISTS” statements.
7. Output preview – Click on the arrow to show a preview of the SQL file.

Configure other global settings as needed in the Export overview tab.
Once you’re done setting up the export, you can run the export immediately by clicking on Execute in the toolbar.

Alternatively, add more export units so that you can run multiple SQL exports in one go, or save the SQL export as a task that you can run on-demand or schedule for later.
Export MongoDB to BSON or mongodump
You will see the screen below if you haven’t chosen an item in the Connection Tree, run a previous query, or selected specific documents.

Choose mongodump as the export format and click Finish.
This will open the Export overview tab and display the Export unit #1 – mongodump tab by default.
The Export unit – mongodump tab has four sections.
- Export source – Shows the export source connection, database, and collection. You can change this by clicking within the blue dotted box, or by dragging the source from the Connection Tree directly into the tab.
- Format options – Choose between BSON – mongodump folder or BSON – mongodump archive.
- Select the destination folder – Define the folder path as needed.
- Other options – Configure other settings like compression, document recovery, etc.

Switch to the Export overview tab to configure global export options.
Once your unit is export-ready, you can run the export immediately by clicking on Execute.

To run multiple exports in one job, you can also add export units, or save the BSON export as a task that you can schedule to run later.
Export to another collection
If you haven’t chosen an item in the Connection Tree, run a previous query, or selected specific documents, you will be prompted to choose an export source.

Once you’ve made a selection, choose To another collection the click Next.

Click on Click here to connect to a server to select a target connection. This will open open the Connection Manager.

Choose the target server and click Connect. Then, choose the collection and click Finish.
This will open the Export overview tab and display the Export unit #1 – Another collection tab by default.
The Export unit – Another collection tab has three sections.
- Export source – Displays the export source connection, database, and collection. You can change this by clicking within the blue dotted box, or by dragging the source from the Connection Tree directly into the tab.
- Export target – Shows the export target connection/database/collection. You can edit this by clicking within the blue dotted box, or by dragging the source from the Connection Tree directly into the tab.
- Export mode – Choose one from the six export modes.

Go to the Export overview tab to configure global export options.
After you’ve configured your export, you can run the export immediately by clicking on Execute in the toolbar.

Alternatively, add more export units so that you can run multiple exports at once, or save the export as a task that you can run on-demand or schedule for later.
Automate & schedule exports as tasks
Export Wizard integrates with two other features – Tasks and Task Scheduler – so that you can save frequently-run exports as tasks.
Click on Save task (as) to save an export as a task.
Name the task, then click OK.

This saves the task in the Task Viewer, from which you can choose to schedule, unschedule, edit, clone, delete, add, and execute tasks.
Masking data on export
You can also specify data masking rules when using our Data Masking tool, allowing you to obfuscate collections on a field level.
On the Export Wizard tab, scroll down to the Data Masking subsection and click Open field masking editor to begin configuring your data masking rules. The original data source won’t be overwritten.

Export multiple or all MongoDB collections at once
The Export Wizard treats each export as an export unit.
Instead of having to run single exports one after another, you can add multiple export units that you can run at once, which is a huge time-saver in tandem with Tasks and Tasks Scheduler.
Add export units
Set up your first export unit using your format of choice:
- Export MongoDB to CSV
- Export MongoDB to JSON
- Export MongoDB to SQL (Oracle, Microsoft SQL Server, MySQL, and PostgreSQL)
- Export MongoDB to BSON/mongodump
- Export to another MongoDB collection
The quickest way to add new export units is to drag items directly from the Connection Tree into the Export units section (in this case, the expats
collection).

Alternatively, choose Add unit from the toolbar.

This will prompt you to choose your new unit’s export source. Here we’ll choose Connection tree item.

Click on Click here to connect to a server. This will open the Connection Manager. Choose the target server, then click Connect.

Next, chose the connection tree items (databases, collections, views) to export. You can choose multiple items at once. Click Next.

Then, choose the export format.
Configure the new export unit as you would any export. Each export will open in a separate Export unit tab.

Under the Export overview tab, you can find an overview of all export units bundled in your job.

Edit export units
Click on Edit unit in the toolbar.

From the Export overview tab, you can also double-click on the export unit, or right-click on the unit and choose Edit selected units.
Remove export units
Click on Remove unit in the toolbar.

Alternatively from the Export overview tab, select the unit to be removed and either click on Remove unit in the toolbar or right-click and choose Remove selected items.
Trigger export sources and formats
At first glance, you might wonder why you don’t see all available export sources options.
The prompt you see will depend on which item(s) you’re trying to export or where you’ve clicked in the application.
If no item is selected, clicking on Export in the global toolbar will prompt you to choose the export source.

When you choose items from the Connection Tree and click on Export, it will ask you to choose the export format directly.
Note that depending on the items chosen, only the applicable formats will be highlighted.

When you click on Export from a Result tab (Collection Tab, IntelliShell, SQL Query), or an input or output panel in Aggregation Editor, it will skip the previous prompt and ask you directly which items you want to export.

After you’ve selected an export source and export format, the export is considered as one (export) unit.
The Export Wizard lets you add multiple units – or multiple exports – to one job, so you can run multiple exports at once.
You can always find an overview of all export units in the Export overview tab, where you can configure global options, and add, edit, and remove units as needed.
