Author: Suraj Van Verma (id: bythebug)
A lightweight, static web app that classifies whether an image is AI-generated or a real photograph using metadata and provenance signals. Runs entirely in the browser.
Demo: https://aiimagedetector.netlify.app/
- Drag-and-drop image upload with preview
- Client-side EXIF/XMP/IPTC parsing (via
exifr) – no uploads to any server - Heuristic classification with confidence and human-readable reasons
- Raw metadata viewer for transparency/debugging
- Clipboard paste and URL loading
- Confidence breakdown UI (per-signal contributions)
- Basic C2PA/JUMBF provenance scan (experimental)
- Theme toggle (light/dark)
- Open
index.htmldirectly in your browser, or serve the folder with any static server. - Drag and drop an image (PNG, JPG/JPEG, WebP, HEIC) onto the dropzone.
- Read the verdict (AI or Non-AI), confidence, and reasons. Expand "Show raw metadata" to inspect details.
Tip: For local dev with a static server:
# macOS has Python; this starts a simple server on http://localhost:8000
cd "/Users/sverma/Files/Git/AI Image Detector" && python3 -m http.server 8000- Parses EXIF (and XMP/IPTC when available) using
exifrand applies heuristics such as:- Presence of AI tool names in
Softwareor XMP fields (e.g., Stable Diffusion, DALL·E, Midjourney) - Presence/absence of typical camera EXIF fields (Make/Model/Exposure/etc.)
- File type patterns (e.g., PNG without EXIF is common in AI exports)
- Known camera vendor signals (Canon, Nikon, Sony, Apple, etc.)
- Presence of AI tool names in
- Produces a verdict, confidence score, and a list of reasons.
- Camera EXIF (Make/Model/Exposure/GPS/Date): strong Non-AI signal
- AI tool in Software tag: strong AI signal
- PNG without EXIF: weak AI signal
- Edited-in-editor tags: very weak AI signal
The UI shows a breakdown of which signals contributed to the decision.
- This project deliberately avoids an ML model. It relies on metadata/provenance heuristics to provide transparent, explainable results that run fully client-side. A model can be added later if desired, but is not required for this tool’s purpose.
- Parses JPEG markers (APP11) and PNG text chunks to detect JUMBF/C2PA references and surfaces counts and offsets in debug.
- Note: This is still not full trust verification. For cryptographic validation of provenance, integrate a dedicated C2PA verification library and policy.
- Images never leave your device. All analysis happens locally in your browser.
- This tool provides heuristic indications, not definitive proof. It can produce false positives/negatives, especially if metadata is stripped or manipulated.
- Plain HTML/CSS/JS
exifrvia CDN for metadata parsing
- Open
tests.html, paste a list of image URLs (direct links), and click Run. The app exposeswindow.AIDetector.readMetadataandwindow.AIDetector.classifyfor automation.
- Recommend GitHub Pages/Netlify. Deploy the root folder as a static site.
MIT