SmallTools

BSON Encode / Decode

Binary JSON used by MongoDB. Convert between JSON and BSON.

Result
Hex

How to Use

01

Select Process

Choose 'Encode' to convert a JSON object into BSON bytes, or 'Decode' to turn BSON back into a readable JSON format.

02

Set Byte Format

Select whether you want your BSON bytes represented as a Hexadecimal string or a Base64 string.

03

Review Results

The conversion happens instantly. For encoding, ensure your input is a valid JSON object. For decoding, paste your BSON string.

Frequently Asked Questions

What is BSON?

BSON (Binary JSON) is a binary-encoded serialization of JSON-like documents. It is used primarily by MongoDB as a data storage and network transfer format.

How is BSON different from JSON?

BSON is designed to be efficient for both storage space and scan speed. It also supports more data types than JSON, such as Dates and binary data.

Is this tool secure for my database data?

Absolutely. All serialization and deserialization happen locally in your browser. We never transmit your data to any server, keeping your database snippets private.