Open a MongoDB .bson Dump Without MongoDB Installed
mongodump writes one .bson file per collection — not JSON, and not something a text editor or Excel can open. The usual fix is standing up a MongoDB server just to run mongorestore, or writing a script with a BSON library. This is how to query the file directly, with neither.
What's Actually In a .bson File
It is not one document: it is many BSON documents written back to back, each starting with its own length in bytes. That is the whole format — no header, no index, no schema. A reader just has to walk the file, one length-prefixed document at a time.
| Usual route | What it costs |
|---|---|
| mongorestore + mongosh | A MongoDB server, even a temporary one, just to look inside a file |
| A Python/Node script | Install a BSON library, write a loop, decide what to do with ObjectIds and dates yourself |
| An online BSON viewer | The dump — often customer or account data — uploaded to someone else's server |
Doing It in the Browser
OmniSelect FileSQL reads .bson files with the same bson library MongoDB's own drivers use, inside your browser tab. Nothing is uploaded.
- Open the app.
- Drop the file onto the File Select panel. A collection dumped as
customers.bsonbecomes a table named by its first letter,C, shown in the Alias column. - Look at it.
SELECT * FROM C
| _id | name | joined | plan | tags | address_city | address_country | lifetime_value | |
|---|---|---|---|---|---|---|---|---|
| 000000000000000000000001 | Acme Ltd | ops@acme.example | 2023-03-14 | enterprise | vip,renewed | Austin | US | 48250.5 |
| 000000000000000000000002 | Borden Group | hello@borden.example | 2024-01-09 | pro | newsletter | Denver | US | 9120 |
| 000000000000000000000003 | Castle Co | info@castle.example | 2024-06-30 | pro | newsletter,beta | Boston | US | 15400.75 |
| 000000000000000000000004 | Delta Partners | team@delta.example | 2025-02-18 | free | Seattle | CA | 0 |
Four BSON-specific things happened before that table appeared:
_idwas anObjectId, MongoDB's own 12-byte identifier. It becomes the plain 24-character hex text you'd see inmongosh— queryable and joinable like any other string.- The nested
addressdocument is flattened intoaddress_cityandaddress_country, the same as a nested object in JSON or Avro. joinedwas a BSONDate(stored as milliseconds since the epoch). It arrives as a real date, not a number.tags, an array of plain strings, is joined with commas. Delta Partners' empty array becomes a blank cell, not a missing one.
Joining by ObjectId
An orders collection dumped alongside it, orders.bson (table O), references each customer by that same ObjectId. Once it's text, it joins exactly like any foreign key:
SELECT C.name, COUNT(*) AS orders, SUM(O.amount) AS total_amount FROM O JOIN C ON O.customer_id = C._id GROUP BY C.name ORDER BY total_amount DESC
| name | orders | total_amount |
|---|---|---|
| Acme Ltd | 2 | 15200 |
| Borden Group | 1 | 890 |
| Castle Co | 2 | 790 |
JOIN leaves it out — correct behaviour, not a sign that its file failed to load. A LEFT JOIN would keep it, with blank order columns; see the four reasons a join comes back empty.Drop a mongodump .bson file in and see inside it.
Open the app →What Else Happens to BSON's Own Types
BSON has several types JSON does not. Each becomes something you can filter and sort on rather than an opaque blob:
Longand other 64-bit integers stay exact. A value too large for an ordinary number to hold precisely arrives as text with every digit intact, rather than rounded — the same rule Avro and Parquet longs follow here.Decimal128,Timestamp,MinKeyandMaxKeyarrive as their text representation.Binarydata becomes hex bytes for anything short, or a note of how many bytes for anything long; a UUID stored in aBinaryfield (subtype 4) becomes the plain UUID text instead.DBRef(a reference naming its own collection) becomes a small object with the collection name and the referenced id, still queryable as a path.
What's Not Supported
- Only
mongodump's per-collection .bson. A single BSON document embedded in another file's binary field is not a file of this kind. - No write-back. Export the result as CSV, JSON, Excel or Parquet — not another .bson.
- Size. Up to 50 MB and 1,000,000 rows, the same limit as every other format here.
Reasonable Questions
Do I need mongoexport instead?
mongoexport writes JSON, which this app already reads — either works, but .bson keeps every BSON type (ObjectIds, dates, longs) exactly as MongoDB stored it, where mongoexport's JSON has already converted some of them.
Can I read more than one collection at once?
Yes. Load every .bson file mongodump wrote for a database, and join across collections the way customers.bson and orders.bson are joined above — see querying up to twenty-six files at once.
What about GridFS files?
GridFS stores a file's bytes split across many small chunk documents in fs.chunks, which is not something a table of rows is the right shape for. Metadata in fs.files opens and queries normally.
Does anything leave my machine?
No. The BSON reader runs in the tab, and after the page has loaded it makes no network requests — here is how to check.