What is YAML / BSON Converter?
YAML and BSON Converter supports MongoDB document and driver debugging. An ordinary YAML root object encodes to Base64 BSON, while decoded ObjectId, dates, long integers, and other BSON-specific values appear as explicit marker objects rather than being forced into misleading scalar values. Common workflows include the following. Generate MongoDB driver fixtures. Decode BSON Base64 from logs. Inspect long integers and dates. The page also documents input boundaries, output behavior, and practical cautions so you can review the result before putting it into an application, configuration, test, or production workflow.
When to use it
- Generate MongoDB driver fixtures.
- Decode BSON Base64 from logs.
- Inspect long integers and dates.
How to use it
- Use a root YAML object for encoding.
- Paste complete BSON Base64 for decoding.
- Load the example to verify ordinary fields.
- Convert and read the extended-type warning.
- Review the result against the destination driver contract.
- Load one of the realistic examples first to verify the selected options and processing direction before replacing it with your own data.
Runnable examples
The “Example 1” and “Example 2” buttons load the matching inputs. They cover different structures, directions, or boundaries and can be run directly in the workspace.
Example 1
site: JSONLane
release:
tools: 50
ready: true
tags: [yaml, bson]Example 2
IwAAAAJzaXRlAAkAAABKU09OTGFuZQAQdG9vbHMAMgAAAAA=Input rules
- YAML encoding requires a root object.
- Decoding requires complete BSON Base64.
- Dangerous keys and unsafe numbers are rejected.
- Text input is counted before processing and is limited to 1,500,000 characters on this page; file modes apply the separate file limit shown in the workspace.
- BSON encoding requires a YAML root object.
Output rules
- BSON binary uses Base64.
- Extended values become marker objects.
- Ordinary consumers may not understand markers.
- Output reflects only the current input, direction, and options; rerun after changing a mode or value instead of treating an earlier result as current.
- Binary BSON is carried as Base64.
Limitations and cautions
- BSON encoding requires a YAML root object.
- Binary BSON is carried as Base64.
- BSON-specific values appear as marker objects in YAML.
How your data is handled
All parsing, format conversion, Base64 work, and intermediate data remain in the current browser tab. JSONLane does not upload the input or retain it after refresh or close.