EditSafely

Convert BSON to JSON

Convert a binary BSON file back to readable JSON. Runs entirely in your browser, so your data never leaves your device.

Input

Drop a file here, or click to browse

Files never leave your device

Output

The result appears here as you type.

Options

How to use Convert BSON to JSON

  1. 1. Add your BSON file. Drop or browse for a .bson file, the binary document format MongoDB stores and exports data in, such as a file produced by mongodump.
  2. 2. Pick the output indent. Choose 2 spaces, 4 spaces or tabs for the Indent setting to control how the decoded JSON document is formatted once the binary structure is parsed.
  3. 3. Copy the decoded JSON. Copy the resulting JSON and read it directly, or paste it into your application code, now that MongoDB's binary storage format has been converted to plain text.

When to use Convert BSON to JSON

Convert BSON to JSON decodes a binary BSON file, the format MongoDB uses internally, into readable JSON. It is for whenever you have raw BSON bytes, perhaps from a mongodump backup or a driver-level debugging session, and need to see the actual document inside.

  • Inspecting a mongodump backup file. You have a .bson file produced by mongodump and want to see the actual document contents without spinning up a MongoDB instance to restore it first.
  • Debugging a driver that outputs raw BSON. You are working with a MongoDB driver at a low level and captured raw BSON bytes to inspect, and need to see the decoded document to confirm the data is correct.
  • Migrating documents out of a BSON export. You are moving data from a MongoDB-based system into a JSON-based one and have BSON files to convert as part of the migration process.
  • Verifying a BSON file was written correctly. You generated a BSON file with a script or tool and want to confirm it decodes back to the exact JSON document you expected before using it further.

Examples

Decode a BSON file

Input

data.bson (30 B binary file)

Output

{
  "name": "Ada",
  "age": 36
}

About the Convert BSON to JSON tool

Convert BSON to JSON is a free online tool that works entirely inside your web browser. Convert a binary BSON file back to readable JSON. Because the processing happens on your own device, nothing you enter is uploaded, logged or stored anywhere.

This page is one of 90 JSON utilities on EditSafely. Each one does a single job well, and all of them follow the same rule: your input stays on your machine.

You can shape the output with the Indent setting, and the result refreshes the moment you change it. A worked example further down the page shows exactly what the tool produces for a real input.

Because nothing leaves your device, the tool is suitable for sensitive content such as internal documents, credentials or customer data. It also responds instantly, since every keystroke is handled on your own machine rather than by a remote API.

Frequently asked questions

Does Convert BSON to JSON cost anything?

Yes, it is completely free. All 2,658 tools on EditSafely work without an account, a subscription or usage limits.

Are my files uploaded to a server?

No data leaves your device. The whole tool is JavaScript that runs inside your browser tab, so there is no upload, no server-side processing and no log of what you did. If you disconnect from the internet after the page loads, it keeps working.

Which files does Convert BSON to JSON accept?

It accepts BSON files. There is no file size cap imposed by a server; very large files are limited only by your device's memory.

Do I need to sign up or install anything?

Nothing to install and no account needed. Open the page in any up-to-date browser, including on a phone or tablet, and the tool is ready.

How do I use the result?

The output panel has a one-click copy button, and you can keep refining the input while you work; the result updates in place as you type.

Related tools

All JSON Tools