Import SQL to MongoDB

Use Withdata FileToMongo as SQL to MongoDB Converter (Importer / Loader)

Works GREAT in 2025.

Support Windows, Linux, and macOS.

Can run in GUI mode, Step by Step, just a few mouse clicks.

  1. 1 to 1: Import SQL to MongoDB collection
  2. n to 1: Import multiple SQL files to a single MongoDB collection
  3. n to n: Batch import SQL files to MongoDB collections

Can run in CLI (Command Line Interface), for Scheduled Tasks and Streams, for Automation.





Import SQL to MongoDB in GUI



Start Withdata FileToMongo, connect to MongoDB.

connect to mongodb



Import SQL to MongoDB collection

Click "1 File To 1 Collection" at task dialog.

Import file data To MongoDB collection - task window

Select the "SQL" file type.

Import SQL file data To MongoDB collection - select file type

1. Open a SQL file.

Import Data From SQL File To MongoDB collection - open SQL file

The source SQL file like this:

import SQL file to MongoDB collection - source SQL file

2. Set MongoDB collection options.

Load Data From SQL File To MongoDB collection - set collection options

3. Preview data will be in MongoDB collection.

Transfer Data From SQL File To MongoDB collection - preview

4. Import SQL data to MongoDB collection.

Copy Data From SQL File To MongoDB collection - import data

After importing, you can view imported data in MongoDB collection.

view MongoDB data



Import multiple SQL files to a single MongoDB collection

Click "N File To 1 Collection" at task dialog.

Import multiple SQL files data To a single MongoDB collection - task window

Select the "SQL" file type.

Import multiple SQL files data To 1 MongoDB collection - select file type

1. Open a folder contains SQL files.

Import multiple SQL files to 1 MongoDB collection - set SQL folder

2. Set SQL options.

Import multiple SQL Files To 1 MongoDB collection - config SQL file

3. Set MongoDB collection options.

Load multiple SQL Files To 1 MongoDB collection - select table

4. Preveiw data will be in MongoDB.

Transfer multiple SQL Files To 1 MongoDB collection - preview

5. Import multiple SQL files to a single MongoDB collection.

Copy multiple SQL Files To 1 MongoDB collection - import data

After importing, you can view imported data in MongoDB.

Import multiple SQL Files To Single MongoDB Collection - view data



Batch import SQL files to MongoDB collections

Click "N File To N Collection" at task dialog.

Batch Import SQL files data To MongoDB collections - task window

then show the wizard.

Select the "SQL" file type.

Batch Import SQL files data To MongoDB collections - select file type

1. Open a folder contains SQL files.

Batch Import Data From SQL Files To MongoDB collections - set SQL folder

2. Set SQL options.

Batch Import Data From SQL Files To MongoDB collections - config SQL file

3. List collesions, set "Import Type".

Batch Load Data From SQL File To MongoDB collections - select table

4. Map files to collections.

Batch Load Data From SQL File To MongoDB collections - select table

5. Summary.

Batch Transfer Data From SQL Files To MongoDB collections - preview

6. Import SQL data to MongoDB collections.

Batch Copy Data From SQL Files To MongoDB collections - import data

After importing, you can view imported data.

view MongoDB data

Set scheduled tasks for importing SQL to MongoDB

After importing SQL to MongoDB in Command Line, then you can schedule and automate "SQL to MongoDB" conversion task by:

  1. Save session and create .bat (Windows) or .sh (Linux/macOS) file for "SQL to MongoDB" conversion.
  2. Set scheduled task: On Linux/macOS, use Crontab. On Windows, use scheduled task.

FAQ

How long does it take to import SQL to MongoDB?

Is it safe to import SQL to MongoDB using FileToMongo?

Can I import SQL to MongoDB on Linux, Mac OS?

Can I import SQL to MongoDB in command line?

Can I batch import SQL files to MongoDB collections?