BSON Hex Viewer
Paste a one-field JSON object to see its BSON bytes in hex.
Result
How to use
- Enter your values in the fields above.
- Press Calculate to see your result instantly.
- Use the Share button to copy a link to your result.
About this calculator
BSON (Binary JSON) is the binary-encoded serialization format MongoDB uses to store documents and exchange them over its wire protocol — it extends JSON with extra types like dates and binary data, and every element in the byte stream follows the same layout: a one-byte type code, a null-terminated field-name string, and then the value encoded according to its type (e.g., a 32-bit little-endian integer, or a 4-byte length prefix followed by UTF-8 bytes for a string).
This viewer takes a small, single-field JSON document (one string or integer value) and encodes it exactly as MongoDB's driver would, then displays the resulting bytes as annotated hexadecimal — labeling the document length prefix, type byte, field name, and value bytes — so you can see how JSON's text representation maps onto BSON's compact binary layout without needing to run a database driver.
Was this helpful?
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
No calculators found
Comments (0)