On-device Translator
Translate between major languages with on-device OPUS-MT models. Text never leaves your device; the model for a language pair downloads on first use.
First use of this pair downloads the model Xenova/opus-mt-en-jap from Hugging Face (tens of megabytes). It is cached by your browser afterwards, and your text itself is never sent anywhere.
0 / 2,000
How to use
- Choose the source and target languages. Pairs that translate to or from English are supported on-device.
- The first time you use a pair, its translation model (named in the notice above the input) downloads from Hugging Face. After that, your browser loads it from cache.
- Type or paste up to 2,000 characters and press Translate. Longer text is translated sentence by sentence, and line breaks are kept.
Notes
- Translation runs entirely on your device with Transformers.js and small OPUS-MT models. Your text is never sent to a server; the only download is the model files themselves.
- Quality is that of small OPUS-MT models and is below large cloud translators, especially for long, idiomatic or technical text. Treat the result as a draft.
- Pairs between two non-English languages (for example Japanese to French) are not offered, because no direct on-device model is loaded for them. Translate via English in two steps instead.
FAQ
Why did the first translation take a while?
The model for that language pair (tens of megabytes) has to download once from Hugging Face and start up in WebAssembly. Your browser caches it, so later translations of the same pair start much faster.
Does my text leave this device?
No. The model files are downloaded from Hugging Face, but the text you type is translated locally in your browser and is never transmitted anywhere.
Why is my language pair not available?
Only pairs to or from English have OPUS-MT models wired up here, because those are the pairs with reliable on-device (ONNX) builds. For other pairs, translate into English first, then from English into the target language.
Why does long text sometimes read awkwardly?
OPUS-MT models are small and were trained mostly on single sentences. This page therefore splits long input into sentence-sized chunks and translates them one by one, which keeps each chunk in the models' comfort zone but can lose some flow across sentences.