Use Withdata FileToMongo as TXT to MongoDB Converter (Importer / Loader).
Works GREAT in 2025.
Support Windows, Linux, and macOS.
Support all MongoDB deployment types: standalone, replica set, sharded cluster, and MongoDB Atlas.
Can run in GUI mode, Step by Step, just a few mouse clicks.
Can run in CLI (Command Line Interface), for Scheduled Tasks and Streams, for Automation.
Start Withdata FileToMongo, connect to MongoDB.

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

Select the "TXT" file type.

1. Open a TXT file.

The source TXT file like this:

2. Set MongoDB collection options.

3. Preview data will be in MongoDB collection.

4. Import TXT data to MongoDB collection.

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

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

Select the "TXT" file type.

1. Open a folder contains TXT files.

2. Set TXT options.

3. Set MongoDB collection options.

4. Preveiw data will be in MongoDB.

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

After importing, you can view imported data in MongoDB.

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

then show the wizard.
Select the "TXT" file type.

1. Open a folder contains TXT files.

2. Set TXT options.

3. List collesions, set "Import Type".

4. Map files to collections.

5. Summary.

6. Import TXT data to MongoDB collections.

After importing, you can view imported data.

After importing TXT to MongoDB in GUI, and Saving "TXT to MongoDB" session, then you can:
After importing TXT to MongoDB in Command Line, then you can schedule and automate "TXT to MongoDB" conversion task by: