What Is JSON to BSON Converter?
This tool converts standard JSON into MongoDB's extended JSON format (commonly called BSON representation). Numbers are wrapped in $numberInt or $numberDouble, ISO date strings become $date with $numberLong timestamps, and ObjectId strings become $oid.
How to Use
- Paste your standard JSON into the input field.
- Click "Convert to BSON" to transform it.
- Use the output in MongoDB queries, scripts, or migrations.
Frequently Asked Questions
What formats does it recognize for dates?
ISO 8601 date strings (e.g., "2024-01-15T00:00:00.000Z") and numeric timestamps are detected and converted to $date format.
Can I convert BSON back to standard JSON?
Yes, toggle the direction or use the BSON to JSON converter.