用你的本地大模型翻译网页 — Translate web pages using your local LLM
A Chrome extension (Manifest V3) that translates entire web pages through a local large language model. Supports both OpenAI-compatible and Anthropic API formats.
- Full-page translation — batch-translates text content on any web page
- Local LLM support — works with Ollama, vLLM, LocalAI, or any OpenAI/Anthropic-compatible API
- Micro-batch streaming — translates in small batches (configurable), showing results progressively
- Original text restoration — one-click revert to original page content
- Thinking block removal — automatically strips "Thinking Process" reasoning blocks from model output
- Dark theme UI — clean, modern popup interface
- Popdown icon opens the configuration popup
- Click "Translate Page" — the content script collects visible text, sends it in batches to your local LLM API, and replaces text nodes with translations
- Click "Restore Original" — reverts all translated text back to the original
- Download or clone this repository
- Open Chrome and go to
chrome://extensions - Enable Developer mode (toggle in top-right)
- Click Load unpacked and select the extension directory
- The extension icon appears in your toolbar
You can also pin the extension to your toolbar for quick access.
| Setting | Description | Default |
|---|---|---|
| API Endpoint | Your LLM server URL | http://192.168.3.200:8000 |
| API Key | Authentication key for your LLM API | — |
| API Format | OpenAI or Anthropic format |
openai |
| Model | Model name to use | Huihui-Qwen3.5-35B-A3B-abliterated-mxfp4 |
| Target Language | Language to translate into | 中文 |
| Source Language | Original page language | English |
| Batch Size | Texts per API call (1–30) | 10 |
- OpenAI (
/v1/chat/completions) — compatible with Ollama, vLLM, LocalAI, LiteLLM, and most local LLM servers - Anthropic (
/v1/messages) — for Anthropic API or compatible proxies
- Click the extension icon in your toolbar
- Configure your LLM endpoint and settings
- Navigate to the web page you want to translate
- Open the popup and click Translate current page
- Translations appear progressively as batches complete
- Click Restore original to revert
The extension automatically:
- Skips code blocks, scripts, SVGs, and form elements
- Detects CJK characters to avoid re-translating already Chinese text
- Removes model reasoning output ("Thinking Process" blocks)
- Your API key is stored locally in
chrome.storage.local - All translation requests go directly to your configured local endpoint
- No data is sent to external servers
MIT