Florence-2 captions · editable table · CSV, HTML and JPEG XMP

Alt Text Generator

Draft alt text for up to 100 pictures with a captioning model that runs in this tab, correct each line in the table, and export it as CSV, as <img> tags, or inside the JPEG files.

Images

Up to 100 images

Drop images here or click to choose

PNG, JPG, WEBP, GIF or BMP, up to 25 MB each.

Captioning

First use downloads Florence-2 base (MIT licence) from Hugging Face: about 230 MB on the CPU path (the WebGPU path fetches larger half-precision files), then it is cached by the browser. Only the model files are downloaded; your images are not sent anywhere.

Export

The XMP option adds Iptc4xmpCore:AltTextAccessibility (and the long description as Iptc4xmpExt:ExtDescrAccessibility) and copies every picture byte as it was. It works for JPEG only, and skips decorative images and empty alt text.

Alt text

Captions are drafts. The model can misread text, miscount people, and guess at age, gender or what an object is for. Check every line against its picture, and leave out what the picture does not show.
Add images to start.

Alt Text Generator

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

Screen-reader users hear alt text in place of a picture, and most accessibility audits fail pages whose images have none or have the file name. The slow part is not typing: it is looking at several hundred old images and finding words for each.

This page drafts that first line for you. A captioning model, Florence-2 base, describes every image, the page cleans the wording, and you correct each line in a table before anything is exported. Treat the output as a draft written by someone who has never seen your site.

Florence-2 is released under the MIT licence. It runs in a worker in this tab, so captions come from your own machine's CPU or GPU.

Key features

  • Up to 100 images at a time, shown in an editable table with a thumbnail and a character counter for each line
  • A short caption (about a sentence) or a detailed caption (a paragraph) as the source of the alt text, and an optional second pass for a long description
  • Wording cleaned of lead-ins such as "an image of", with a Trim button for lines over the 125-character target
  • A Decorative switch per image, which exports an empty alt="" and leaves the text box greyed out
  • CSV with file name, alt text, long description and decorative columns, and a block of HTML img tags to copy or download
  • Alt text already stored in a JPEG's XMP is read back into the box when the file is added
  • Alt text written into JPEG XMP as Iptc4xmpCore:AltTextAccessibility, with the long description in Iptc4xmpExt:ExtDescrAccessibility, with every picture byte copied unchanged

Captions, the 125-character target and the XMP fields

The first run downloads Florence-2 base from Hugging Face: about 230 MB on the CPU path. The WebGPU path fetches larger half-precision files. The ONNX runtime files come from this site, and the browser keeps everything after the first run. The images are decoded in the page and passed to the model as pixels.

Each image is scaled to at most 768 px on its long side and flattened onto white if it has transparency before the model sees it. The short caption uses the model's caption prompt with at most 48 new tokens, and the detailed caption uses its more-detailed caption prompt with at most 160.

The XMP option adds a new XMP packet after the JPEG's leading APP0 and Exif segments, or, when the file already has one, appends a second rdf:Description to it after removing only the old alt-text fields. The compressed picture data is copied byte for byte. Packets over 64 KB (extended XMP) are not supported and are reported as skipped.

How it works

The caption text goes through a cleaner that removes control characters, collapses spaces, strips up to two lead-ins such as "This image shows" and capitalises the first letter. Because the lines are free text you can edit, any CSV cell that would open as a spreadsheet formula gets a leading apostrophe, and the HTML snippet escapes &, quotes, < and > and encodes the file name as a URL.

Typical uses

  • A product catalogue of 90 shoe photos. Short captions give "A pair of white sneakers on a wooden floor", and you add the brand and colour by hand, which the model cannot know.
  • A blog archive of 60 screenshots: most need a human sentence, so the page is used to find the ones that are simple photographs and decorative separators.

Building one

  1. Drop the images; JPEG files that already carry alt text in XMP have it loaded into the box.
  2. Choose short or detailed captions, and tick the long description if you need it.
  3. Press Generate alt text and read each line while the next ones are produced.
  4. Edit the lines, tick Decorative for spacers and pure ornament, and use Trim on lines over 125 characters, then download the CSV, copy the img tags, or use Embed in JPEG XMP.

Example

One JPEG of fishing boats in a harbour, harbour.jpg (illustrative), short caption plus long description

Alt text comes from: short caption, Also write a long description ticked, then CSV, Copy img tags and Embed in JPEG XMP

What is produced; the caption is written in the style of the model's output, not a recorded result

alt text: A row of fishing boats moored in a harbour at dusk.
CSV columns: harbour.jpg, the alt text, the long description (a paragraph from the second prompt), no
<img src="harbour.jpg" alt="A row of fishing boats moored in a harbour at dusk.">
harbour-alt.jpg is the original plus a metadata packet; its picture data is identical

Things to check before you rely on it

The model describes what it sees, not why the image is on the page, and it can misread text, miscount people and invent details. A line that is fluent can still be wrong.

It will sometimes name a person it recognises from the face, such as a public figure. Remove names unless you know them to be correct and want them published.

Embedding in XMP is read by few tools. Most content systems ignore it, so keep the CSV or the img tags as the source of truth.

  • A caption over 125 characters is not wrong, but many screen readers read it in one breath; move the extra detail to the long-description column.
  • Put the point of the image in the first words: "Chart: sales doubled in 2025" is more useful than a description of the bars.

Common errors and how to fix them

Generate alt text never gets past the first progress bar
Florence-2 base is about 230 MB on the CPU path and comes from huggingface.co. A blocker on that host or a dropped connection stops it; press Generate again and the parts already fetched are reused.
Captioning stops partway with a memory error
The WebGPU path uses larger half-precision files. Untick WebGPU if the page offers it, close other tabs, or caption fewer images per run; the model handles one image at a time.

Best practices

  • Describe the picture's purpose in the surrounding page, and keep alt text for what the image adds.
  • Run Redo all only after changing the caption source; edited lines are overwritten by it.
  • Mark logos that sit next to the site name as decorative, since the name is already spoken.

When alt text should be empty

An image that adds nothing a listener needs, such as a divider line, a background texture or an icon beside a text label that already says the same thing, is best given an empty alt attribute, so that screen readers skip it. That is different from a missing attribute, which makes some of them read the file name aloud. The Decorative switch exports alt="" for exactly this case.

Frequently asked questions

Why is a caption shorter than the long description?

They come from two different prompts of the same model: one asks for a caption and generates up to 48 tokens, the other asks for a more detailed caption and allows up to 160 tokens.

Does this replace Bulk Image Captions from CSV?

No. Bulk Image Captions from CSV burns text into pictures; this page writes accessible descriptions for the page code or the file metadata and never changes what the image looks like.

Can I use the XMP output on PNG files?

No. The writer works only on JPEG files and lists any PNG, WEBP or other file as skipped; use the CSV or the img tags for those.

Is anything uploaded when I caption?

Only the model files are fetched, from Hugging Face; the runtime is served by this site. The pictures are decoded in your tab and handed to a worker on the same machine.