From AI Image Caption to Good Alt Text: A Practical Guide
An AI image caption generator gives you a fast first draft of what is in a picture; good alt text is that draft edited for the page the image appears on. The free AI Caption tool writes the draft on your own device, and this guide shows how to turn it into a description that actually helps people who cannot see the image, with weak and strong examples side by side.
What does the AI caption tool do?
The tool runs Mozilla's distilvit model, the image-captioning model behind Firefox's built-in alt-text feature, using the Transformers.js library in your browser. A few practical details:
- One-time download. The model is about 180 MB. It starts downloading as soon as you choose an image and is cached by your browser afterwards, so later visits skip it.
- Runs on your device. It uses WebAssembly on your processor. On a slower phone or laptop, writing a caption can take around ten seconds.
- One short sentence. Press "Write a caption" and you get a single plain description, such as a person, place or object and what is happening. "Copy to Clipboard" puts it ready to paste.
That sentence is a starting point. The model sees pixels; it does not know why the image is on your page, who is in it, or what your reader needs from it. That is the part you add.
What makes alt text good?
Alt text is the text alternative that screen readers speak in place of an image, and that appears if the image fails to load. The Web Content Accessibility Guidelines ask that every meaningful image has a text alternative serving the same purpose (success criterion 1.1.1, Non-text Content). "The same purpose" is the key phrase. Good alt text:
- Conveys why the image is there. The same photo of a beach needs different alt text on a travel booking page than in an article about coastal erosion.
- Is concise. Usually a phrase or a sentence. A common rule of thumb is to stay around 125 characters; that is a convention rather than a WCAG requirement, but it keeps descriptions focused.
- Skips "image of" or "picture of". Screen readers already announce that it is an image. Do mention the type when it matters, such as "Screenshot of", "Illustration of" or "Chart of".
- Includes text shown in the image. If a banner says "Sale ends Friday", the alt text should say so too.
- Does not repeat nearby text. If the caption or paragraph right beside the image already says it, the alt text can be shorter, or add what the text leaves out.
Three special cases
- Images that are links or buttons: describe the action or destination, not the picture. A magnifying-glass icon that opens search should have the alt text "Search".
- Purely decorative images: dividers, background flourishes and images that repeat adjacent text should have an empty alt attribute,
alt="". Leaving the attribute out entirely is different; some screen readers then read the file name aloud. - Charts, diagrams and infographics: give a short alt that names the chart and its main point, and put the full data or explanation in the page text or a table nearby.
Alt text, captions and titles are different things
| Who it is for | What to put in it | |
|---|---|---|
Alt text (alt) |
People who cannot see the image | What the image contributes to the page |
Visible caption (figcaption) |
Everyone | Context: who, where, when, credit |
| Title attribute | Mouse users who hover | Optional extra; not a substitute for alt text |
When an image has both alt text and a visible caption, avoid repeating the caption word for word in the alt; a screen reader user would hear it twice.
How to edit an AI caption into alt text
- Check every fact. Captioning models can misjudge counts, colours, objects and actions. Read the sentence against the image and correct anything wrong.
- Remove guesses about people. Do not keep the model's assumptions about someone's age, gender or ethnicity unless they are known and relevant.
- Add what only you know. Names, places, product names and the event. "A man speaking at a podium" becomes "Our head of research opening the annual members' conference".
- Cut what does not serve the page. If the image illustrates a recipe, the countertop colour probably does not matter.
- Add visible text from signs, labels or screenshots.
- Tidy the wording. Start with a capital letter, drop any "an image of", and end with a full stop.
Weak vs strong alt text: examples
The middle column shows the kind of generic sentence an automatic captioner tends to produce. The names and products are made up for illustration.
| Where the image appears | Weak (generic draft) | Strong (edited) |
|---|---|---|
| Shop product page | a pair of shoes on a white background | Trailrunner 2 shoe in orange, side view showing the deep-lugged sole. |
| About us page | a group of people standing in front of a building | Our five-person support team outside the office on launch day. |
| Recipe | a bowl of soup on a table | Red lentil soup topped with a swirl of yoghurt and chopped coriander. |
| Report with a chart | a graph with bars | Bar chart: sign-ups rose each month from January to June. Full figures in the table below. |
| Search button icon | a black magnifying glass | Search |
| Decorative wave divider | a blue wavy line | alt="" (empty, so screen readers skip it) |
Does alt text help SEO?
Yes, as a side effect of doing it well. Google's image guidelines say it uses alt text, along with the surrounding page, to understand what an image shows. The approach that serves both readers and search is the same: describe the image accurately in the words a person would use. Stuffing alt text with keywords makes it worse for screen reader users and does not help.
Before you publish
Captioning on your device means unpublished product shots, client work and family photos are described without being sent to a cloud vision service. Photos can still carry hidden details of their own, such as camera data and GPS location, so it is worth clearing those with the metadata viewer and remover before the image goes live. If you want to confirm that a tool really keeps your image local, here is how to check any website for uploads.
Get a first draft in seconds
Write the caption on your device, then make it yours.
Open the AI Caption Tool