What is XML / BSON Converter?
XML and BSON Converter supports MongoDB document and driver debugging. Ordinary XML objects encode to BSON carried as Base64. During decoding, ObjectId, dates, and long integers remain Extended JSON markers before XML-root and element-name validation, avoiding misleading scalar rewrites. Common workflows include the following. Generate BSON driver fixtures. Decode BSON Base64 from logs. Inspect long integers and ObjectId mapping. 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 BSON driver fixtures.
- Decode BSON Base64 from logs.
- Inspect long integers and ObjectId mapping.
How to use it
- Use complete XML for encoding.
- Use complete BSON Base64 for decoding.
- Load the example to verify the root document.
- Convert and read extended-type warnings.
- Validate again with the destination MongoDB driver.
- 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><name>JSONLane</name><release><tools>60</tools></release></site>Example 2
MQAAAANzaXRlACYAAAACbmFtZQAJAAAASlNPTkxhbmUAAnRvb2xzAAMAAAA2MAAAAA==Input rules
- Encoding requires safe XML.
- Decoding requires complete BSON Base64.
- Decoded objects must form valid XML names.
- 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.
- Binary BSON is displayed as Base64.
Output rules
- BSON binary uses Base64.
- Extended values remain marker objects.
- Original XML node types cannot all be recovered.
- Output reflects only the current input, direction, and options; rerun after changing a mode or value instead of treating an earlier result as current.
- Decoded data must form one valid XML root key.
Limitations and cautions
- Binary BSON is displayed as Base64.
- Decoded data must form one valid XML root key.
- Extended JSON markers do not recreate original XML types.
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.