π§ Web2Social β Turning Webpages into Social-Ready Content
Built for Google Chrome AI Hackathon 2025
![]()
π‘ Inspiration
I personally got to know about the Google Chrome AI Challenge only 16 hours before the submission deadline β but that sparked the idea behind Web2Social.
Every day, I see amazing blogs, hackathon projects, and technical write-ups go unnoticed because they never make it to social media. That short timeframe inspired me to build something fast, practical, and meaningful β a Chrome AI extension that could instantly turn those hidden gems into social-ready stories.
If knowledge can be transformed into scroll-stopping social content, it can reach everyone β not just those who read long-form blogs.
π Problem Statement
High-quality technical content β such as blogs, research papers, hackathon projects, competition recaps, and product release notes β often fails to reach the wider audience it deserves.
While creators share valuable insights, the content usually lives in long-form articles or documentation that few people read. Meanwhile, audiences are spending hours doomscrolling social media, where short-form and engaging content dominates.
However:
- Rewriting a technical blog into multiple platform-appropriate posts is time-consuming.
- Each social platform has a unique tone, length, and audience style.
- As a result, great ideas stay undiscovered, limiting knowledge sharing and visibility.
π‘ Insight
βIf developers, creators, and startups could automatically transform their blogs, hackathon summaries, and release notes into platform-ready social media content, their knowledge could spread faster and reach more people.β
π Solution β Web2Social
Web2Social is a Chrome Extension powered by Gemini Nano, Chromeβs on-device AI model. It transforms any webpage into ready-to-post social content for all major platforms β with just one click.
πͺ What It Does
- Reads the currently open webpage (blog, article, project, release note).
- Uses Chromeβs on-device AI APIs to summarize, rewrite, and generate social content.
Creates optimized, structured posts for:
- π©³ YouTube Shorts
- π΅ TikTok
- π§΅ X (Twitter)
- πΌ LinkedIn
- π¬ Facebook
- πΈ Instagram
- π Pinterest
- πͺΆ Reddit
Works fully offline β your data never leaves your device.
Supports multimodal prompting β you can type or upload audio to modify the AI system prompt.
β¨ Key Features
| Feature | Description |
|---|---|
| π§© AI-Powered Repurposing | Converts long-form text into short-form social media content. |
| π§ Multi-Stage AI Pipeline | Summarization β Script Writing β Rewriting β Proofreading β Scene Planning β Translation. |
| π£οΈ Multimodal Input | Update system prompts by typing or uploading an audio file (auto-transcribed to text). |
| π§Ύ Structured JSON Outputs | Every AI response follows schema validation for reliable results. |
| π Privacy-First | Runs on-device using Chromeβs globalThis.ai APIs. |
| πΎ Session History | Automatically stores your last 5 generations for reuse. |
| βοΈ Customizable Prompts | Edit the system prompt directly or transcribe a voice note for creative control. |
βοΈ Setup & Installation
Follow these steps to install and run Web2Social locally.
π§ Prerequisites
Web2Social uses experimental Chrome AI APIs that are currently only available in Chrome Canary.
β Step 1: Install Chrome Canary
Download and install from: π https://www.google.com/chrome/canary/
β Step 2: Enable Required Flags
Open a new tab and go to:
chrome://flags/
Then enable the following flags:
#enable-experimental-web-platform-features
#optimization-guide-on-device-model
#prompt-api-for-gemini-nano
#prompt-api-for-gemini-nano-multimodal-input
#summarization-api-for-gemini-nano
#writer-api-for-gemini-nano
#rewriter-api-for-gemini-nano
#proofreader-api-for-gemini-nano
After enabling them, restart Chrome Canary.
π‘ These flags activate the on-device Gemini Nano APIs (Prompt, Summarizer, Writer, Rewriter, Proofreader) and multimodal prompt support.
πͺ Installation Steps
- Clone or download the project:
git clone https://github.com/your-username/web2social.git
cd web2social
- Open Extensions Settings:
chrome://extensions/
Enable Developer Mode (top-right corner).
Load the Extension: Click βLoad unpackedβ and select the
web2social/folder (wheremanifest.jsonis).Pin the Extension: Click the puzzle icon β Pin Web2Social for quick access.
βΆοΈ Usage
- Open any webpage, blog, or Devpost project.
- Click the Web2Social extension icon.
- The side panel opens automatically.
- Click βGenerate Social Content.β
- Web2Social:
- Extracts webpage text.
- Runs through the AI pipeline.
Displays results for each platform.
- You can:
Edit the system prompt directly.
Upload an audio prompt.
Copy or save results.
π§ Chrome AI APIs Used
| API Name | Purpose | Where Itβs Used | Why Itβs Needed |
|---|---|---|---|
| π§Ύ Summarizer API | Extracts main ideas and key takeaways from the webpage text. | src/ai/summarizer.js |
Converts long-form content into digestible summaries. |
| βοΈ Writer API | Generates structured scripts or narratives. | src/ai/writer.js |
Creates initial drafts suitable for video narration or short-form storytelling. |
| πͺΆ Rewriter API | Refines tone, structure, and engagement style. | src/ai/rewriter.js |
Adapts the text to platform tone (funny, professional, casual). |
| π€ Proofreader API | Corrects grammar, punctuation, and phrasing. | src/ai/proofreader.js |
Ensures polished, high-quality posts ready for publishing. |
| π Translator API | Translates scripts into target languages if needed. | src/ai/translator.js |
Enables multilingual social content generation. |
| πΈ Language Detector API | Detects the original language of webpage text. | src/ai/languageDetector.js |
Selects the right AI model and ensures proper translation. |
| ποΈ Prompt API | Converts user audio into a custom AI system prompt (multimodal). | src/ai/promptMic.js + src/ai/speechToText.js |
Lets users speak their custom prompt and have it transcribed automatically. |
π§© Why Multiple AI APIs
Each API plays a specific role in Web2Socialβs multi-layered AI pipeline, ensuring high-quality and platform-appropriate content:
- Summarizer API condenses long-form pages.
- Writer API structures key ideas into narrative or video-friendly scripts.
- Rewriter API ensures the contentβs tone fits the intended platform (casual for TikTok, professional for LinkedIn, etc.).
- Proofreader API polishes grammar, flow, and readability.
- Translator API makes content multilingual.
- Language Detector API automatically sets source and target language preferences.
- Prompt API adds multimodal creativity β users can tweak the AIβs behavior or tone via typed or spoken input.
π£οΈ Multimodal System Prompt Feature
Web2Social allows users to customize the AIβs βsystem promptβ β the instruction guiding how the model writes.
Users can:
- π§Ύ Type a custom prompt directly in the panel.
- π€ Upload an audio file β Web2Social uses on-device speech-to-text to transcribe it into a prompt.
This makes the system multimodal, letting users mix voice and text input seamlessly.
Example:
You record: βMake the posts more humorous and include developer jokes.β Web2Social transcribes that, updates the system prompt, and regenerates all outputs accordingly.
π§ Workflow Overview
[ User opens a webpage ]
β
[ content.js extracts visible text ]
β
[ AI pipeline executes: ]
βββ Summarizer API β extract key points
βββ Writer API β draft script
βββ Rewriter API β improve tone/style
βββ Proofreader API β fix grammar
βββ Scene Planner β break into beats
βββ Translator API β localize if needed
β
[ Social generators create platform posts ]
β
[ Results shown in side panel β user can copy/share/save ]
π§± Project Structure
web2social/
βββ manifest.json # Chrome Extension Manifest (v3)
βββ assets/ # Icons
βββ src/
βββ background.js # Service worker (side panel logic)
βββ content.js # Extracts text from current webpage
βββ panel.html # Side panel UI
βββ panel.css # UI styling
βββ panel.js # Orchestrates workflow & history
βββ ai/
βββ summarizer.js
βββ writer.js
βββ rewriter.js
βββ proofreader.js
βββ translator.js
βββ languageDetector.js
βββ speechToText.js
βββ promptMic.js
βββ sessions.js
βββ support.js
βββ scenePlanner.js
βββ social/
β βββ common.js
β βββ index.js
β βββ facebook.js
β βββ instagram.js
β βββ linkedin.js
β βββ pinterest.js
β βββ reddit.js
β βββ tikTok.js
β βββ xThread.js
β βββ youtubeShort.js
βοΈ Technical Details
- AI Runtime: Chrome
globalThis.ainamespace (Gemini Nano). - Session Handling:
sessions.jscaches model instances for speed. - Schema Enforcement:
requestJsonFromModel()ensures valid structured responses. - Fallback Logic:
buildFallbackPayload()incommon.jsguarantees usable output even if AI calls fail. - Data Persistence: Chrome
storage.localfor recent history. - UI: HTML5, CSS3, Vanilla JS β lightweight, responsive panel.
- Security: 100% on-device; no network requests during AI processing.
π§ Example Use Case
Scenario: A team submits a project to the Google Chrome AI Hackathon 2025 and wants to promote it online.
- They open their Devpost project page in Chrome.
- Click βGenerate Social Contentβ in the Web2Social side panel.
- Instantly get:
- A YouTube Shorts script summarizing the idea.
- A 3-tweet X thread.
- A professional LinkedIn announcement.
- A friendly Facebook post and discussion prompt.
- A Reddit post ready for community sharing.
All posts match each platformβs audience and tone automatically.
π Impact
- Increases reach of technical and educational content.
- Saves hours spent manually rewriting posts for different platforms.
- Enables developers, educators, startups, and creators to amplify their work.
- Demonstrates how Chromeβs on-device AI can empower real-world productivity tools.
π Conclusion
Web2Social bridges the gap between long-form knowledge and short-form reach. By transforming blogs, hackathon projects, and release notes into social-ready content β powered entirely by Chromeβs on-device AI APIs β it empowers creators to share ideas faster, smarter, and more broadly.
βThe future of sharing knowledge is short, smart, and AI-assisted β right inside your browser.β
Log in or sign up for Devpost to join the conversation.