awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·

File format detection

Ranking updated Jul 27, 2026

For format detection, the strongest matches are ahupp/python-magic (Python-magic is a Python wrapper for libmagic that identifies), sindresorhus/file-type (This library detects file formats and MIME types by) and file/file (This repository hosts the canonical libmagic implementation used to). apache/tika and google/magika round out the shortlist. Each is ranked by relevance to your query, popularity and recent activity.

Hand-picked open-source file format detection libraries ranked by GitHub stars and activity, with alternatives compared to help you find the best fit.

File format detection

Find the best repos with AI.We'll search the best matching repositories with AI.
  • ahupp/python-magicahupp avatar

    ahupp/python-magic

    2,886View on GitHub↗

    python-magic is a C-binding wrapper that provides a Python interface for the libmagic system library. It functions as a file signature analyzer and MIME type detector, identifying file formats by comparing header bytes against a database of known binary signatures. The library enables the identification of file types from both file paths and raw data buffers. It supports custom file signature matching through the injection of user-provided magic databases, allowing for the detection of specialized or proprietary formats. The project covers binary data analysis and MIME type mapping to transl

    Python-magic is a Python wrapper for libmagic that identifies file formats and MIME types through magic number inspection, though it relies on external system libraries rather than a zero-dependency design.

    PythonFile Signature AnalyzersMIME Type Detectors
    View on GitHub↗2,886
  • sindresorhus/file-typesindresorhus avatar

    sindresorhus/file-type

    4,297View on GitHub↗

    file-type is a binary file type detector that identifies file extensions and MIME types by analyzing magic numbers and signature bytes in binary data. It functions as a magic number parser and MIME type resolver, mapping binary signatures to standardized media type strings. The project is an extensible file format identifier that allows for the addition of custom detector plugins to recognize uncommon or non-binary file formats. The engine supports binary format identification across various data sources, including buffers and data streams. It utilizes a supported format registry and provide

    This library detects file formats and MIME types by inspecting magic numbers in binary data and streams, making it a fitting choice though it lacks zero-dependency design and broad archive support.

    JavaScriptMIME Type Detectors
    View on GitHub↗4,297
  • file/filefile avatar

    file/file

    1,632View on GitHub↗

    File is a command-line utility and C library designed to determine the precise file format and media type of unknown files by inspecting their internal byte sequences, binary signatures, and hierarchical pattern rules rather than relying on file extensions. The software evaluates magic number signature matching and complex multi-byte offsets to classify files accurately. The engine supports recursive archive inspection, automatically unpacking compressed archive structures on the fly to analyze and identify internal nested file payloads. Human-readable pattern definitions can be compiled into

    This repository hosts the canonical libmagic implementation used to determine file types via magic number inspection and MIME type resolution, making it the definitive tool for this exact capability.

    CFile Content AnalysisBinary Signature EnginesC Shared Libraries
    View on GitHub↗1,632
  • apache/tikaapache avatar

    apache/tika

    3,572View on GitHub↗

    Tika is a content analysis toolkit and Java library designed for detecting and extracting metadata and text from thousands of different file types. It functions as a universal document text extractor and metadata extraction engine, converting complex files into plain text or XHTML. The system employs a specialized MIME type detector that identifies document formats using magic bytes and metadata to determine the correct parser. It serves as an OCR integration gateway, connecting to external text recognition tools to extract content from image files. The project covers a broad range of extrac

    Apache Tika is a comprehensive Java library and content analysis toolkit that performs MIME type and format detection using magic bytes and metadata inspection, though it is far heavier than a zero-dependency design.

    JavaMIME Type Detectors
    View on GitHub↗3,572
  • google/magikagoogle avatar

    google/magika

    17,139View on GitHub↗

    Magika is an AI content type classifier and MIME type prediction engine that uses deep learning to identify file formats based on binary data. It analyzes byte sequences through a neural network to predict the content type of a file and provide associated confidence scores. The system features a foreign function interface that allows the core detection logic to be integrated across different programming languages. It includes a mechanism for configuring detection sensitivity and per-type thresholds to balance precision and recall. The project provides capabilities for bulk file analysis via

    Magika is a deep learning-based content type classifier that predicts MIME types from byte sequences, offering an AI-driven alternative to traditional magic number inspection for automated file analysis.

    PythonContent Type DetectionDeep Learning ClassifiersFile Type Validators
    View on GitHub↗17,139
  • h2non/filetypeh2non avatar

    h2non/filetype

    2,295View on GitHub↗

    Fast, dependency-free Go package to infer binary file types based on the magic numbers header signature

    This Go package provides fast, dependency-free file type inference using magic numbers, fitting the core detection capability well though it lacks streaming detection and some broader document formats.

    GoFile Storage SystemsGeneral UtilitiesGeneral Utility Libraries
    View on GitHub↗2,295
  • thephpleague/mime-type-detectionthephpleague avatar

    thephpleague/mime-type-detection

    1,338View on GitHub↗

    Mime Type Detection is a PHP library for determining and mapping media types from file contents, paths, or extensions using fallback lookup strategies. It provides utilities for inspecting file metadata and resolving file formats within PHP applications. The library supports bidirectional mapping between file extensions and media types through static community-curated mapping tables alongside content-based inspection. It includes extension-to-media-type mapping, reverse lookups from media types to valid file extensions, and fallback resolution chains that attempt content inspection before fal

    This PHP library provides mime type detection using various adapters, making it a solid choice for resolving file formats despite lacking some advanced streaming or zero-dependency features.

    PHPMIME Type DetectionCommunity-Curated Mapping TablesExtension Fallback Chains
    View on GitHub↗1,338

Related searches

  • a middleware for handling http content negotiation
  • Data interchange formats
  • Data format samples
  • an open source rich text editor library
  • User agent parser
  • a lightweight JavaScript library for date formatting
  • a library for parsing unstructured data
  • Terminal output formatter