Inspiration I wanted a tool that could summarize text instantly — even without internet access. Most AI summarizers rely on cloud APIs, which means users can’t summarize offline and must send private text over the internet. So I built NanoSummarizer, a Chrome extension designed for Chrome’s built-in AI challenge. It gives users instant, privacy-first summaries right inside their browser.

What it does NanoSummarizer is a lightweight Chrome extension that summarizes any selected text or uploaded document — either online (via Gemini API) or offline (using on-device models).

Key Features: Offline summarization: Powered by Xenova’s on-device transformer model (distilbart-cnn-12-6), no internet required. Online mode: Uses a backend connected to Gemini API for advanced summaries. File summarization: Upload and summarize .txt or .pdf files directly. Instant summaries: Clean, short summaries appear within seconds in the popup. Privacy-focused: No data leaves your browser in offline mode.

How I built it NanoSummarizer was built using: Frontend: Vite + Vanilla JavaScript for the popup UI. Backend: Node.js + Express (for online Gemini-powered summarization). AI Models: Online: Google Gemini API (via local backend). Offline: Xenova Transformers (distilbart-cnn-12-6), loaded dynamically through JSDelivr CDN. Chrome Built-in AI APIs: Used Chrome’s new AI runtime context for offline computation and summarization tasks. Manifest v3: For secure extension permissions and local resource handling.

Challenges I ran into Making offline summarization work seamlessly within Chrome’s extension sandbox was challenging — especially with model loading and caching. Vite build configuration initially failed because it couldn’t find the popup.html entry file during bundling. Managing cross-origin restrictions and local model performance required multiple debugging rounds. Keeping summaries concise while running offline inference efficiently took careful tuning.

Accomplishments that I am proud of Achieved working offline summarization directly inside Chrome. Integrated both online and offline AI summarizers in one popup interface. Successfully passed the Vite + Manifest v3 build process for Chrome extensions. The extension runs fully offline, which is rare for summarizers.

What I learnt How to integrate Chrome’s new AI features with browser extensions. How to dynamically load and run on-device transformer models in the browser. The importance of optimizing user experience for speed and simplicity. Building for Chrome’s AI sandbox requires careful dependency handling and caching strategies.

What's next for NanoSummarizer — Chrome Builtin AI Text Summarizer Extension Add context-aware summarization (detect webpage type: article, PDF, email, etc.). Implement speech summary output for accessibility (text-to-speech). Extend multi-language summarization support. Publish NanoSummarizer on the Chrome Web Store. Contribute to Chrome’s AI ecosystem with tutorials for other developers.

Built With

Share this project:

Updates