# Alt Text Generator

> Generate alt text for images in your browser: Florence-2 writes a short alt attribute, a longer description and in-image text. Edit, export CSV. No upload.

- URL: https://bytescope.dev/en/alt-text-generator/
- Locale: en · Also: [ja](https://bytescope.dev/ja/alt-text-generator.md) · [zh-Hant](https://bytescope.dev/zh-Hant/alt-text-generator.md)
- Runs: Runs in your browser. Your images are not uploaded. The model file downloads once from huggingface.co, and the ONNX Runtime script loads from cdn.jsdelivr.net.
- Requires: Any modern browser. Uses WebGPU where the browser has it and falls back to WebAssembly on the CPU, which is much slower (about 18 seconds per image for a short description and about 25 seconds for text in the image). The model file is downloaded once from huggingface.co and the ONNX Runtime script is loaded from cdn.jsdelivr.net; the images themselves are never uploaded.
- Updated: 2026-09-08

## What it does

### What you get for each image

Every image gets a short alt text first — one sentence, trimmed to 125 characters at a sentence or word boundary, ready for the `alt` attribute. Two more outputs are optional, because each one costs another pass through the model: a detailed description for a `<figure>` caption or a long-description page, and the text that appears in the image — the Florence-2 OCR task, which returns the words without line breaks. Every field is editable, one click copies `alt="…"`, and the whole batch exports as a CSV with the file name, alt text and description, so a dozen images for a blog post is one drag and one download.

### It runs in your browser, so the model downloads once

The image description generator is Florence-2-base-ft from Microsoft, MIT-licensed, running through Transformers.js. On the first visit the browser fetches the model from huggingface.co — about 218 MB with WebGPU, about 277 MB without — and keeps it in the browser's cache, so later visits start without a model download. The ONNX Runtime script that runs it comes from cdn.jsdelivr.net. Your images never leave the tab: there is no upload, no account, and nothing for a server to log. The trade is speed. With WebGPU a short description takes about a second per photo and the text in the image about four seconds; without a usable GPU the model runs on the CPU and the same photo takes about 18 seconds for the description and about 25 for the text, which is why the page shows the device it ended up on and tells you before you queue fifty images.

### How accurate the descriptions are

We ran 20 photographs through the short alt text and had another AI model — not a person — grade each result: On the CPU build, which is what most people without a GPU run, 16 were usable as written, 4 needed an edit and 0 were wrong about what the photo showed; on the WebGPU build, 16 were usable, 3 needed an edit and 1 was wrong. That is a useful first draft, not a finished one. Florence-2 can misname an object, miscount people, and it has no idea why this photo is in your article — a chart it calls "a graph with blue bars" might be there because revenue fell. It does not recognise who people are, and it will not guess. Treat the output as a starting point that already has the nouns right, then rewrite it to say what the image means in context.

### English only, with translation as a separate step

The model writes English. On the Japanese and Traditional Chinese pages, a button translates each draft with the browser's built-in Translator when Chrome offers it; the translation appears next to the English, never in place of it, because it is a second machine step that can add its own errors. When the Translator is unavailable the page says so and leaves the English, which is still a usable draft to rewrite by hand. For reading text out of a Chinese or Japanese screenshot you are better served by the OCR tool, which is built for those scripts.

### Writing alt text the model cannot write for you

Alt text describes what the image contributes, not what it contains. A photo used as decoration should get an empty `alt=""` so screen readers skip it; a chart should state the finding, not the colours; a product shot should say what the product is, not "an image of". The 125-character convention exists because some screen readers pause or split long alt text, so detail beyond that belongs in a caption or the surrounding paragraph — that is what the detailed description output is for. The generator gets you past the blank field; the sentence that fits your page is still yours.

## Limits

Does not check that its descriptions are right: the model can name the wrong object or miscount people, does not know what your article is trying to say, and does not recognise who people are. It writes English only, and the translation buttons need Chrome's built-in Translator API.

## FAQ

### Is the alt text accurate?

Usually close, never guaranteed. In our test of 20 photos, graded by another AI model rather than a person, the CPU build gave 16 drafts usable as written, 4 needing an edit and 0 describing the wrong thing; the WebGPU build gave 16, 3 and 1 wrong. The model can still misidentify an object or miscount people, and it does not know what the image is doing in your page. Read every draft.

### Are my images uploaded anywhere?

No. Florence-2 runs inside your browser with Transformers.js. The network traffic is the one-time model download from huggingface.co, which the browser then caches, and the ONNX Runtime script that runs it, which comes from cdn.jsdelivr.net. Your images stay in the tab, and closing it leaves nothing behind.

### Why is the output English only?

Florence-2-base-ft was trained to caption in English and does not write other languages reliably. On the Japanese and Chinese pages you can translate each draft with Chrome's built-in Translator when it is available; the translation is shown beside the English so you can check it, because translating a machine description adds a second place for errors.

### How long should alt text be?

Keep the `alt` attribute to about 125 characters — a widespread convention because some screen readers truncate or split longer text — and put anything more detailed in a caption or the surrounding text. The page trims the short output to 125 characters at a sentence or word boundary. Purely decorative images should get an empty `alt=""` instead.

### Does it recognise who is in the photo?

No. It describes people generically — "a woman holding a microphone" — and does not identify anyone by name. If the person's identity matters to the image, add it yourself.

### Why is it so slow on my computer?

Without a graphics card the browser can use through WebGPU, the model runs on the CPU in WebAssembly and takes about 18 seconds per image for a short description and about 25 seconds for the text in the image, against roughly 1 second and 4 seconds with a GPU. The page shows which device it is using. Ticking the detailed description or in-image text options runs the model again for each, so leave them off for a large batch.

### What does the CSV export contain?

One row per finished image with three columns: file name, alt text and detailed description, in the order the images were added; images that were cancelled or never run are left out. It is a standard comma-separated file with a UTF-8 byte-order mark so Excel opens non-Latin file names correctly, and it reflects any edits you made on the page. A value that starts with =, +, - or @ gets a leading apostrophe so a spreadsheet does not run it as a formula.

## Related tools

- [Image to Text](https://bytescope.dev/en/image-to-text.md) — Read printed text from a photo. Better for Chinese and Japanese.
- [Compress Image](https://bytescope.dev/en/image-compress.md) — Shrink photos to a target file size before you upload them.
