A Firefox extension that translates web pages using any OpenAI-compatible API — bring your own key and model.
- Page translation — translates the entire visible page in-place, preserving layout
- Streaming output — translations appear word-by-word as the model generates them
- Multiple providers — supports any OpenAI-compatible endpoint, Ollama (local models), and Google Translate
- Selection translation — highlight text and click the "译" badge to translate a snippet inline
- Manual translation — paste any text into the popup for a quick translation
- Site rules — configure per-hostname behavior: always translate, always skip, or ask each time
- Smart batching — groups text nodes into batches to minimize API calls; configurable batch size and concurrency
- Viewport priority — translates visible elements first, pre-loads off-screen content in the background
- SPA support — observes DOM mutations to auto-translate content added by React, Vue, infinite scroll, etc.
- IndexedDB cache — caches translations locally so repeated visits don't cost extra API calls
- Token usage stats — tracks prompt and completion tokens per provider and per page session
- Multilingual UI — interface available in English and Chinese (Simplified)
Install directly from addons.mozilla.org.
- Clone or download this repository
- Open Firefox and navigate to
about:debugging - Click This Firefox → Load Temporary Add-on
- Select the
manifest.jsonfile from the project folder
- After installation, the settings page opens automatically
- Click + Add under Providers to add your first provider
- Choose a provider type:
- OpenAI-compatible — enter a Base URL and API key (works with OpenAI, OpenRouter, Groq, etc.)
- Ollama — point at your local Ollama instance (no API key needed)
- Google Translate — enter a Google Cloud API key
- Select a model, then set it as the default provider
- Choose a Target language and save
| Action | How |
|---|---|
| Translate current page | Click the toolbar icon →Translate |
| Pause / resume | ClickPause or Resume in the popup |
| Restore original text | ClickRestore original in the popup |
| Translate selected text | Select text on any page → click the译 badge |
| Quick translate a snippet | Open popup → paste text into theQuick translate box |
| Set a site rule | Open popup →This site section → choose behavior |
All settings are in the Options page (right-click the toolbar icon → Manage Extension → Preferences, or open the popup and click the settings link).
| Setting | Description |
|---|---|
| Providers | Add, edit, or delete translation providers |
| Feature bindings | Choose which provider handles page / selection / manual translation |
| Target language | The language all translations are rendered in |
| Skip languages | Comma-separated language codes to suppress the auto-translate prompt |
| Auto-detect | Show a prompt when a foreign-language page is detected |
| Observe mutations | Re-translate new content added dynamically by the page |
| Max chars per batch | Controls batch granularity (larger = fewer calls, slower per call) |
| Concurrent batches | How many batches run in parallel |
| Cache | Enable/disable IndexedDB caching; view entry count; clear cache |
MuxTranslator does not operate any servers. All text sent for translation goes directly from your browser to the API endpoint you configure. No data is collected or shared by this extension.
Your API keys are stored locally in Firefox's extension storage and are never sent anywhere except to the provider URL you specify.
MIT
