whatisgithub

What is browser-compat-data?

mdn/browser-compat-data — explained in plain English

Analysis updated 2026-06-26

5,663JSONAudience · developerComplexity · 2/5LicenseSetup · easy

In one sentence

A large structured dataset from Mozilla recording which browsers support which web features, Web APIs, CSS, HTML, and JavaScript, published as an npm package so any tool can query compatibility data programmatically.

Mindmap

mindmap
  root((browser-compat-data))
    What it is
      Browser support dataset
      npm package
      MDN source data
    Coverage
      Web APIs
      CSS properties
      HTML elements
      JavaScript features
    Used by
      MDN Web Docs
      VS Code
      CanIUse
      WebStorm
    Audience
      Web developers
      Tool builders
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Build a VS Code extension that shows inline browser support warnings when you write a CSS property or Web API call.

USE CASE 2

Write a linting rule that fails the build if your code uses a web feature not supported in your target browser list.

USE CASE 3

Query which browsers support a specific JavaScript feature to decide whether you need a polyfill before shipping.

USE CASE 4

Create a static compatibility table page like caniuse.com for a custom set of features, pulling data from the npm package.

What is it built with?

JSONNode.jsnpm

How do you get it running?

Difficulty · easy Time to first run · 5min
Use freely for any purpose including commercial use, the dataset is published under the CC0/MPL-2.0 license maintained by Mozilla.

So what is it?

This repository contains a large structured dataset recording which web features are supported by which browsers and JavaScript runtimes. It covers Web APIs (things browsers expose to JavaScript), CSS properties, HTML elements, and JavaScript language features. For each feature it records the browser version in which support was added, any versions in which it was removed, whether it is behind a flag or prefix, and similar details. The data is maintained by Mozilla and used as the source for the compatibility tables shown on the MDN Web Docs website. The data is stored as JSON files organized by technology area, and the whole set is published as an npm package called @mdn/browser-compat-data. Developers can install it via npm or yarn and then import it into their own tools and applications to query browser support information programmatically. Import examples are provided for modern Node.js (ESM with import attributes), older Node.js versions, Deno, and browser environments via a CDN. Beyond MDN Web Docs itself, this dataset is used by tools like CanIUse, Visual Studio Code, and WebStorm to show developers inline compatibility information while they write code. Because the dataset is machine-readable and versioned on npm, any project that cares about cross-browser compatibility can import it and build on top of it. The repository is community-maintained and open to contributions. A governance document explains how decisions are made, and a contributing guide outlines the process for submitting changes. The project has a community chat channel on Matrix. The documentation index provides an alphabetical listing of all the documentation files covering data formats, schema definitions, and contribution guidelines.

Copy-paste prompts

Prompt 1
Using @mdn/browser-compat-data, write a Node.js script that reads all CSS Grid properties and prints which ones are not supported in Safari 15.
Prompt 2
I want to build a CLI tool that takes a list of target browsers and CSS properties, then flags unsupported combinations. Help me write this using @mdn/browser-compat-data.
Prompt 3
Show me how to import @mdn/browser-compat-data in a browser via CDN and check whether the Web Animations API is available in the current browser version.
Prompt 4
Help me write a GitHub Action that reads @mdn/browser-compat-data and checks our codebase for any Web API usages that are not supported in Chrome 90 or later.

Frequently asked questions

What is browser-compat-data?

A large structured dataset from Mozilla recording which browsers support which web features, Web APIs, CSS, HTML, and JavaScript, published as an npm package so any tool can query compatibility data programmatically.

What language is browser-compat-data written in?

Mainly JSON. The stack also includes JSON, Node.js, npm.

What license does browser-compat-data use?

Use freely for any purpose including commercial use, the dataset is published under the CC0/MPL-2.0 license maintained by Mozilla.

How hard is browser-compat-data to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is browser-compat-data for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.