JSON to BSON
Serialize JSON to BSON. MongoDB's binary format. Get hex, base64, and byte count using the official bson library. Runs in your browser. No data sent.
How It Works
- 1
Paste JSON
Top-level document. Wrap arrays or scalars in an object first.
- 2
Serialize to BSON
We encode using the official `bson` library, in your browser.
- 3
Read hex and base64
Both representations plus the byte count are shown.
Use Cases
MongoDB payload sizing
See exactly how many bytes a document will consume on disk.
Inspect typed values
Round-trip Extended JSON to BSON to verify ObjectId and Date serialization.
Craft test payloads
Generate raw BSON hex for low-level MongoDB driver tests.
Wire format debugging
Decode network captures of MongoDB protocol traffic.
Frequently Asked Questions
Done generating test data? Now automate the tests.
Bug0's expert AI agents write end-to-end tests from plain English, auto-heal them when your UI changes, and run them on every deploy. A forward-deployed engineer verifies every result.
From $2,500/mo. Results in 7 days.