Local AI in the Browser: Run Ollama and Chat With Any Webpage
Running AI models locally with Ollama has become the go-to choice for developers and privacy-conscious users. But what if you could connect those local models directly to your browser and chat with any webpage you’re reading? This guide shows you how.
What is Ollama?
Ollama is an open-source tool that lets you run large language models locally on your machine. It handles downloading, quantizing, and serving models behind a simple HTTP API. Once installed, you run ollama serve and your models are available at 127.0.0.1:11434.
Picking a model
The Ollama library has hundreds of models. Here are a few popular ones to start with:
- Gemma 4 — Google’s latest open model. Comes in several sizes, fast and well-rounded.
- Qwen 3.5 — Alibaba’s multilingual model. Strong at both English and Chinese tasks.
- Llama 4 — Meta’s latest. Wide community support and many fine-tuned variants.
- Mistral Small — Compact and efficient, good for everyday reading tasks.
- DeepSeek-R1 — Strong reasoning ability, available in distilled sizes that run on most hardware.
Browse ollama.com/search for the full list, sorted by popularity. Pull one with ollama pull <model>.
Not sure if your machine can handle a particular model? Use canirun.ai — it detects your hardware and shows which models will run well on your setup.
Connecting Ollama to your browser
Having a local AI model is powerful, but switching between terminal and browser breaks your reading flow. The ideal setup lets you ask questions about the webpage you’re reading directly in the browser, using your local Ollama models.
Setup in 3 steps
- Install Ollama — Download from ollama.com, then pull a model:
ollama pull <model> - Start the server — Run
ollama serve(it listens on127.0.0.1:11434by default) - Install PageGrok — Get it from the Chrome Web Store. It auto-discovers your running Ollama models.
That’s it. Open any webpage, click the PageGrok icon, and start asking questions. The AI reads the page content and responds using your local model — nothing leaves your machine.
Why use local AI for web browsing?
- Privacy — Page content and conversations stay on your device. No data sent to cloud APIs.
- No API costs — Once you have the model, inference is free. No per-token charges.
- No rate limits — Ask as many questions as you want, as fast as your hardware allows.
- Works offline — After initial model download, no internet connection needed for AI inference.
- Full control — Choose your model, customize context length, and switch models anytime.
What people use it for
- Developer docs — Quickly understand API references without reading every paragraph
- News analysis — Get balanced perspectives on articles, identify claims vs evidence
- Language learning — Ask for translations, explanations of foreign-language content
- Enterprise — Point at an internal Ollama instance for team-wide private AI access
- Research — Summarize long articles, extract key arguments, ask follow-up questions
Limits worth knowing before you start
- Long pages get trimmed. PageGrok caps page content at 12,000 characters before sending it to the model. That covers most articles and documentation pages. For longer content, use text selection mode to point the model at the section you actually care about.
- The first question after a pause is slower. PageGrok sends
keep_alive: 30m, so Ollama holds the model in memory for 30 minutes between questions. After that it unloads and your next question pays the model load time again. - Small models summarize better than they reason. A smaller model is reliable for “what does this page say”. For multi-step reasoning across a dense technical page, expect to verify what it tells you.
- PageGrok reads the page’s own text. It walks the DOM of the tab you are on, including Shadow DOM, so anything rendered as text is readable — including pages behind a login. Content inside iframes, canvas elements, and browser-rendered PDFs falls outside its reach.
FAQ
How do I know which model my machine can run?
Use canirun.ai — it detects your hardware and tells you which models will run well. Select your GPU or chip, and it shows estimated speed and memory usage for hundreds of models.
Can I run Grok locally with Ollama?
xAI has never published official Grok weights to the Ollama model library. Community members have re-uploaded Grok-1 and Grok-2 builds, but their provenance is unverified and Grok-1 is a 314B mixture-of-experts model that is impractical on consumer hardware. If you want comparable quality locally, pick a current large open model from the Ollama library instead — PageGrok works with any of them.
Does PageGrok work with all Ollama models?
Yes. PageGrok auto-discovers any model loaded in your local Ollama instance. Pull any model from the Ollama library and it appears in PageGrok's model selector immediately.
Is my data safe?
When using Ollama (the default), all processing happens between your browser and localhost. Page content and conversations are never transmitted over the network. See the privacy policy for details.
Try it on the page you are reading right now
PageGrok connects your local models to any browser tab. Free, private, no sign-up.
Related guides
- Connect Ollama to Your Browser: Setup & CORS Fix — Step-by-step guide to connect Ollama to a Chrome extension. Covers installation, CORS configuration with OLLAMA_ORIGINS, and common connection errors.
- Use LM Studio With a Browser Extension: Setup Guide — Connect LM Studio's local AI server to a Chrome extension. How to start the local server, configure the endpoint, and switch between LM Studio and Ollama.
- PageGrok vs Page Assist: Which Local AI Extension to Choose — Honest comparison of PageGrok and Page Assist — two Chrome extensions for chatting with webpages using local AI models. Feature differences, setup, and which is better for your workflow.