---
title: "manga-translate: translate manga and manhwa pages on your own machine"
url: https://mangaki.app/manga-translate/
description: "Open-source CLI that translates Japanese and Korean chapters you own. Detection, OCR and lettering run locally; only the text goes to an OpenAI-compatible API or Ollama."
---

# manga-translate: Translate manga and manhwa pages on your own machine.

- Runs locally
- Any OpenAI-compatible API
- MIT

**manga-translate is an open-source command-line tool that turns a Japanese or Korean chapter into a lettered translation.** Detection, OCR and lettering run locally; only the recognized text goes to the API you choose, 25 lines at a time, and with Ollama nothing leaves your computer.

[manga-translate on GitHub](https://github.com/jutsustudio/manga-translate) Install

Python 3.10 or later. CUDA, Apple Silicon or CPU.

Japanese English

Drag to compare. The demo page is original art made for the project; only its translation step used a scripted stand-in for the API.

Install

## One command to install, one to translate

You need Python 3.10 or later. The first run downloads about 0.7 GB of models; on Linux with an NVIDIA GPU, install the CUDA build of PyTorch first.

### Install

```
pipx install git+https://github.com/jutsustudio/manga-translate.git
```

`uv tool install` with the same URL works too.

### Translate a chapter

```
export OPENAI_API_KEY=sk-...
export OPENAI_MODEL=gpt-4.1-mini
manga-translate chapter-01.cbz
```

The result is `out/chapter-01/chapter-01.cbz`.

### More examples

```
# into Russian
manga-translate chapter-01.cbz -l ru

# every .cbz and .zip in the folder, into Spanish
manga-translate ./series/ -l es

# a folder of Korean manhwa pages, PNG out
manga-translate ./raw-pages/ -s ko -f png

# keep names consistent with a glossary
manga-translate chapter-01.cbz -g names.txt
```

Options

## Command-line options

| Option | Default | Meaning |
| --- | --- | --- |
| `sources` | — | .cbz or .zip files, folders of pages, or a folder of chapter archives |
| `-l, --lang` | `English` | Target language, as a name or a code: en, ru, es, de, fr, uk… |
| `-s, --source-lang` | `ja` | Language of the raws: ja for manga, ko for manhwa |
| `-o, --out` | `./out` | Output folder |
| `-f, --format` | `cbz` | cbz for one archive per chapter, png for numbered pages |
| `-g, --glossary` | — | Glossary file with fixed translations |
| `-m, --model` | — | Chat model id; overrides OPENAI_MODEL |
| `-c, --config` | — | YAML file that overrides built-in settings |

Translation API

## Any OpenAI-compatible API

OpenAI, OpenRouter, a local Ollama or LM Studio, or your own server. Three variables choose it, read from the environment or a `.env` file. Larger models translate dialogue noticeably better.

| Variable | Meaning |
| --- | --- |
| `OPENAI_BASE_URL` | Endpoint; defaults to https://api.openai.com/v1 |
| `OPENAI_API_KEY` | Key for that endpoint; leave it out for a local server |
| `OPENAI_MODEL` | Model id; required, or pass --model |

```
# OpenRouter
OPENAI_BASE_URL=https://openrouter.ai/api/v1
OPENAI_API_KEY=sk-or-...
OPENAI_MODEL=deepseek/deepseek-chat

# Ollama on this machine: no key, no text leaves the computer
OPENAI_BASE_URL=http://localhost:11434/v1
OPENAI_MODEL=qwen2.5:14b
```

Glossary and output

## Same names in every chapter

One `source = translation` per line. Text in parentheses is a note for the model, such as who speaks and how. Keep one glossary per series and pass it with `-g`.

```
コイ = Koi (girl, narrator; casual and blunt)
ハルト = Haruto (boy, Koi's older brother; polite)
ミナミ先生 = Ms. Minami (woman, homeroom teacher; formal)
ネオン区 = Neon Ward
金魚屋 = the Goldfish Shop
```

Each chapter gets its own folder. The two text files make it easy to check the OCR or reuse the translation.

```
out/chapter-01/
  chapter-01.cbz    translated pages (001.png… with -f png)
  transcript.txt    the recognized source text, page by page
  translation.txt   the translation, page by page
```

How it works

## Six steps per chapter

1. **Unpack** Pages are read in natural order. A run of same-width slices is treated as a webtoon and stitched into one strip, so a bubble cut across two images is translated once.
2. **Upscale** Pages narrower than 1,700 px are upscaled with Real-ESRGAN, so text in low-resolution scans still reads.
3. **Detect** An RT-DETR model finds bubbles, the text inside them and text over the art, then sorts the boxes into reading order.
4. **Read** manga-ocr reads Japanese and EasyOCR reads Korean: right to left for manga, left to right for manhwa.
5. **Translate** The chapter’s lines go to the chat API 25 at a time with the glossary in the prompt, so the model sees the conversation. Skipped lines are requested again.
6. **Letter** The original text is erased, the bubble is measured, and the translation is wrapped and sized to fit.

| Model | Used for | License |
| --- | --- | --- |
| [Real-ESRGAN x4plus anime 6B](https://github.com/xinntao/Real-ESRGAN) | Upscaling | BSD-3-Clause |
| [comic-text-and-bubble-detector](https://huggingface.co/ogkalu/comic-text-and-bubble-detector) | Bubble and text detection | Apache-2.0 |
| [manga-ocr](https://github.com/kha-white/manga-ocr) | Japanese OCR | Apache-2.0 |
| [EasyOCR](https://github.com/JaidedAI/EasyOCR) | Korean OCR | Apache-2.0 |

## Read the result in Mangaki

Import the translated CBZ on iPhone or iPad, or drop it into a [tanaki](https://mangaki.app/tanaki/) library.

 [About Mangaki](https://mangaki.app/)

manga-translate does not provide, host or download comics. You are responsible for the content you translate and for how you share the result.

Guides

## How manga-translate compares

- ### How do I translate raw manga to English?
 Translate a Japanese chapter with the open-source manga-translate: install, one command, local Ollama or OpenRouter models with prices per million tokens, and a glossary for names.
 [How do I translate raw manga to English?](https://mangaki.app/blog/translate-raw-manga/)
- ### How do I translate Korean manhwa to English?
 manga-translate with -s ko: EasyOCR for Korean, left-to-right reading order, and sliced webtoon chapters stitched so a bubble split across two images translates once.
 [How do I translate Korean manhwa to English?](https://mangaki.app/blog/translate-korean-manhwa/)
- ### What is the best open-source manga translator?
 manga-image-translator, BallonsTranslator, comic-translate, Koharu and manga-translate compared: license, interface, OCR languages, local or cloud models and how to install.
 [What is the best open-source manga translator?](https://mangaki.app/blog/open-source-manga-translators/)

FAQ

## Questions about manga-translate

### Do I need a GPU to run manga-translate?

No. It uses an NVIDIA GPU through CUDA, Apple Silicon through Metal (MPS), or the CPU. Without a GPU everything works, only slower.

### Can manga-translate work without sending anything to the cloud?

Yes. Point OPENAI_BASE_URL at a local server such as Ollama (http://localhost:11434/v1) and leave out the API key. Pages never leave your machine in any setup; with a local model the text stays there too. The models download once, about 0.7 GB.

### Which languages can it translate from?

Japanese (ja, the default) and Korean (ko). Japanese is read with manga-ocr and Korean with EasyOCR.

### Which languages can it translate into?

Any language your chat model writes, as long as a font covers its script. The bundled fonts cover Latin, including Vietnamese, and Cyrillic; for Greek, Thai, Chinese or another script, add a font in the config.

### Does manga-translate download manga?

No. It is a translation tool: it does not provide, host or download comics. It works on files you already have, and you are responsible for what you translate and how you share it.

### What does manga-translate produce?

A folder per chapter in ./out with a translated CBZ (or numbered PNG pages with -f png), transcript.txt with the recognized source text and translation.txt with the translation, page by page.
