# mongodb/js-bson

BSON Parser for node and browser

Repository: https://github.com/mongodb/js-bson
Canonical: https://ross.abutalabs.com/products/js-bson
Language: TypeScript
License: Apache-2.0
License Family: permissive
Topics: bson, bson-library, mongodb, node-js, nodejs
Last push: 2026-09-03T00:11:15+00:00

## Health v2 (maintenance only)
Score: 99/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 100, release rhythm 97, longevity 100
- inputs: {"age_days": 5291, "days_push": 0, "days_rel": 22, "gap_med": 15.5, "n_releases_24m": 19}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1216, forks 273 (observed 2026-09-03T02:15:15.226130+00:00)

## What it is
The official BSON (Binary JSON) parser library for Node.js and browsers, maintained by MongoDB. It serializes and deserializes JSON-like documents to and from the BSON binary format, including types like ObjectId, and supports EJSON stringification.

## Use cases
- serialize documents to bson binary format
- deserialize bson bytes back into javascript objects
- work with mongodb objectid and extended
- parse bson data in the browser
- encode -like documents for storage or network transfer

## When to choose
- you need to encode or decode BSON, e.g. when working with MongoDB data directly
- you need BSON support in both Node.js and browser environments
- you need EJSON (Extended JSON) serialization of MongoDB-specific types

## When to avoid
- you just need plain JSON serialization with no binary format requirements
- you are using a MongoDB driver, which already bundles BSON internally
- you need a human-readable data interchange format rather than binary

## Facets
- artifact type: library
- maturity: stable
- function: serialization, parser
- domain: databases, developer-tools
- platform: browser, cross-platform
- tags: bson, binary-, mongodb, e, typescript, nodejs

## Member repositories
- mongodb/js-bson (main) score 99

## Provenance
- Observed fields: from GitHub, fetched 2026-09-03T02:15:15.226130+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:17:11.928478+00:00, confidence not recorded.
  - readme: https://github.com/mongodb/js-bson (fetched 2026-09-03T02:15:15.226130+00:00, sha ae113d354290)
- Data as of 2026-08-30T08:39:29.467469+00:00.
