mime-types
npmv3.0.2The ultimate javascript content-type utility.
Overview
mime-types is an npm package that the ultimate javascript content-type utility. It is extremely widely used, with about 215.3M downloads per week and 3 known dependents in the graph. The latest version is 3.0.2, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need the ultimate javascript content-type utility and value a battle-tested, widely-adopted solution.
When not to use it
Consider an alternative if you need to have first-class TypeScript types out of the box, or if a more actively-maintained option better fits your npm stack.
Pros
- Large, well-established user base (215.3M weekly downloads).
- Clear open-source license (MIT).
Cons
- No bundled TypeScript types (may require a separate @types package).
Auto-generated from collected registry metadata. No external claims are inferred.
Relationship graph
Dependencies (left) and dependents (right) of mime-types.
Dependencies
Runtime (1)
Dev (9)
Used by
Popular packages that depend on mime-types.
Higher-level content negotiation
Better streaming static file server with Range and conditional-GET support
Infer the content-type of a request.
Fast, unopinionated, minimalist web framework
Koa web app framework
A library to create readable "multipart/form-data" streams. Can be used to submit forms and file uploads to other web applications.
Alternatives to mime-types
Media Type Database
Strict TypeScript and Flow types for style based on MDN data
Type definitions and documentation for Bun, an incredibly fast JavaScript runtime
[](https://github.com/mmkal/expect-type/actions/workflows/ci.yml)  [](ht
Implements the WebIDL algorithms for converting to and from JavaScript values
Frequently installed together
An AST-based pattern checker for JavaScript.
HTTP status utility
Create HTTP error objects
Create and parse HTTP Content-Type header
Encode a URL to a percent-encoded form, excluding already-encoded sequences
Execute a callback when a request closes, finishes, or errors
HTTP response freshness testing
Escape string for use in HTML
Lightweight debugging utility for Node.js and the browser
Higher-level content negotiation
Infer the content-type of a request.
Create and parse Content-Disposition header
Version history
| Version | Published | License |
|---|---|---|
| 3.0.2latest | 8 months ago | MIT |
| 3.0.1 | 1 year ago | MIT |
| 3.0.0 | 1 year ago | MIT |
| 2.1.35 | 4 years ago | MIT |
| 2.1.34 | 4 years ago | MIT |
| 2.1.33 | 4 years ago | MIT |
| 2.1.32 | 5 years ago | MIT |
| 2.1.31 | 5 years ago | MIT |
| 2.1.30 | 5 years ago | MIT |
| 2.1.29 | 5 years ago | MIT |
| 2.1.28 | 5 years ago | MIT |
| 2.1.27 | 6 years ago | MIT |
| 2.1.26 | 6 years ago | MIT |
| 2.1.25 | 6 years ago | MIT |
| 2.1.24 | 7 years ago | MIT |
| 2.1.23 | 7 years ago | MIT |
| 2.1.22 | 7 years ago | MIT |
| 2.1.21 | 7 years ago | MIT |
| 2.1.20 | 8 years ago | MIT |
| 2.1.19 | 8 years ago | MIT |
Funding
Frequently asked questions
How do I install mime-types?
Run `npm install mime-types` to add mime-types to your npm project.
What license is mime-types released under?
mime-types is distributed under the MIT license.
How popular is mime-types?
mime-types has approximately 215,272,343 downloads per week and 3 known dependent packages.