Loading BSON to JSON Converter...
Please wait a moment

How to Convert BSON to JSON - Step by Step Guide

Step 1

Input Your BSON Data

Let's decode your BSON data! Whether you're debugging MongoDB exports, analyzing database dumps, or converting for API integration, you have several convenient options:

•
Paste directly: Copy your BSON data in Base64 or Hex format from mongodump exports or MongoDB drivers
•
Upload a file: Click "Upload" to select a .bson or .bin file from your computer. A mongodump file with many documents comes out as a JSON array, one entry per document
•
Try the sample: Click "Sample" to load example BSON and see the JSON conversion

Example: BSON Input (Base64)

Here's what encoded BSON data looks like:

dgAAAAJjdXN0b21lcklkAAsAAABDVVNULTEyMzQ1AAJwaG9uZU51bWJlcgAOAAAAKzE1NTUtMTIzNDU2NwACcGxhblR5cGUADQAAAFVubGltaXRlZCA1RwAQZGF0YVVzYWdlR0IALQAAAAhpc0FjdGl2ZQABAA==
Step 2

Automatic Decoding & Analysis

The magic happens instantly! As soon as you input BSON data, the converter automatically:

•
Decodes binary format: Converts BSON to readable JSON while preserving all data
•
Preserves MongoDB types: Maintains ObjectId, Date, Binary, and other MongoDB-specific data types
•
Validates structure: Ensures BSON is well-formed and reports any integrity issues

Example: Decoded JSON Output

The same BSON, now decoded as readable JSON:

{
  "customerId": "CUST-12345",
  "phoneNumber": "+1555-1234567",
  "planType": "Unlimited 5G",
  "dataUsageGB": 45,
  "isActive": true
}
Step 3

Export Your JSON Data

Get your decoded JSON ready for use! Multiple export options make integration seamless:

•
Copy to clipboard: One-click copying for quick pasting into applications, APIs, or documentation
•
Download as JSON: Save as a .json file for debugging, data analysis, or sharing with your team
•
Ready for integration: Use decoded JSON in any application, migrate to other databases, or analyze with data tools

Frequently Asked Questions

How do I convert BSON from MongoDB to JSON?

Paste the BSON as Base64 or Hex, or upload the .bson file that mongodump wrote. The JSON shows up as soon as the data decodes. A dump file holds many documents back to back, and you get them as a JSON array with one entry per document.

What happens to MongoDB ObjectIds and Dates?

They are written in MongoDB Extended JSON. An ObjectId becomes {"$oid": "507f1f77bcf86cd799439011"} with its 24 hex characters, and a Date becomes {"$date": "2024-01-15T12:00:00.123Z"} in ISO 8601. Decimal128 values, binary data, timestamps and regular expressions get their own $-wrappers too, so nothing turns into a plain string by accident.

Can I get BSON data from MongoDB for conversion?

Yes. mongodump exports each collection as a .bson file you can upload here directly. From application code, any MongoDB driver can serialize a document to BSON bytes; encode them as Base64 or Hex and paste the result.

Is the BSON to JSON conversion lossy?

The values are not. Large 64-bit integers such as IDs keep every digit (8901240544102066246 stays 8901240544102066246), Decimal128 keeps its exact digits, and ObjectId, Date and binary data keep their wrappers. The output is relaxed Extended JSON, though, so plain numbers are written as ordinary JSON numbers: it no longer says whether a number was stored as a 32-bit int, a 64-bit int or a double, and a double like 1.0 shows as 1. If you need those exact types back, keep the original .bson file.

Can I use the JSON output with other databases?

Yes. Anything that reads JSON can read the output. The MongoDB-specific values sit inside small objects such as {"$oid": ...} or {"$numberDecimal": ...}, which mongoimport understands as is and which are easy to unwrap for other systems.

Is the BSON to JSON converter free?

Yes, it is free and needs no account. Decoding runs in your browser, so the data you paste or upload is not sent to our server.