Skip to content
JS
Package

gray-matter

Parse front-matter from a string or file. Fast, reliable and easy to use. Parses YAML front matter by default, but also has support for YAML, JSON, TOML or Coffee Front-Matter, with options to set custom delimiters. Used by metalsmith, assemble, verb and

v4.0.3, 24 Apr 2021MITCommonJSTypes: BundledParsers and serialisersMarkdown
$ npm install gray-matter

Key numbers

As of 25 Sept 2026
Weekly downloads
7.1m
+221% over 12 months
Gzip bundle size
-
No Bundlephobia data
Dependencies
4
Direct, from package.json
Last release
5 years ago
v4.0.3
GitHub stars
4.5k
169 forks
Open issues / PRs
54 / 27
Contributors
-
Commits, last 52 weeks
0

Downloads

Last week 2026-09-15 to 2026-09-21
02.5m5m7.5m10mSept 2025Mar 2026Sept 2026High 9m (18 Aug 2026)Low 1.5m (23 Dec 2025)
Weekly npm downloads, one point per week, weeks starting 23 Sept 2025 to 15 Sept 2026. The y axis starts at zero.

7,081,736 downloads last week, 33,503,692 in the last month. The 12-month change of +221% compares the average of the last 4 weeks with the first 4 weeks of the series.

Releases, last 12 months
055 in total
Latest version
4.0.3, 24 Apr 20215 years ago
First published
28 Jan 2014
Last push to GitHub
14 Jun 2025467 days before the snapshot
Repository archived
No
Open issues
54
Open pull requests
27
Commits, last 52 weeks
0
Dependents on npm
5,238

Major versions

  1. v4 first release 4.0.0, 2 Apr 2018
  2. v3 first release 3.0.0, 30 Jun 2017
  3. v2 first release 2.0.0, 26 Mar 2015
  4. v1 first release 1.0.0, 5 Dec 2014
  5. v0 first release 0.1.0, 28 Jan 2014

Recent releases

VersionPublished
4.0.324 Apr 2021
4.0.211 Jan 2019
4.0.12 Apr 2018
4.0.02 Apr 2018
3.1.121 Oct 2017
3.1.019 Oct 2017
3.0.85 Oct 2017
3.0.722 Sept 2017
3.0.615 Sept 2017
3.0.514 Sept 2017
3.0.414 Sept 2017
3.0.319 Aug 2017
3.0.21 Jul 2017
3.0.130 Jun 2017
Module format
CommonJSFrom package.json type, main and exports fields
TypeScript types
Bundled
Node.js engine range
>=6.0
Runtimes
-
Unpacked size (npm)
38 kB
Dependencies (4)
js-yamlkind-ofsection-matterstrip-bom-string
npm install gray-matter
  • jsDelivrhttps://cdn.jsdelivr.net/npm/gray-matter@4.0.3/
  • unpkghttps://unpkg.com/gray-matter@4.0.3/
  • esm.shhttps://esm.sh/gray-matter@4.0.3
PackageWeekly downloadsGzipLast releaseModuleComparison
@11ty/gray-matter429.3k-1 month agoCommonJS-
micromark-extension-frontmatter5.4m-3 years agoESM only-
mdast-util-from-markdown40.6m-7 months agoESM only-
@textlint/fixer-formatter128.3k-1 month agoCommonJS-
tablemark71.8k-1 year agoESM only-
@marp-team/marp-core98.1k-2 months agoCommonJS-
marked55.3m-2 days agoESM only-
mdast-util-to-string42m-3 years agoESM only-
Sources: npm registry, npm downloads API, GitHub API. Data fetched 25 Sept 2026.

Indexability: Indexed.