All Tools View Categories About Contact Privacy

BSON to JSON

Decode a binary BSON document into readable JSON. Dates become ISO strings, ObjectIds become hex, and nested documents convert recursively.

Everything runs locally in your browser — your BSON never leaves this page.
Hex and base64 input are detected automatically. When a file is loaded it wins over pasted text.

How BSON values are decoded

BSON typeJSON output
0x01 doublenumber
0x02 stringstring
0x03 / 0x04 document / arraynested object / array
0x05 binaryUTF-8 text when valid, otherwise hex
0x07 ObjectId24-char hex string
0x08 booleantrue / false
0x09 UTC datetimeISO 8601 string
0x10 int32 / 0x12 int64number (int64 beyond 2^53 stays a string)
0x0B regexe.g. /pattern/i
0x0C–0x0F, 0x11, 0x13deprecated, timestamp and decimal128 handled too

About BSON to JSON

mongodump produces .bson files. MongoDB drivers store documents in BSON. But when you need to audit a dump, diff two documents, or push data into a JSON pipeline, the binary format gets in the way — timestamps are 8-byte integers, dates are milliseconds, and ObjectIds are unreadable byte soup.

Convert BSON to JSON parses a BSON document into readable JSON. Every standard type is decoded: numbers, strings, booleans, dates, ObjectIds, binary data, regexes, timestamps and nested documents and arrays.

Features

  • All core types: double, string, document, array, binary, boolean, datetime, null, regex, code, int32, int64, timestamp, decimal128.
  • Readable conversions: Dates to ISO strings, ObjectIds to hex, binary to text when valid.
  • Flexible input: Upload a file, or paste hex or base64.
  • Byte-accurate errors: Unknown types and truncation report the offending offset.
  • Nesting: Sub-documents and arrays convert recursively.
  • Pretty output: The result is formatted JSON.
  • Private: All decoding happens in your browser.

How to Use

  1. Upload a .bson file (e.g. from mongodump) or paste the bytes as hex or base64.
  2. Review the decoded JSON — dates, ObjectIds and numbers are human-readable.
  3. Check binary fields if any appear as hex blobs.
  4. Copy or download the JSON document.

Examples

Example 1 — Auditing a dump. A DBA runs mongodump, uploads the .bson collection file here, and inspects the documents as JSON to verify the export contains what the app wrote.

Example 2 — Data migration. An engineer converts BSON exports to JSON to load into a PostgreSQL or analytics store, mapping ObjectIds to hex strings and dates to ISO 8601.

Example 3 — Debugging drivers. A developer captures a BSON document from a driver trace, decodes it here, and compares the fields against the expected schema.

Example 4 — Support tickets. A support engineer decodes a user-provided .bson export to read an error document without touching a MongoDB instance.

Benefits

  • No MongoDB needed: Dumps decode without a database.
  • Lossless read: Every BSON type maps to a JSON representation.
  • Human-readable: Dates, IDs and timestamps become plain text.
  • Instant: Files decode in the browser in milliseconds.
  • Zero upload: Data never leaves your machine.

Frequently Asked Questions

What is BSON?
BSON (Binary JSON) is the binary serialization used by MongoDB and MongoDB dump files. It adds typed values that JSON lacks — dates, ObjectIds, int64 and binary blobs — stored in a compact, length-prefixed format.
Which BSON types are supported?
All common ones: double, string, embedded documents, arrays, binary, undefined, ObjectId, boolean, UTC datetime, null, regex, JavaScript code (with and without scope), int32, timestamp, int64 and decimal128. Unknown types stop with a clear offset error.
How do dates and ObjectIds appear in the JSON?
UTC datetimes become ISO 8601 strings (for example 2026-08-10T10:00:00.000Z). ObjectIds become their standard 24-character hex string. decimal128 values appear as hex since JSON has no 128-bit decimal type.
How do I provide the binary data?
Three ways: upload a .bson file (for example from mongodump), paste the bytes as hexadecimal text, or paste them as base64. Hex and base64 input are detected automatically.
What happens to binary blobs?
Binary values are decoded as UTF-8 text when they are valid text; otherwise they are shown as hex. Non-text subtypes (like UUID) are rendered with their subtype byte and hex payload so nothing is lost.
Is my BSON uploaded anywhere?
No. Decoding happens entirely in your browser. Nothing is uploaded, stored or logged.