For AI agents: a documentation index is available at https://www.mongodb.com/docs/llms.txt — markdown versions of all pages are available by appending .md to any URL path.
Docs Menu

bsondump Examples

This page shows examples for bsondump.

Run bsondump from the system command line, not the mongo shell.

By default, bsondump outputs data to standard output. To create corresponding JSON files, you can use the --outFile option:

bsondump --outFile=collection.json collection.bson

Use the following command (at the system shell) to produce debugging output for a BSON file:

bsondump --type=debug collection.bson

On this page