Magika

Magika

Fast, accurate AI-powered file content type detection

Visit Magika

About Magika

Magika is a novel AI-powered file type detection tool developed by Google that uses a custom, highly optimized deep-learning model to accurately identify binary and textual file content types within milliseconds, even on a single CPU. Trained and evaluated on a dataset of ~100M files across 200+ content types, it achieves ~99% average precision and recall, outperforming traditional signature-based and heuristic tools—especially on textual formats like source code and configuration files. It is available as a Rust-based CLI, a Python API, and bindings for JavaScript/TypeScript and GoLang, and is used internally at Google to route files in Gmail, Drive, and Safe Browsing.

Resources

Product Website

Visit Magika's official website for product details and getting started.

Visit website →

GitHub Repository

Access the source code, issues, and contributions related to Magika.

View on GitHub →