BSON Validator - Validate MongoDB BSON Online
Validate BSON (Binary JSON) data online for free. Check integrity and structure.
How to Validate BSON - Step by Step Guide
Input Your BSON Data
Let's validate your BSON data! Whether you're working with MongoDB exports, checking data integrity, or debugging import issues, you have several convenient options:
Example: BSON Input (Base64)
Here's what encoded BSON data looks like:
bAAAAAdfaWQAZzi256sAAAAAAAAAAm5hbWUADgAAAEFsaWNlIEpvaG5zb24AAmVtYWlsABMAAABhbGljZUB0ZWNoY29ycC5jb20AEGFnZQAgAAAAEHNhbGFyeQAYcwEACGlzQWN0aXZlAAEA
Automatic Validation & Analysis
The magic happens instantly! As soon as you input BSON data, the validator automatically:
Example: Validated & Decoded Output
The same BSON, now validated and shown as readable JSON:
{ "_id": { "$oid": "6738b6e7ab00000000000000" }, "name": "Alice Johnson", "email": "[email protected]", "age": 32, "salary": 95000, "isActive": true }
Export Your Validated Data
Get your validated BSON data ready for use! Multiple export options make it easy to integrate into your workflow:
Frequently Asked Questions
How do I validate BSON data from MongoDB?
Paste the BSON as Base64 or Hex, or upload the .bson file that mongodump wrote. The check runs as soon as the input changes: every document is decoded, and you either get the decoded JSON with its size, field count and nesting depth, or a message that says what is wrong, such as a bad character with its line and column, or a document that was cut off.
What's the difference between Base64 and Hex format?
They are two text spellings of the same bytes. Base64 (A-Z, a-z, 0-9, + and /) is shorter, so it is what most APIs and logs use. Hex (0-9 and A-F, two digits per byte) is longer but easy to read byte by byte. Pick the one you pasted; if you choose the wrong one, the validator tells you. Switching the format rewrites valid input in the other spelling.
What MongoDB data types are detected?
Each special BSON type found anywhere in the data gets a tag under the output: ObjectId, Date, Long (64-bit integer), Decimal128, Binary, Timestamp, RegExp, MinKey, MaxKey, Code, Symbol and DBRef. Plain strings, booleans, 32-bit integers and doubles are not tagged.
Can I export the validated BSON data?
Yes. Copy puts the decoded JSON on your clipboard and Download saves it as validated-bson.json. The output is relaxed Extended JSON: ObjectIds, dates, binary data and decimals keep their $oid, $date, $binary and $numberDecimal wrappers, and long integers such as 8901240544102066246 are written with every digit. Ordinary numbers become plain JSON numbers, so the difference between a BSON int32, int64 and double is not kept in the text.
Does the validator fix corrupted BSON?
No. It reports the first problem it finds, for example a length header that does not match the data, stray bytes after the last document, or JSON text pasted where BSON was expected, and leaves the input as it is so you can fix it at the source.
Is my data uploaded anywhere?
No. Decoding and checking happen in your browser, and nothing you paste or upload is sent to our server. The tool is free and needs no account. Very large files are limited only by your browser memory, and a big upload can take a few seconds to show.