Browser-based subtitle tool · SRT or VTT in, translated SRT or VTT out

Subtitle Translator

Translate a subtitle file into another language without moving a single timestamp. Sentences that span several cues are translated whole, then cut back to the original timing and re-wrapped to a line length you choose.

Subtitles

SRT or WebVTT, up to 4,000 cues and 2 MB.

Drop a subtitle file here or click to choose

.srt, .vtt

Languages and layout

Route: OPUS-MT English to Spanish. First use downloads about 113 MB of model files from Hugging Face; the browser keeps them. The subtitle text is translated in this tab and goes nowhere else. OPUS-MT models are by Helsinki-NLP (CC-BY 4.0); M2M100 is by Meta (MIT).

Load a subtitle file to translate.

Side by side

Edit any translated cue; the file below follows. Reading speed above 20 characters per second is marked (20 is the adult-programme figure in Netflix's English style guide; 17 is its children's figure).

Load a subtitle file to see its cues here.

Download

File type

Translate first; the file appears here.

Subtitle Translator

Operator: Abdulla Al Fahad. How tools are built and checked

Machine translation works one sentence at a time, but subtitles are cut by how long a viewer needs to read them, so a sentence is often split across two or three cues. Translating each cue alone gives half-sentences that no model can render well. This page rejoins the fragments, translates the whole sentence in a model that runs in your browser, and cuts the result back into the original cues so every timestamp stays where it was.

Key features

  • SRT or WebVTT in and out, up to 2 MB and 4,000 cues, with 26 languages to choose from
  • Cue fragments merged into sentences before translation, and divided back in proportion to each cue's duration
  • Lines re-wrapped to 42 characters by default (20 to 80 allowed) and at most 2 lines (1 to 3 allowed)
  • A warning on every cue that reads faster than a limit you set (20 characters per second by default), and on cues that do not fit the line limit
  • A glossary of terms to leave untouched, an edit box for every translated cue, and translated-only or bilingual output

How cues become sentences and back

The file must be SRT or WebVTT with at least one cue that has text; a file with NUL or control characters is refused as binary, and damaged cues are skipped and counted. Italic, bold and font tags are removed from the text that goes to the model, so the output has plain text. WebVTT NOTE, STYLE and REGION blocks and cue settings such as position and alignment are not carried into the result.

Most pairs use OPUS-MT, the Helsinki-NLP translation models released under CC BY 4.0 and converted to ONNX for the browser, about 113 MB per pair with 8-bit weights. The page has 61 direct OPUS-MT pairs among its 26 languages, each fetched at a pinned model revision. A pair without one, such as Czech to German or Japanese to Spanish, goes through two OPUS-MT models in a row, via English, when both halves exist, and otherwise through M2M100-418M, released by Meta under the MIT licence, about 640 MB. The route is shown above the Translate button before anything downloads. Files are named after the source: lecture.srt translated to Spanish is saved as lecture.es.srt, and lecture.es.bilingual.srt when both languages are included. The browser keeps the downloaded models, so a second run starts at once.

How it works

A cue joins the next one when it does not end in . ? ! or a closing quote, the gap between them is under 0.8 seconds, the combined text stays under 260 characters, and the group has fewer than six cues. Each group is one input to the model.

Glossary terms are swapped for neutral tokens such as ZQ0 before translation and put back afterwards, so Kubernetes or Acme Corp comes out as typed. If the model drops or changes a token, the page counts it and tells you how many terms could not be restored.

The translation is split into one piece per source cue. Boundaries follow the cumulative duration of the cues, measured in words, or in characters for Chinese, Japanese and Thai, and each boundary then moves up to two units to a nearby comma or full stop. Every cue gets at least one unit.

Each piece is wrapped into at most the chosen number of lines, with two lines balanced to similar length, and its reading speed is the characters without line breaks divided by the cue's duration.

Common use cases

  • A 600-cue English lecture goes to Spanish through the single OPUS-MT model, 113 MB on the first run and cached after that; the editor then reviews the cues flagged for reading speed.
  • A fan translator turns a 1,800-cue Japanese episode into English with the Japanese to English model, then edits the 40 flagged cues in the side-by-side list.
  • A producer needs English to Portuguese. The page's OPUS-MT list has no single-target English to Portuguese model (the English to Romance one covers several languages and is not used here), so the page routes it through M2M100 and shows the 640 MB download before starting.
  • A trainer saves a bilingual WebVTT with the original on the first line and the Hindi on the second, so learners can check the English wording.
  • A 5,200-cue feature-length file is over the 4,000-cue limit and has to be split at a scene change first.

How to use this tool

  1. Drop an SRT or WebVTT file, or press Load example.
  2. Choose the source and target languages and, if needed, add terms to keep.
  3. Press Translate and wait for the model to download on the first run.
  4. Read the cues, fix any that are flagged, and download SRT or WebVTT.
  5. Open the file in a player or in the subtitle editor you already use.

Example

An English lecture clip, English to Spanish, with Kubernetes in the glossary

1  00:00:01,000 --> 00:00:03,000  So when we started building
2  00:00:03,000 --> 00:00:05,500  the Kubernetes cluster, we hit a wall.
3  00:00:05,800 --> 00:00:08,000  Nobody on the team expected the bill from the cloud provider.

example.es.srt

1  00:00:01,000 --> 00:00:03,000  Así que cuando empezamos a construir
2  00:00:03,000 --> 00:00:05,500  el grupo Kubernetes, nos / chocamos con una pared.
3  00:00:05,800 --> 00:00:08,000  Nadie en el equipo esperaba la / factura del proveedor de la nube.
Cues 1 and 2 were translated as one sentence of 14 words and divided back in the ratio of their durations, 2.0 s to 2.5 s, which gave cue 1 six words. In the output, a slash shows where a line breaks inside a cue; the saved file holds a real line break there, not a slash. Cues 1, 2 and 3 read at 18, 19 and 29 characters per second, so at the default limit of 20 only cue 3 is flagged and is the one to shorten; with the limit lowered to 17, as for children's programmes, all three would be.

Common pitfalls

Machine translation is a first draft. Idioms, jokes and wordplay are translated literally, and a sentence that depends on the picture, such as a pronoun for someone off screen, is guessed.

The reading-speed warning is a count of characters, not syllables. Languages with long words, such as German and Finnish, are flagged more often than their real reading load suggests, and Chinese and Japanese cues almost never are.

Formatting tags are dropped, so italics for off-screen speech or a sound effect in brackets will need to be put back by hand.

  • Add a character's name or a product name to the glossary even when you expect the model to leave it alone; short names are the ones most often translated as ordinary words.

Common errors and how to fix them

"clip.srt" holds no cues this page can read. A cue is a time range such as 00:00:01,000 --> 00:00:03,000 with its text underneath.
A file saved in another subtitle format, such as .ass or .sub, has to be converted first.
"show.srt" has 5,230 cues; the limit is 4,000
Cut the file at a natural break and translate each half; each output is numbered from 1.
A translation model file did not arrive from Hugging Face. Check your connection and any content blocker, then press Translate again; the parts already fetched are cached, so a retry resumes.
Check that huggingface.co is reachable and not blocked. Models are fetched at pinned versions, so a retry gets the same files.
2 protected terms were dropped by the model
Find those terms in the source cues and type them into the translated cues in the edit list.

Best practices

  • Translate with merging on. Switch it off only for karaoke-style files where each cue is a separate line that must stay separate.

Credit for the translation models

OPUS-MT models are by the Language Technology Research Group at the University of Helsinki and are released under CC BY 4.0, which asks for credit; the page repeats it under the language selectors. The ONNX conversions are by Xenova. M2M100 is by Meta and MIT licensed. Models that carry a non-commercial licence, such as NLLB, are not used.

Frequently asked questions

Why is the second line of a cue sometimes longer than the first?

Two-line cues are balanced only when both lines fit the width you set. A cue that needs three lines because of a long unbroken word is wrapped greedily and flagged as not fitting.

Does it make the subtitles for a video that has none?

No, it translates an existing file. To transcribe speech into a first SRT, use Auto Subtitle Generator, then bring the file here.