File Type

File Type

A file type detection library that identifies the real format of a file, stream or buffer from its binary magic numbers rather than the file extension, returning MIME type, extension and media type for common images, audio, video, documents and archives.

File Type on GitHub sindresorhus/file-type is a free MIT file type detection library, npm file-type 22.3.0 Node 22+, identifies real format from binary magic numbers rather than extension, returns MIME type extension and media type for common images audio video documents and archives, no sold paid tier (data as of Nov 22, 2026).

Visit Official Website

*This is an affiliate link, we may earn a commission at no extra cost to you.

Is File Type free?

File Type: file-type is free open-source software released under the MIT License; the file-type package latest 22.3.0 on npm requires Node 22 or above, published Oct 29, 2026. It detects real format from binary magic numbers instead of the extension, returning MIME type, extension and media type, with no paid commercial edition sold by the project (data as of Nov 22, 2026). Check the official page for current status before relying on it.

Frequently Asked Questions

Is File Type free?

The code is free to self-host, but a hosted plan from the vendor may not be. File Type publishes its source, so cost depends on where you run it.

How much does File Type cost?

file-type is free open-source software released under the MIT License; the file-type package latest 22.3.0 on npm requires Node 22 or above, published Oct 29, 2026. It detects real format from binary magic numbers instead of the extension, returning MIME type, extension and media type, with no paid commercial edition sold by the project (data as of Nov 22, 2026). Usage volume, plan limits and add-ons can push the bill above the figures shown, so confirm the current numbers on the vendor page before committing.

Where can I check File Type's current pricing?

On File Type's official site, linked from this page. We only publish a price after reading the vendor's own pricing page, so if this page shows no number, it means no traceable public price is on file — not that the tool is free.

What is File Type?

The module reads leading bytes and matches them against known magic-number signatures for images, audio, video, documents and archives, returning the detected MIME type and extension; it accepts buffers, streams or file paths and does not trust the filename extension. This catches mislabeled or renamed uploads before storage or processing.

How does pricing work?

The package installs free under its MIT license with no seat fee; it runs in Node or the browser bundle, and commercial detection rule maintenance or support would be arranged outside the open-source project.

How does File Type compare with other tools in Dev Workflow & Productivity?

File Type is listed in the Dev Workflow & Productivity category, alongside 2 other tools we track here. 2 of those 2 peers have a dated price we read from the vendor's own pricing page, and the table below shows each tool's pricing model next to the exact rate on file — so the comparison is between published numbers, not between marketing pages.

ToolPricing modelKey pricing on filePrice checked
File TypeOpen sourcefile-type is free open-source software released under the MIT License; the file-type package latest 22.3.0 on npm requires Node 22 or above, published Oct 29, 2026. It detects real format from binary magic numbers instead of the extension, returning MIME type, extension and media type, with no paid commercial edition sold by the project (data as of Nov 22, 2026).Nov 22, 2026
Image SizeOpen sourceimage-size is free open-source software released under the MIT License; the image-size package latest 2.1.0 on npm requires Node 18 or above, published Nov 6, 2026. It reads dimensions, type and orientation from an image file or buffer without full decoding, with no paid commercial edition sold by the project (data as of Nov 22, 2026).Nov 22, 2026
Mime TypesOpen sourcemime-types is free open-source software released under the MIT License; the mime-types package latest 3.0.2 on npm requires Node 18 or above, published Nov 20, 2025. It maps MIME types to extensions and back, parsing and generating Content-Type and Accept headers, with no paid commercial edition sold by the project (data as of Nov 22, 2026).Nov 22, 2026

3 of these 3 entries carry a specific price we read from the vendor's site. Where the column says there is no dated price on file, we have not verified a rate — treat that as unknown rather than free, and check the vendor's page before you budget for it.

Full pricing breakdown

File Type's source code is publicly available, so you can run or build it yourself. The project may also sell a paid hosted or cloud plan — check the official site for current pricing.

Open source does not always mean every hosted version is free.

Key pricing: file-type is free open-source software released under the MIT License; the file-type package latest 22.3.0 on npm requires Node 22 or above, published Oct 29, 2026. It detects real format from binary magic numbers instead of the extension, returning MIME type, extension and media type, with no paid commercial edition sold by the project (data as of Nov 22, 2026).

Estimate your monthly bill with our calculator →Or build a full stack around your budget →

Pricing Guides & Comparisons

Plan prices in these guides are read from each vendor's own pricing page, with the date we checked them.

⭐ Rate this tool

How would you rate this tool?

🚀 Never Miss a New AI Coding Tool

Join 1,000+ developers getting our weekly roundup: new AI tools, student free tiers, exclusive discounts, and side project deals. No spam, unsubscribe anytime.

Tool Information

  • Official Websitegithub.com
  • CategoryDev Workflow & Productivity
  • PricingOpen Source
  • Price checkedNov 22, 2026

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates