# BSON Converter

Encode and decode data to/from BSON (Binary JSON) format

> Canonical page: https://elysiatools.com/en/tools/bson-converter

- **Category:** Format Conversion

- **Keywords:** bson, binary json, encode, decode, convert, binary, serialization, bson converter

## Overview

The BSON Converter is a streamlined utility designed to encode JSON data into BSON (Binary JSON) format or decode existing BSON data back into human-readable JSON. It simplifies the handling of binary-serialized data, providing flexible output options in Hexadecimal or Base64 to suit your development and debugging needs.

## Inputs

- **Input Data** (textarea): Enter JSON data to encode or BSON data to decode...
- **Operation** (select)
- **Output Format** (select)

## When to use

- When you need to inspect the binary structure of BSON documents used in MongoDB or other NoSQL databases.
- When preparing JSON payloads for systems that require BSON serialization for efficient storage or transmission.
- When debugging binary data streams that need to be converted into a readable format for verification.

## How it works

- Paste your JSON or BSON data into the input field.
- Select your desired operation: 'Encode to BSON' or 'Decode from BSON'.
- Choose your preferred output format, such as Hexadecimal or Base64.
- Click the convert button to generate and display your processed data.

## Use cases

- Verifying the binary representation of JSON documents before database insertion.
- Decoding raw binary data captured from network logs for troubleshooting.
- Converting configuration files between JSON and BSON for application compatibility.

## Frequently asked questions

### What is BSON?

BSON stands for Binary JSON. It is a binary-encoded serialization of JSON-like documents, commonly used in MongoDB for storage and network transfer.

### Can I convert BSON to JSON?

Yes, select the 'Decode from BSON' operation to transform binary BSON data back into standard JSON format.

### What output formats are supported?

The tool supports outputting the binary data as either Hexadecimal strings or Base64 encoded strings.

### Is this tool suitable for large BSON files?

This tool is optimized for quick snippets and small-to-medium data objects. For extremely large files, local command-line tools are recommended.

### Does this tool store my data?

No, all conversions are performed locally in your browser, ensuring your data remains private and secure.

## Related tools

- [Smile Converter](https://elysiatools.com/en/tools/smile-converter): Encode and decode data to/from Smile (binary JSON) format
- [UBJSON Converter](https://elysiatools.com/en/tools/ubjson-converter): Encode and decode data to/from UBJSON (Universal Binary JSON) format
- [Netrc Parser](https://elysiatools.com/en/tools/netrc-parser): Parse and convert Netrc file format to JSON
- [SSH Config Parser](https://elysiatools.com/en/tools/ssh-config-parser): Parse and convert SSH configuration file to JSON format
- [ASCII85 Converter](https://elysiatools.com/en/tools/ascii85-converter): Encode and decode text to/from ASCII85 format (Adobe version)
- [Avro Converter](https://elysiatools.com/en/tools/avro-converter): Encode and decode data to/from Avro data serialization format with schema support
- [Base32 Converter](https://elysiatools.com/en/tools/base32-converter): Encode and decode text to/from Base32 format with multiple variants
- [Base45 Converter](https://elysiatools.com/en/tools/base45-converter): Encode and decode text to/from Base45 format (RFC 9285)

## Samples

- [Hex/Unicode Encoding Format Samples](https://elysiatools.com/en/samples/text-hex-unicode-formats): Examples of hex (\xXX) and unicode (\uXXXX) escape sequence encoding formats
- [Windows Serialization - C# Samples](https://elysiatools.com/en/samples/windows-serialization-csharp): Comprehensive C# serialization examples for Windows platform including JSON, XML, binary serialization, and data transformation
- [JSON Samples](https://elysiatools.com/en/samples/json): JSON (JavaScript Object Notation) format examples from simple to complex structures
- [JWT Samples](https://elysiatools.com/en/samples/jwt-samples): Comprehensive JWT examples from basic token structure to advanced security implementations

## Related content

- [Binary Payload Encoding, Serialization, and Round-Trip Verification](https://elysiatools.com/en/hubs/binary-payload-serialization): Convert structured data between binary serialization formats, text transport encodings, and escaped representations, then verify fields and bytes through a controlled round trip.
- [JSON Normalization and Interchange Workflow](https://elysiatools.com/en/hubs/json-convert): Turn a structured source into a checked JSON representation, then export the exact table, configuration, document, API, XML, CSON, EDN, BSON, or UBJSON form required downstream.
