PublicSoftTools

AI Image Captioner

Upload any image and get an AI-generated description in seconds. Powered by ViT-GPT2 — runs entirely in your browser, no signup, images never leave your device.

⏱ 8 min read · Complete guide below

How the AI Image Captioner Works

  1. 1Upload an image. Click the dropzone or drag an image file onto it. JPEG, PNG, WebP, GIF, and AVIF are supported.
  2. 2Click Generate Caption. On first use, the ViT-GPT2 model (~85 MB) downloads and caches in your browser. A clear progress message shows the status.
  3. 3Read and copy the caption. The generated description appears below the image. Click Copy to grab it for use in alt text, social posts, or content.
  4. 4Caption more images instantly. Once the model is loaded, subsequent captions generate in seconds — no further downloads needed.

Use Cases for AI-Generated Image Captions

Accessibility alt text. Generate draft alt attributes for images on your website. Review and refine before publishing — especially for informational images like charts or screenshots where specific detail matters.

Social media descriptions. Get a base description for an image you are posting. The Witty or Casual tone of a social post can then be written from this factual foundation.

Image indexing and cataloguing. Process batches of photos and use the captions as metadata for search and filtering — useful for photographers, designers, and content libraries.

Content creation starting point. A generated caption gives a descriptive anchor from which to write longer creative or editorial content about the image.

Tips for Better Captions

Use clear, well-lit photos

The model performs best on images with a clear subject and good lighting. Blurry, dark, or heavily filtered images produce less accurate descriptions.

Crop to the main subject

If an image has a lot of background clutter, cropping it to focus on the main subject before uploading produces more specific captions.

Review for diagrams and charts

The model describes what it sees visually — it cannot interpret the data or meaning in a chart. Always write custom alt text for informational graphics.

Pair with the Image Converter

If your image is in an unusual format, convert it to JPEG or PNG first using the Image Converter before uploading here.

The Complete Guide to AI Image Captioning

Getting a computer to look at a photograph and describe it in a sentence is one of the more remarkable things modern AI can do, sitting at the intersection of computer vision and language generation. A caption that once required a human to write can now be produced automatically in seconds — and with a tool like this one, entirely in your browser so the image never leaves your device. This guide explains how the technology works, why captions and alt text matter more than most people realise, and how to get useful results while understanding the limits of what an automatic captioner can do.

How a Machine Learns to Describe a Picture

Image captioning models combine two different kinds of AI into a pipeline. The first stage is a vision encoder — here a Vision Transformer, or ViT — which breaks the image into a grid of small patches and analyses them to build a rich internal representation of what is present: shapes, textures, objects, and how they relate spatially. This is the “seeing” half, and it is trained on millions of labelled images so it learns to recognise the visual signatures of dogs, beaches, bicycles, plates of food, and countless other subjects.

The second stage is a language decoder — a GPT-2 style text model — which takes that visual representation and generates a natural-sounding sentence from it, one word at a time, choosing each word based on the image features and the words already produced. The two halves are trained together on image-caption pairs, so the system learns not just to identify objects but to phrase what it sees the way a person would. The result is a fluent description grounded in the actual content of the picture rather than a bare list of detected objects.

Why Captions and Alt Text Matter

Captions are not just a convenience — they do real work, most importantly as alt text(the “alternative text” attribute on web images). Alt text serves two audiences. The first is people who use screen readers because they are blind or have low vision: the screen reader reads the alt text aloud, so without it those users encounter a meaningless “image” where everyone else sees a picture. Good alt text is therefore a basic requirement of an accessible, inclusive website, and in many contexts a legal one.

The second audience is search engines. Because a search crawler cannot “see” an image directly, it relies heavily on the alt text to understand what the image depicts, which affects how the page ranks and whether the image appears in image search. Well-written alt text is thus both an accessibility feature and a small but genuine SEO benefit — and generating a solid first draft automatically removes the friction that leads so many people to skip it entirely.

Writing Great Alt Text: Where AI Helps and Where It Doesn't

An AI caption is an excellent starting point for alt text, but it should rarely be the final word. The model describes what is visually present — “a brown dog running on a beach” — which is exactly right for a decorative or illustrative photo. Where it falls short is on images that convey specific information: a chart, a diagram, a screenshot, or a photo whose meaning depends on context the pixels alone do not carry. For those, the alt text needs to communicate thepoint of the image (“bar chart showing sales doubling from 2023 to 2024”), which the captioner cannot infer from appearance alone.

The practical workflow, then, is to generate a caption, keep it if the image is illustrative, and rewrite it if the image is informational — adding the meaning a human reader would take from it. Good alt text is also concise and skips redundant lead-ins like “image of,” since screen readers already announce that it is an image. Using the tool to draft and then lightly editing is far faster than writing every description from scratch, and it means images actually get alt text rather than being left bare.

Other Ways to Use Image Captions

Beyond accessibility, automatic captions are useful anywhere you need text that describes a picture. Photographers and designers use them to catalogue and search large image libraries, turning a folder of thousands of untitled photos into searchable, filterable metadata. Social media managers use a factual caption as the foundation for a post, adding tone and personality on top of an accurate description. Content creators use a generated caption as a writing prompt — a descriptive anchor from which to develop longer editorial or creative text. In each case the value is the same: converting visual content into text makes it searchable, reusable, and easier to work with.

Privacy and Realistic Expectations

Because this captioner runs the ViT-GPT2 model entirely in your browser via WebAssembly, your image is read and processed locally and never uploaded to any server — not to PublicSoftTools, not to the model host, not to anyone. That makes it safe for private or sensitive photos you would not want to send to an online service, and it means no account and no upload wait. The model downloads once and is cached, after which captioning is quick.

As for what to expect from the output: the model is strong on common subjects — people, animals, everyday objects, food, and outdoor scenes — and will produce accurate, natural descriptions of them. It is weaker on unusual or abstract subjects, heavily stylised art, technical diagrams, and anything requiring it to read text within the image or interpret meaning rather than appearance. Treat the caption as a fast, reliable first draft for straightforward images and a rough prompt for difficult ones, review before publishing, and you will get the most from it without being caught out by its limits.

Frequently Asked Questions

How does the AI image captioner work?

The tool uses Transformers.js to run the ViT-GPT2 image captioning model in your browser via WebAssembly. ViT (Vision Transformer) encodes the image into feature representations, and GPT-2 then generates a natural language caption from those features. The model file (~85 MB) downloads from Hugging Face on first use and is cached in your browser.

Is my image uploaded to a server?

No. The ViT-GPT2 model runs entirely in your browser. Your image is read locally using the browser File API and processed in-memory by the WebAssembly model. No image data is transmitted to any server — not PublicSoftTools, not Hugging Face, not anyone.

Why does the first caption take longer?

On first use, the model file (~85 MB) downloads from Hugging Face CDN and is cached by your browser. This typically takes 15–60 seconds depending on your connection. Subsequent captions using the same model are much faster because the model is already loaded in browser memory.

What image formats are supported?

JPEG, PNG, WebP, GIF, AVIF, and any format your browser can natively display. Very large images may be slower to process; the model works with standard web-resolution images (up to a few megabytes) without issues.

How accurate are the captions?

ViT-GPT2 produces accurate high-level descriptions for common subjects — people, animals, objects, outdoor scenes, food. It may produce generic or less precise captions for unusual subjects, technical diagrams, or heavily stylised art. For accessibility alt-text generation, treat the output as a starting point and review before publishing.

Can I use this to generate alt text for accessibility?

Yes, this is one of the primary use cases. The captions are short, descriptive, and suitable as a starting point for image alt attributes. Review and refine the output — especially for images that convey specific information (charts, text, diagrams) where the context matters.