Convert BSON to CSV
Turn BSON files into CSV. A list of objects becomes one row per object under a header of every key in first-seen order, and a single object becomes one row.
Converted in an isolated sandbox on our serversDeleted after 24 hours
Drop BSON files on the dialor turn it to pick what to do
BSON documents as rows in a CSV table.One row per object, with a column for every key.
What you get
A single CSV file. When the BSON holds a list of objects, each object becomes one row. A single object becomes one row.
The header lists every key found in the data, in the order each key is first seen.
How values are written
Nested objects and lists are written into their cell as JSON text. A null value leaves the cell empty.
ObjectIds become hex text. Dates become ISO 8601 text. Binary data becomes base64 text.
When it stops
If the file cannot be parsed, the conversion stops with
input_corrupted. No CSV is produced in that case.To go the other way, use CSV to BSON.
BSON and CSV.What each format is.
The formats
BSON
MongoDB's binary document encoding, JSON with dates and binary fields.
- Extensions
- .bson
- MIME type
- application
/bson - Kind
- Text and data
CSV
Rows of comma-separated values. The plainest way to move a table between programs.
- Extensions
- .csv
- MIME type
- text
/csv - Kind
- Text and data
In your code.The same BSON to CSV conversion through the API, for your app or your agent.
$ cv convert report.bson report.csv$ cv convert report.bson report.csvQuestions.What people ask about BSON to CSV.
The header holds every key from all the objects, in the order each key first appears.
They stay in one cell as JSON text. They are not split into extra columns.
ObjectIds are written as hex text, dates as ISO 8601 text and binary data as base64 text.
Yes. A single object becomes one row under a header of its keys.