Google has released Magika, an AI-powered file type detection tool that uses a compact deep learning model to identify over 200 content types in just 5 milliseconds on a single CPU. Trained on 100 million files, Magika achieves 99% accuracy and is already used internally by Google to scan hundreds of billions of files weekly in Gmail and Drive.
Developers and security researchers can leverage Magika through its Rust-based CLI, Python API, and experimental JavaScript bindings. The tool excels at handling binary data, textual formats, and automating file management workflows. Its small model size (a few MB) allows fast deployment even on resource-constrained systems.
Magika is open-sourced on GitHub under the google/magika repository. Whether you're dealing with unknown file types or looking to enhance security pipelines, Magika offers a reliable, high-speed solution.