Import CSV data directly into MongoDB.
CSVbox converts spreadsheet rows into MongoDB documents, validates field types, and inserts clean records into any collection — without an intermediate API layer or custom parsing code.
- Validated data only
- Column mapping included
- SOC 2 Type II + GDPR
MongoDB is flexible, but bulk-loading data from spreadsheets is not trivial. CSV files are flat; MongoDB documents can be nested. Column values are strings; MongoDB fields have types. Building a pipeline to handle conversion, validate input, and insert documents is non-trivial engineering.
CSVbox handles it with configuration instead of code. Define target fields and their data types in your schema. CSVbox coerces imported values to those types before insertion. Invalid rows surface to the user inline — they never reach your collection.
How It Works
- 1Connect MongoDB
Add a MongoDB destination in the CSVbox dashboard. Provide your MongoDB URI. Supports MongoDB Atlas, self-hosted, and any managed MongoDB provider.
- 2Select your database and collection
Choose the database and collection to insert documents into.
- 3Map fields and define types
Map your CSVbox schema fields to MongoDB document field names. For each field, specify the data type: String, Number, Boolean, Date, ObjectId, or Array.
- 4Embed and ship
Add the CSVbox widget to your app. Users upload files; validated documents are inserted into your collection.
Data Type Mapping
| CSVbox Type | MongoDB Type | Notes |
|---|---|---|
| String | String | Default; no conversion |
| Number | Number (Double) | Decimal values preserved |
| Integer | Number (Int32/Int64) | Truncates decimal part |
| Boolean | Boolean | true/false, yes/no, 1/0 all handled |
| Date | Date | ISO 8601, locale formats, Excel serials |
| ObjectId | ObjectId | Validates 24-char hex string |
| Array | Array | Comma-separated values as Array of strings |
Common Use Cases
Import seed data for development or staging MongoDB collections from spreadsheets.
Migrate user records from a relational database CSV export into a MongoDB-backed application.
Import product documents, SKUs, and attributes into a MongoDB product collection.
Load historical event data from CSV exports into a MongoDB events collection.
Frequently Asked Questions
Does CSVbox support MongoDB Atlas?
Yes. Use your Atlas connection string. Ensure your cluster allows inbound connections from CSVbox IP ranges, or use a VPC peer for Enterprise customers.
Can I import nested documents from a flat CSV?
CSVbox imports flat field structures. For nested documents, use the API/Webhook destination and handle document assembly in your server logic.
What MongoDB versions are supported?
MongoDB 4.0 and above, using the official MongoDB Node.js driver.
Can I add a custom _id field from CSV data?
Yes. Map a CSV column to _id in your field configuration. Values must be unique.