AI Image Caption & Alt-Text Generator
100% private — runs on your device, never uploaded. Works offline once loaded.
Turn any image into a descriptive caption and ready-to-paste alt text. The vision AI model runs entirely in your browser, so your images never leave your device.
What this tool does
This tool looks at an image you provide and writes a short natural-language description of it. That description works as a caption or as HTML alt text, which screen readers announce to people who cannot see the image and which search engines read to understand your page.
Everything happens locally. When you click Generate caption, the image is passed to an AI model running inside your browser tab — nothing is uploaded, stored, or shared. You get both the plain caption and a ready-to-paste snippet with the alt attribute already filled in.
The model behind it
Captions are produced by Xenova/vit-gpt2-image-captioning, a vision-encoder-decoder model. A Vision Transformer (ViT) encodes the pixels into features, and a GPT-2 decoder turns those features into a sentence. It runs through transformers.js with a quantized build so it fits and executes in the browser.
Because the model is compact and general-purpose, it describes common scenes, objects, and actions well but keeps captions brief. It is not reading text in the image (use an OCR tool for that) and it does not know proper nouns.
Good uses
It is a fast starting point wherever you need alt text or a caption at scale:
- Adding accessible alt text to blog posts, docs, and product pages
- Drafting captions for large image libraries before human review
- Improving image SEO with descriptive, relevant text
- Getting a quick description of a photo for notes or tagging
On-device quality caveats
Model output should be treated as a draft. The caption can be vague, occasionally wrong, or miss context that matters for your page, so always read it and edit for accuracy, tone, and specifics before publishing.
Performance depends on your device — the one-time model download is sizeable, and the first caption on an older machine may take a while. After the model is cached, captions run quickly and continue to work with no network connection.
Frequently asked questions
Does this work offline?
After the first run downloads and caches the model, yes. The captioning runs entirely in your browser, so you can generate captions without an internet connection.
What image formats can I use?
Any format your browser can display, including JPG, PNG, WebP, and GIF. The image is decoded locally for the model to read.
What is the difference between a caption and alt text?
A caption is visible text shown near an image; alt text is the alt attribute of an <img> tag that assistive technology and search engines read. This tool gives you text you can use for either, plus a ready-made <img> snippet.
Why is the caption short or generic?
The underlying model is small and optimized to run in a browser, so it produces concise, general descriptions. Edit the result to add the specific detail your context needs.
Can it read text inside the image?
No. This model describes the scene, not any text printed in the image. For extracting text, use an OCR tool instead.
Is my image or caption stored?
No. Nothing is uploaded or saved. The image stays in your browser's memory only while you generate the caption, and the object URL is released afterward.
Advertisement