BSON to JSON Converter
Read MongoDB BSON as Extended JSON: open a .bson file or paste it as Base64 or hex.
What you can open
- .bson files: including mongodump collection files, which hold many documents one after another. They are shown as a JSON array.
- Base64: BSON copied from a driver, a log or an API, such as
BQAAAAA=. - Hex: with or without spaces and a
0xprefix, such as05 00 00 00 00. -
Escaped strings: bytes shown as text, the way Kafka UIs and logs print binary values, such as
"\u0005\u0000\u0000\u0000\u0000",\x05\x00…or a Pythonb'…'literal.
If an escaped string contains �, the bytes were read as UTF-8 text somewhere along the way and some
of them were lost. Shapecheck tells you how many and where, instead of showing wrong values, and how to get the
raw bytes instead.
No types lost
BSON has types that plain JSON does not. Shapecheck writes them as MongoDB Extended JSON v2, so they stay
recognizable: ObjectId as {"$oid": "…"}, dates as {"$date": "…"}, and
$numberDecimal, $binary, $regularExpression, $timestamp
and the rest. Int64 values are kept exact, even beyond JavaScript's safe integer range.
Relaxed or canonical
Relaxed (default) writes Int32, Int64 and doubles as plain numbers and recent dates as ISO
strings, which is easier to read. Canonical spells out every type, such as
{"$numberInt": "1"}, so the JSON can be turned back into the exact same BSON.
Errors
Damaged BSON is reported with the byte offset where it goes wrong, and invalid Base64 or hex with line and column.
Privacy
Everything runs in your browser; files are read locally and never uploaded. Pasted text is kept only in this browser's local storage, so it is still there after a reload; Clear removes it. Opened files are not stored.