Convert BSON to JSON

Turn BSON files into JSON. Every document, with its keys in order; several documents become a list.

Converted in an isolated sandbox on our serversDeleted after 24 hours

Drop BSON files on the dialor turn it to pick what to do

BSON as plain, readable JSON.Every document is kept in order, with dates, IDs and binary data written as text.

  1. What you get

    One JSON file with every document from the BSON file. The keys stay in the order they had. When the BSON file holds several documents, they become a list.

  2. How values are written

    JSON has no types for most BSON values, so they are written in forms it can hold. ObjectIds become hex text. Dates become ISO 8601 text. Binary data becomes base64, and UUIDs become their usual text form.

    Decimal128 values become decimal text. Timestamps and DBRefs become small objects.

  3. When it fails

    If the BSON file cannot be parsed, the conversion stops with input_corrupted. The conversion has no options to set.

    To go the other way, use JSON to BSON.

BSON and JSON.What each format is.

The formats

From · BSON

BSON

MongoDB's binary document encoding, JSON with dates and binary fields.

Extensions
.bson
MIME type
application/bson
Kind
Text and data
To · JSON

JSON

JSON, the data format of every API.

Extensions
.json
MIME type
application/json
Kind
Text and data

In your code.The same BSON to JSON conversion through the API, for your app or your agent.

terminal
$ cv convert report.bson report.json
$ cv convert report.bson report.json

Questions.What people ask about BSON to JSON.

01OF 04

Yes. Every document keeps its keys in their original order.

They become a list in the JSON file.

Dates are ISO 8601 text. ObjectIds are hex text.

The BSON file could not be parsed, so the conversion stops with input_corrupted.

More conversions.Other ways in and out of BSON and JSON.