google

    google/magika

    Fast and accurate AI powered file content types detection

    18.8K stars
    1.2K forks
    70 GitHub watchers
    Updated Nov 7, 2026
    View on GitHub

    Build with Backblaze B2

    SDKs, agent skills, IDE extensions, and reference pipelines from Backblaze Labs. All open source.

    Explore Backblaze Labs

    Loading star history...

    Where it stands

    Rank, growth pace and release cadence relative to everything GStars tracks.

    No releases in the last 90 days; the most recent was 197 days ago, with 52 contributors on GitHub.

    The biggest single-day gain in the last year, +942 stars on Apr 16, coincided with release cli-latest.

    Use Cases & Benefits

    • Detects file content types quickly and accurately using AI-powered deep learning models.
    • Delivers near-instant, highly precise file identification on a single CPU with a lightweight model.
    • Use for automating file type detection in large-scale security scanning pipelines like email or cloud storage.
    • Use for integrating file type recognition into malware analysis platforms such as VirusTotal.
    • Use for building developer tools that require fast, reliable MIME type or file format classification.

    Should you depend on it?

    License terms, project hygiene and risks, from GitHub metadata and GStars' snapshots.

    License

    Apache 2.0

    Permissive: commercial use, modification and redistribution are allowed with attribution; includes an explicit patent grant from contributors.

    Community files

    • README: present
    • Contributing guide: present
    • Code of conduct: present

    Watch-outs

    No watch-outs from GStars' checks.

    General guidance from repository metadata, not legal advice. How we score

    From the README

    Magika is a novel AI-powered file type detection tool that relies on the recent advance of deep learning to provide accurate detection. Under the hood, Magika employs a custom, highly optimized model that only weighs about a few MBs, and enables precise file identification within milliseconds, even when running on a single CPU. Magika has been trained and evaluated on a dataset of ~100M samples across 200+ content types (covering both binary and textual file formats), and it achieves an average ~99% accuracy on our test set.

    Here is an example of what Magika command line output looks like:

    Magika is used at scale to help improve Google users' safety by routing Gmail, Drive, and Safe Browsing files to the proper security and content policy scanners, processing hundreds billions samples on a weekly basis. Magika has also been integrated with VirusTotal (example) and abuse.ch (example).

    For more context you can read our initial announcement post on Google's OSS blog, you can consult Magika's website, and you can read more in our research paper, published at the IEEE/ACM International Conference on Software Engineering (ICSE) 2025.

    Excerpt from the google/magika README on GitHub (Apache-2.0 license). © its authors.Read the full README on GitHub

    Daily snapshots

    Stars gained per day, and how forks and open issues moved, from GStars' daily snapshots

    Sep 9: +46Sep 10: +10Sep 16: +4Sep 20: +3Sep 21: +6Sep 22: +8Sep 23: +8Sep 24: +5Sep 25: +9Sep 26: +4Sep 27: +5Sep 28: +10

    +805 stars over 74 days across 19 snapshot days; best day +46 on Sep 9.

    Forks

    1.2K+69

    Open issues

    158-6

    Compared with peers in AI

    Fastest-growing repositories GStars tracks in this cohort for the week of Nov 8, by 7-day star growth

    google/magika compared with AI repositories by stars, 7-day star growth, health score and last release
    RepositoryStars+7dHealthLast release
    D4Vinci/Scrapling101.1K+6.3K756 days ago
    thedotmack/claude-mem115.8K+4.7K75today
    heygen-com/hyperframes82.3K+4.0K75today
    harry0703/MoneyPrinterTurbo142.0K+3.8K753 days ago
    github/spec-kit149.2K+2.6K75today
    google/magika18.8K—54197 days ago
    Category median115.8K+4.0K75—

    Also by google

    Other repositories from this maintainer that GStars tracks

    Discover Repositories

    Search across tracked repositories by name or description