Skip to content
JS
Package

sanitize-filename

Sanitize a string for use as a filename

v1.6.4, 20 Mar 2026WTFPL OR ISCCommonJSTypes: BundledSecurity
$ npm install sanitize-filename

Key numbers

As of 25 Sept 2026
Weekly downloads
6.9m
+169% over 12 months
Gzip bundle size
-
No Bundlephobia data
Dependencies
1
Direct, from package.json
Last release
6 months ago
v1.6.4
GitHub stars
371
51 forks
Open issues / PRs
12 / 14
Contributors
-
Commits, last 52 weeks
2

Downloads

Last week 2026-09-15 to 2026-09-21
02.5m5m7.5m10mSept 2025Mar 2026Sept 2026High 8.7m (25 Aug 2026)Low 1.7m (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.

6,873,782 downloads last week, 32,224,227 in the last month. The 12-month change of +169% compares the average of the last 4 weeks with the first 4 weeks of the series.

Releases, last 12 months
123 in total
Latest version
1.6.4, 20 Mar 20266 months ago
First published
30 Aug 2013
Last push to GitHub
20 Mar 2026188 days before the snapshot
Repository archived
No
Open issues
12
Open pull requests
14
Commits, last 52 weeks
2
Dependents on npm
1,445

Major versions

  1. v1 first release 1.0.0, 30 Aug 2013

Recent releases

VersionPublished
1.6.420 Mar 2026
1.6.326 Aug 2019
1.6.228 Jul 2019
1.6.129 Sept 2016
1.6.029 Apr 2016
1.5.39 Nov 2015
1.5.26 Nov 2015
1.4.510 Oct 2015
1.4.425 Sept 2015
1.4.311 Sept 2015
1.4.212 Aug 2015
1.4.131 Jul 2015
1.4.031 Jul 2015
1.3.024 Mar 2015
Module format
CommonJSFrom package.json type, main and exports fields
TypeScript types
Bundled
Node.js engine range
Not declared
Runtimes
-
Unpacked size (npm)
17 kB
Dependencies (1)
truncate-utf8-bytes
npm install sanitize-filename
  • jsDelivrhttps://cdn.jsdelivr.net/npm/sanitize-filename@1.6.4/
  • unpkghttps://unpkg.com/sanitize-filename@1.6.4/
  • esm.shhttps://esm.sh/sanitize-filename@1.6.4
Sources: npm registry, npm downloads API, GitHub API. Data fetched 25 Sept 2026.

Indexability: Indexed.