Skip to content
r.

magika

google/magika · Public GitHub repository

Fast and accurate AI powered file content types detection

Open project in RepoShelf

Open the project to try its demo, view the repository, or save it to your collection. Repository and demo actions use RepoShelf’s sign-in flow.

magika live demo screenshot
Captured from the live demo · 2026-11-20

About this project

Author-written excerpt from the project 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).

Requirements and intended audience

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.

Not recorded: account, external api key, paid service, self-hosting. Missing information does not mean there are no requirements.

Statements extracted from the author’s documentation · Checked 2026-11-01. Source: https://github.com/google/magika/blob/main/README.md

Recorded maintenance information

Last recorded source update: 2026-11-20. Saved release: cli/v1.1.0 · 2026-04-24. These dates do not guarantee ongoing maintenance.

Technologies
Rust
Licence
Apache-2.0. Generally permits modification and commercial use, subject to the licence’s notices and conditions.
Demo check
A public page loaded on 2026-11-20. This does not test every feature.

Browse related categories