i18n JSON and SRT/VTT Subtitle File Translator

Translate an i18n JSON file or .srt/.vtt subtitles without touching keys, timings or placeholders like {name} or %s. Runs in your browser: the file is never uploaded.

./i18n-file-translator

Drop a .json, .srt or .vtt file here, or click to choose it

It is not uploaded anywhere: it is translated inside your browser.

The file is translated in your browser. It is not uploaded to any server.

What this tool does

It translates JSON translation files (i18next, vue-i18n, react-intl, next-intl, Laravel, Angular…) and .srt and .vtt subtitles, touching only the text. Keys, nesting, order, indentation, subtitle numbering and timings come out exactly as they went in.

What sets it apart from pasting the file into a web translator is that it understands the format. A generic translator also translates the keys, merges lines, changes the quotes and, above all, wrecks the placeholders: {name} becomes {nombre}, %s moves around and <1>link</1> gets split. Here those pieces are protected before translating and put back afterwards.

How to use it

  1. Drop the file or paste it into the box. The format is detected automatically (you can also pick it).
  2. Check the source language — it is detected automatically — and choose the target one.
  3. Click Translate. Before it starts you will see which engine will be used and, if a model has to be downloaded, how big it is.
  4. Review the preview: original and translation side by side. Amber rows are the ones worth a look.
  5. Download the translated file. It keeps the same format and gets the language code in its name (en.es.json, video.es.srt).

Which placeholders it protects

SyntaxExampleUsed by
Single braces{name}, {0}ICU, react-intl, vue-i18n, .NET, Python
Double braces{{count}}i18next, Angular, Handlebars
printf%s, %d, %1$s, %(name)sgettext, PHP, Python, Android
Laravel:attributeLaravel validation and __()
Tags<strong>, <br/>, <1>…</1>HTML, react-i18next Trans, VTT
Others${total}, @:key, $t(key), &nbsp;JS templates, vue-i18n, i18next

ICU messages with plural or select ({count, plural, one {…} other {…}}) are left untranslated: translating their branches separately breaks the syntax, so they are best done by hand.

When a placeholder gets lost

A machine translator sometimes drops or duplicates one of the protected pieces. The tool checks every string: if something is missing, it translates that string again in pieces — the text between placeholders separately, so they cannot be lost — and flags it in amber for you to review, because the split sentence may read less naturally. If a placeholder were still missing, the row is flagged in red with the missing one.

Anything with no text to translate — a value that is just {count}, a number or a URL — is left as it is.

Subtitles

In an .srt or .vtt only the text of each subtitle changes. Numbering, timings, cue identifiers, position settings (align:start), the WEBVTT header and the NOTE and STYLE blocks are preserved untouched.

A subtitle split across two lines is almost always a single sentence, so it is translated whole and then spread back over the same number of lines. Dash dialogue (- Coming? / - Yes.) is translated line by line, because each line belongs to a different speaker.

Privacy: the file never leaves your device

Translation happens inside your browser. The file is not uploaded to any server or logged anywhere, which matters when the strings belong to an unreleased product or the subtitles to a private video.

The two engines and what gets downloaded

  • Chrome’s built-in translator (Translator API). If your desktop Chrome has it available for the language pair, that one is used: it is fast and downloads nothing from this page. The source language is detected with Chrome’s built-in detector when it exists.
  • Firefox Translations in every other case: Mozilla’s translation models (the same ones behind Firefox’s built-in translation, MPL-2.0 licence) running in WebAssembly inside a Web Worker. It works in Chrome without built-in AI, Firefox, Edge, Safari and on mobile.

The first time you use a pair with the second engine, about 42 MB are downloaded (a ~32 MB model, its vocabulary and the engine). Japanese, Chinese and Korean are somewhat larger, about 55 MB. Between two languages other than English — Spanish to French, for instance — there is no direct model and the translation pivots through English, so two models are downloaded (about 80 MB). The tool tells you the size before it starts, and everything stays in the browser cache: the second time it starts instantly.

The limit is 2 MB of file and 150,000 characters of text per translation, because your device does the work. For anything bigger, split the file.

Frequently asked questions

Is the translation as good as DeepL or Google?

Not always. These are small models built to run in a browser; on short interface strings or subtitles they give correct results that work well as a first draft, but they do not replace a human review for a product about to ship. The advantage here is not quality but format: the file comes out ready to use, with no broken keys or placeholders.

Does it translate the JSON keys?

No. Only the values that are text. Keys, numbers, booleans and `null` stay the same, and the file keeps its order and indentation (even numeric keys, which a plain `JSON.parse` would reorder).

What about ICU plural messages?

They are left untranslated, in the source language. Machine-translating a `{count, plural, …}` almost always breaks its syntax; translating those few strings by hand is safer.

Can I translate a `.po`, `.xliff` or `.yaml` file?

Not for now: only JSON, SRT and WebVTT. If your language file is YAML, you can [convert it to JSON](/en/tools/json-yaml-converter/), translate it and convert it back.

Does it work offline?

Once the model for a language pair has been downloaded, yes: it stays in the browser cache and translation needs no network. The first time you need a connection to download it.