Gathering detailed insights and metrics for @mdn/browser-compat-data
Gathering detailed insights and metrics for @mdn/browser-compat-data
Gathering detailed insights and metrics for @mdn/browser-compat-data
Gathering detailed insights and metrics for @mdn/browser-compat-data
mdn-browser-compat-data
Browser compatibility data provided by the Mozilla Developer Network
@xelzs/mdn-browser-compat-api
Request the @mdn/browser-compat-data (used by caniuse.com)
mdn-browser-compat-lite
A smaller version of mdn-browser-compat-data, with only the essentials!
@patrickkettner/mdn-browser-compat-data
Browser compatibility data provided by MDN Web Docs
Browser compatibility data for Web technologies as displayed on MDN
npm install @mdn/browser-compat-data
Typescript
Module System
Node Version
NPM Version
JSON (98.18%)
TypeScript (1.81%)
JavaScript (0.02%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
CC0-1.0 License
5,312 Stars
19,205 Commits
2,223 Forks
255 Watchers
27 Branches
1,108 Contributors
Updated on Jul 12, 2025
Latest Version
6.0.31
Package Id
@mdn/browser-compat-data@6.0.31
Unpacked Size
16.05 MB
Size
785.83 kB
File Count
8
NPM Version
10.9.2
Node Version
22.17.0
Published on
Jul 11, 2025
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
No dependencies detected.
@mdn/browser-compat-data
https://github.com/mdn/browser-compat-data
The browser-compat-data
("BCD") project contains machine-readable browser (and JavaScript runtime) compatibility data for Web technologies, such as Web APIs, JavaScript features, CSS properties and more. Our goal is to document accurate compatibility data for Web technologies, so web developers may write cross-browser compatible websites easier. BCD is used in web apps and software such as MDN Web Docs, CanIUse, Visual Studio Code, WebStorm and more.
Read how this project is governed.
Chat with us on Matrix at chat.mozilla.org#mdn!
Are you interested in contributing to this project? Check out the Contributing to browser-compat-data documentation.
[!TIP] Looking for something? Consult the alphabetical index of the project documentation.
You can install @mdn/browser-compat-data
as a node package.
1npm install @mdn/browser-compat-data 2# ...or... 3yarn add @mdn/browser-compat-data
Then, you can import BCD into your project with either import
or require()
:
1// ESM with Import Attributes (NodeJS 20+) 2import bcd from '@mdn/browser-compat-data' with { type: 'json' }; 3// ...or... 4const { default: bcd } = await import('@mdn/browser-compat-data', { 5 with: { type: 'json' }, 6}); 7 8// ...or... 9 10// ESM with Import Assertions (NodeJS 16+) 11import bcd from '@mdn/browser-compat-data' assert { type: 'json' }; 12// ...or... 13const { default: bcd } = await import('@mdn/browser-compat-data', { 14 assert: { type: 'json' }, 15}); 16 17// ...or... 18 19// ESM Wrapper for older NodeJS versions (NodeJS v12+) 20import bcd from '@mdn/browser-compat-data/forLegacyNode'; 21// ...or... 22const { default: bcd } = await import('@mdn/browser-compat-data/forLegacyNode'); 23 24// ...or... 25 26// CommonJS Module (Any NodeJS) 27const bcd = require('@mdn/browser-compat-data');
You can import @mdn/browser-compat-data
using a CDN.
1// ESM with Import Attributes (Deno 1.37+) 2import bcd from 'https://unpkg.com/@mdn/browser-compat-data' with { type: 'json' }; 3// ...or... 4const { default: bcd } = await import( 5 'https://unpkg.com/@mdn/browser-compat-data', 6 { 7 with: { type: 'json' }, 8 } 9); 10 11// ...or... 12 13// ESM with Import Assertions (Deno 1.17+) 14import bcd from 'https://unpkg.com/@mdn/browser-compat-data' assert { type: 'json' }; 15// ...or... 16const { default: bcd } = await import( 17 'https://unpkg.com/@mdn/browser-compat-data', 18 { 19 assert: { type: 'json' }, 20 } 21); 22 23// ...or... 24 25// Fetch Method (Deno 1.0+) 26const bcd = await fetch('https://unpkg.com/@mdn/browser-compat-data').then( 27 (response) => response.json(), 28);
You can obtain the raw compatibility data for @mdn/browser-compat-data
using a CDN and loading the data.json
file included in releases.
1https://unpkg.com/@mdn/browser-compat-data/data.json
Once you have imported BCD, you can access the compatibility data for any feature by accessing the properties of the dictionary.
1// Grab the desired support statement 2const support = bcd.css.properties.background.__compat; 3// returns a compat data object (see schema) 4 5// You may use any syntax to obtain dictionary items 6const support = bcd['api']['Document']['body']['__compat'];
The @mdn/browser-compat-data
package contains a tree of objects, with support and browser data objects at their leaves. There are over 15,000 features in the dataset; this documentation highlights significant portions, but many others exist at various levels of the tree.
The definitive description of the format used to represent individual features and browsers is the schema definitions.
Apart from the explicitly documented objects below, feature-level support data may change at any time. See Semantic versioning policy for details.
The package contains the following top-level objects:
__meta
An object containing the following package metadata:
version
- the package versiontimestamp
- the timestamp of when the package version was builtapi
Data for Web API features.
browsers
Data for browsers and JavaScript runtimes. See the browser schema for details.
css
Data for CSS features, including:
at-rules
- at-rules (e.g. @media
)properties
- Properties (e.g. background
, color
, font-variant
)selectors
- Selectors (such as basic selectors, combinators, or pseudo elements)types
- Value types for rule valueshtml
Data for HTML features, including:
elements
- Elementsglobal_attributes
- Global attributeshttp
Data for HTTP features, including:
headers
- Request and response headersmethods
- Request methodsstatus
- Status codesjavascript
Data for JavaScript language features, including:
builtins
- Built-in objectsclasses
- Class definition featuresfunctions
- Function featuresgrammar
- Language grammaroperators
- Mathematical and logical operatorsstatements
- Language statements and expressionsmanifests
webapp
- Web App manifest keysmathml
Data for MathML features, including:
elements
- Elementssvg
Data for SVG features, including:
attributes
- Attributeselements
- Elementswebassembly
Data for WebAssembly features.
webdriver
Data for WebDriver features, including:
bidi
- WebDriver BiDi protocolclassic
- WebDriver Classic protocolwebextensions
Data for WebExtensions features, including:
api
- WebExtension-specific APIsmanifest
- manifest.json
keysFor the purposes of semantic versioning (SemVer), the public API consists of:
The details of browser compatibility change frequently, as browsers ship new features, standards organizations revise specifications, and Web developers discover new bugs. We routinely publish updates to the package to reflect these changes.
You should expect lower-level namespaces, feature data, and browser data to be added, removed, or modified at any time. That said, we strive to communicate changes and preserve backward compatibility; if you rely on a currently undocumented portion of the package and want SemVer to apply to it, please open an issue.
Now that you know what this project is, let's mention what this project isn't. This project is not:
If you find a problem with the compatibility data (such as incorrect version numbers) or there is a new web feature you think we should document, please file a bug.
Thank you for your interest in contributing to this project! See Contributing to browser-compat-data for more information.
Here are some projects using the data, as an npm module or directly:
webhint.io
- Tool that uses BCD to checks CSS and HTML for unsupported features (see @hint/utils-compat-data
package).Thanks to:
![]() The BrowserStack Open Source Program for testing services |
![]() Sauce Labs Open Source for testing services |
![]() LambdaTest Open Source for testing services |
No vulnerabilities found.
Reason
all changesets reviewed
Reason
30 commit(s) and 2 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
dependency not pinned by hash detected -- score normalized to 6
Details
Reason
SAST tool is not run on all commits -- score normalized to 3
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
project is not fuzzed
Details
Reason
Project has not signed or included provenance with any releases.
Details
Reason
security policy file not detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More