BSON to JSON

Input
Output

BSON and Extended JSON Converter

Turn MongoDB data into plain JSON, and plain JSON into data MongoDB keeps the types of. It reads Extended JSON ({"$oid": …}, {"$date": …}), output copied from mongosh or the old mongo shell (ObjectId('…'), ISODate('…'), NumberLong(…)) and BSON bytes, also several documents from mongodump.

How do I use the BSON to JSON?

  1. Paste Extended JSON or mongosh output, or drop a .bson file.
  2. Pick the direction: to plain JSON, to Extended JSON (canonical, relaxed or mongosh), or to and from BSON.
  3. Copy the result, or save BSON as a .bson file.

What does the BSON to JSON do?

  • ObjectId, dates, Int32, Int64, Double, Decimal128, binary and UUID, regex, timestamps, MinKey and MaxKey
  • Int64 and Decimal128 keep every digit in plain JSON
  • Spots 24-digit hex ids and ISO dates when going to Extended JSON
  • Canonical and relaxed Extended JSON v2, or mongosh syntax
  • Reads BSON as Base64 or hex and writes it back

Frequently asked questions

Which Extended JSON does it write?
Version 2, the one mongoexport and the drivers use. Relaxed keeps numbers and dates readable; canonical types every value so nothing is lost.
Is my data uploaded?
No. Bracely runs entirely in your browser, so nothing you paste or open leaves your device.

More JSON tools

Bracely has more than 65 JSON tools in one page. Related ones:

Runs entirely in your browser. Nothing you paste is uploaded. Made by Saurabh Pagrut. About · Privacy policy
Last updated · Version 2.1 · Changelog
Saurabh Pagrut on GitHub · LinkedIn · X · YouTube · Instagram