Data format
BSON Sample Files
BSON (.bson) files encode typed binary documents used by document databases and binary payload workflows. Use sample BSON files to validate binary payload inspection, document decoding, and nested object handling.
3 files
All to 50KB
SHA256 verified
Manifest included
Quick facts
Files first
BSON Sample Files — Download
Use cases
BSON Testing Workflows
Document Preview and Binary Review
Open Format BSONNested and Binary Field Validation
Open Format BSONCompare and decide
BSON Format Comparisons
FAQ and reference
BSON File FAQ
Checksum Verification
Use checksums to confirm file integrity after download.
shasum -a 256 your_file_name_here
# Compare output with SHA256 values listed above.
Where is the machine-readable manifest?
Use the manifest when you need stable names, SHA256 values, and URLs for automation.
Use in code — curl, Python, Node, wget
Copy any snippet directly into scripts, test suites, or CI pipelines. All URLs are stable and publicly accessible with no auth required.
# Download bson_binary_attachment_sample.bson
curl -L -o bson_binary_attachment_sample.bson \
https://samplefile.com/samples/download/data/bson/bson_binary_attachment_sample.bson/
# Or fetch a random BSON file
curl -s "https://samplefile.com/samples/api/random?format=bson" | jq -r '.download_url'
# Download bson_binary_attachment_sample.bson
wget -O bson_binary_attachment_sample.bson \
https://samplefile.com/samples/download/data/bson/bson_binary_attachment_sample.bson/
import requests
# Download a specific file
url = "https://samplefile.com/samples/download/data/bson/bson_binary_attachment_sample.bson/"
resp = requests.get(url)
with open("bson_binary_attachment_sample.bson", "wb") as f:
f.write(resp.content)
# Or fetch a random BSON file via API
meta = requests.get("https://samplefile.com/samples/api/random?format=bson").json()
resp = requests.get(meta["download_url"])
with open(meta["name"], "wb") as f:
f.write(resp.content)
// Download a specific file
const fs = require("fs");
const https = require("https");
const url = "https://samplefile.com/samples/download/data/bson/bson_binary_attachment_sample.bson/";
https.get(url, (res) => {
res.pipe(fs.createWriteStream("bson_binary_attachment_sample.bson"));
});
// Or fetch a random BSON via the API
const meta = await fetch("https://samplefile.com/samples/api/random?format=bson").then(r => r.json());
const file = await fetch(meta.download_url);
// use file.arrayBuffer(), file.body, etc.
# Random BSON file (JSON response)
GET https://samplefile.com/samples/api/random?format=bson
# All BSON files
GET https://samplefile.com/samples/api/files?format=bson
# Manifest with SHA256 checksums
GET https://samplefile.com/samples/data/bson/manifest.json
# Response includes: name, size_bytes, mime_type, sha256, download_url
Validation Methodology
- Validate extension and MIME detection before processing.
- Benchmark performance with small and larger files.
- Test malformed-input handling and error messaging.
Fixture Matrix
Use the curated BSON matrix to choose the right clean, edge-case, and broken fixtures for this format.
Open Matrix
Workflow Packs