Get Started Free

More information about BSON document size

MongoDB stores documents as BSON (Binary JSON), a binary encoding of your JSON-like data. BSON is not the same size as the JSON text: each field carries a type byte and a length prefix, and values are stored in fixed binary widths. This tool estimates that encoded size.

The 16 MB limit

A single BSON document cannot exceed 16 MB. Hit that ceiling and writes fail, so it's worth watching for documents with large arrays or embedded blobs. If you're approaching the limit, reference large sub-documents in a separate collection or store binary payloads in GridFS.

How BSON size is calculated

Frequently asked questions

VisuaLeaf

Model documents that stay within limits using VisuaLeaf

VisuaLeaf's visual schema designer helps you spot unbounded arrays and oversized embeds before they become a problem, alongside a full MongoDB and SQL client with query builders and charts.

MongoDB & SQL in one client
Visual query & aggregation builders
Live visual schema diagrams
Charts, dashboards & query profiler
Connection manager for local, cloud & teams
Free Community Edition