AnyTool
Your files never leave your device. All processing happens locally in your browser.

How do I generate accessible alt text for an image without uploading it to a server?

Open AnyTool’s Alt Text Generator and drop your image in. An ON-DEVICE AI vision model (a self-hosted ViT-GPT2 caption model that runs in your browser via WebAssembly) writes a DRAFT description — your image is never uploaded; only the model’s code and weights download once, then cache. The draft is automatically refined to best practice (it strips “image of / photo of” openers, sentence-cases it, drops the trailing period and trims to the ~125-character screen-reader window), and a live WCAG 1.1.1 audit checks it as you edit: not empty for informative images, empty alt="" for decorative ones, ≤125 characters, no redundant prefix, not a filename, no keyword stuffing, action-based wording for functional (link/button) images, and a long-description nudge for complex charts. Because on-device models can be generic or wrong and can’t know an image’s purpose in context, the caption is a STARTING POINT you must review and edit. There is also a no-AI “describe it yourself” guided writer and a standalone auditor for pasting existing alt text — everything runs 100% in your browser.

  • On-device AI drafts a caption from your image — the image is never uploaded
  • Auto-refined to best practice: no “image of” prefix, sentence-cased, ≤125 chars
  • Live WCAG 1.1.1 audit: informative / decorative (alt="") / functional / complex
  • No-AI “describe it yourself” guided writer + a standalone alt-text auditor
  • 100% client-side — model weights download once then cache; works offline after

What is

Alt text (alternative text)

Alt text is the text alternative for an image (the HTML alt attribute) that screen readers announce and that shows when an image fails to load — the foundation of WCAG success criterion 1.1.1 (Non-text Content). Good alt text conveys the image’s CONTENT or PURPOSE in context, concisely (generally ≤125 characters), without a redundant “image of / photo of” opener (screen readers already announce it as an image). The correct value depends on the image’s role: decorative images take an empty alt="" so assistive tech skips them; functional images (a linked or clickable image) describe the action or destination rather than the picture; complex images (charts, graphs, diagrams) get a short label plus a longer description nearby; and informative images get a concise description. It also helps SEO, but the primary purpose is accessibility, and keyword-stuffing it hurts both.

SEO & Web

Related terms

WCAG 1.1.1Alt attributeScreen readerDecorative imageFunctional imageImage captioningAccessibilityImage SEO

Frequently Asked Questions

No. The AI vision model runs entirely in your browser (WebAssembly). Your image is captioned on your device and never uploaded — only the model’s code and weights download once, then cache.

Unlike cloud alt-text and “AI vision” services that send your image to a server, this tool self-hosts a small vision-encoder-decoder caption model (ViT-GPT2) and runs it in the browser tab. Your image is decoded from a local preview and captioned on-device — it is never uploaded, logged or stored. The only thing fetched from the network is the model itself (about 247 MB), once, after which the browser caches it and the tool works offline. That makes it safe to caption confidential, unreleased or client images.

Treat it as a draft. Small on-device models can be generic, miss context or be wrong, and they can’t know the image’s purpose in your content — so always review and edit for accuracy and context.

The AI caption is a starting point, not a finished answer. The on-device model is small, so it can describe images generically, miss important detail, or occasionally be plain wrong — and no model can know WHY the image is on your page or what it means in the surrounding content, which is exactly what good alt text must capture. The tool refines the caption toward best practice and audits it live, but the human step is essential: read the draft, correct anything inaccurate, and phrase it for the image’s purpose in context before you ship it.

Decorative images use an empty alt="" so screen readers skip them. Functional images (a link or button) describe the ACTION or destination, not the picture.

The right alt text depends on the image’s role, and the tool lets you pick it. A purely DECORATIVE image (a divider, a background flourish) conveys no information, so its correct value is a truly empty alt="" — with no space between the quotes — so assistive tech ignores it. A FUNCTIONAL image is a link or button (a magnifier that submits a search, a logo that links home): its alt should describe what it DOES or where it goes (“Search”, “Home — Acme”), not what it looks like. A COMPLEX image such as a chart or graph needs its data conveyed, so give it a short label as alt and put the full figures in nearby text, a table, a caption, or via aria-describedby. Everything else is INFORMATIVE and gets a concise description.

It checks length (≤125 chars), no “image of” prefix, not a filename, no keyword stuffing, empty-on-decorative vs non-empty-on-informative, action-based functional wording and a long-description nudge for charts. A pass is not a guarantee — only a human can confirm the alt conveys the image’s meaning.

The auditor applies WCAG 1.1.1 best practice to whatever alt text is in the field, updating on every keystroke: informative images must not be empty while decorative images must be empty (alt=""), the text should be ≤125 characters so screen readers don’t truncate it, it shouldn’t start with a redundant “image of / photo of”, it shouldn’t read like a filename (IMG_1234.jpg, hero-banner-2), it shouldn’t keyword-stuff, functional images should describe an action, and complex images should point to a longer description. These are automated heuristics: they catch the common mistakes, but a clean audit only means the alt is well-formed — it cannot verify that the words actually match the image or its purpose in context, which is why the tool always tells you to confirm that yourself.

Detailed Explanation

How It Works

What the Alt Text Generator Does

The Alt Text Generator helps a user write accessible, WCAG-compliant alt text for an image without ever uploading it. The user drops in an image and an ON-DEVICE AI vision model — a self-hosted ViT-GPT2 image-captioning model (a Vision Transformer image encoder paired with a GPT-2 text decoder) — writes a draft caption directly in the browser. That draft is then automatically refined toward best practice and continuously audited against WCAG success criterion 1.1.1 as the user edits it. The tool also offers a no-AI “describe it yourself” guided writer (which builds a correct alt attribute from a few structured fields) and a standalone auditor for pasting existing alt text. Throughout, the user picks the image’s ROLE — informative, decorative, functional (link/button) or complex (chart/graph) — because the correct alt text differs for each: decorative images take an empty alt="", functional images describe the action, and complex images need a longer description nearby.

  • On-device AI vision model (self-hosted ViT-GPT2) drafts a caption from the image
  • The image is never uploaded — only the model code/weights download once, then cache
  • Draft is refined to best practice, then audited live against WCAG 1.1.1
  • Role-aware: informative / decorative (alt="") / functional / complex
  • Also a no-AI guided writer and a standalone alt-text auditor
Methodology

How It Drafts, Refines and Audits Alt Text

The AI half mirrors the app’s proven transformers.js wiring (the same package, self-hosting and ONNX Runtime Web configuration used by its in-browser Whisper speech tool and distilbart summarizer): a lazy, module-singleton image-to-text pipeline loads the ViT-GPT2 model from this origin’s /public/models with env.allowRemoteModels = false — never contacting huggingface.co — and runs on WebAssembly with q8-quantized weights for universal device support, reporting download progress. Given a local object URL for the image, it produces a caption with a small beam search. The pure refineCaption helper then cleans that raw caption: it strips redundant openers (“there is an image of…”, “a photo of…”, “picture showing…”) because screen readers already announce the element as an image, collapses whitespace, sentence-cases the first letter, drops the trailing period (alt text is a fragment) and trims on a word boundary to the ~125-character screen-reader window. The pure auditAltText helper runs the role-aware WCAG checks: empty-alt required for decorative images and forbidden for informative ones, a ≤125-character length check, a “no image of/photo of prefix” check, a filename-detector (IMG_1234.jpg, hero-banner-2, 800x600), a keyword-stuffing/repetition heuristic, an action-based check for functional images, and a long-description nudge for complex charts — each returned as a pass/warn/fail finding with a plain-language message.

  • transformers.js image-to-text pipeline, self-hosted from /public/models (no CDN, no huggingface.co)
  • WebAssembly + q8 weights, mirroring the app’s Whisper/summarizer setup
  • refineCaption: strip “image of” openers, sentence-case, drop period, trim to ~125 chars
  • auditAltText: length, prefix, filename, keyword-stuffing, decorative/functional/complex rules
  • Both refinement and audit are pure functions — no model needed, instant per keystroke
Limitations

The AI Caption Is a Draft — Review It for Accuracy and Context

The tool is prominently HONEST that the AI caption is a STARTING POINT, not a finished answer. The on-device caption model is small, so it can be generic, miss important detail, or be plain wrong — and crucially, no model can know WHY an image is on a page or what it means in the surrounding content, which is exactly what good alt text must capture. So the user must always REVIEW AND EDIT the draft for accuracy and the image’s PURPOSE IN CONTEXT. Role matters and only a human can decide it: decorative images should use an empty alt="" (any AI description would be wrong); functional images (links/buttons) must describe the action, not the picture; complex images (charts, graphs, diagrams) need their data conveyed in a longer description nearby, with only a short label as alt. The WCAG auditor catches well-formedness problems but cannot verify that the words actually match the image or its meaning — a clean audit is not a guarantee of good alt text. Finally, the first generation downloads a ~247 MB model and requires a modern browser with WebAssembly and enough memory; if the model cannot load or run, the tool degrades gracefully to the no-AI guided writer, which produces correct, audited alt text with no download.

  • AI caption is a draft — small on-device models can be generic, miss context or be wrong
  • Only a human knows the image’s purpose in context — always review and edit
  • Decorative → alt=""; functional → describe the action; complex → long description nearby
  • A clean WCAG audit is not a guarantee the words match the image
  • First run downloads ~247 MB and needs a modern browser; falls back to the guided writer
Privacy & Security

Why On-Device Captioning Is a Privacy Win

Cloud alt-text and “AI vision” services send your image to a remote server to describe it. The Alt Text Generator instead runs the vision model ENTIRELY on the user’s device: the image is decoded from a local preview (an object URL) and captioned in the browser tab with WebAssembly — nothing is uploaded, logged or stored, and no image ever leaves the machine. The only network fetch is the model itself (weights and runtime, about 247 MB), served from this origin and downloaded ONCE, after which the browser caches it and the tool works offline. That makes it safe to caption confidential, unreleased, client or personal images that a user would not want to hand to a third-party AI service. The setup reuses the app’s existing self-hosted transformers.js infrastructure (the same pattern as its in-browser Whisper transcription and distilbart summarization), so it adds no new dependency and no new external service — object URLs are revoked on replace and unmount so nothing lingers in memory.

  • The vision model runs on-device (WebAssembly) — the image is never uploaded
  • Only the model weights/runtime download once (self-hosted), then cache; works offline after
  • Safe for confidential, unreleased, client or personal images
  • Reuses the app’s self-hosted transformers.js infra — no new dependency, no external service
  • Object URLs are revoked on replace/unmount so nothing lingers
AI alt-text generation: on-device (AnyTool) vs cloud AI alt-text tools
CapabilityAnyToolTypical cloud AI alt-text tools
Where the image is processedEntirely in your browser (on-device AI)Uploaded to a remote server
Your imageNever leaves the deviceSent to a third-party service
Confidential / unreleased imagesSafe — nothing uploadedExposed to the provider
Network useModel downloads once, then cached (offline after)Every image sent over the network
WCAG auditLive: length, prefix, filename, stuffing, role rulesVaries / often none
Image rolesInformative / decorative (alt="") / functional / complexUsually one generic caption
No-AI fallbackGuided writer + auditor, no downloadRarely
HonestyClear the caption is a draft to review for contextOften implies it is final
Cost / signupFree, no signup, no API keyOften gated, metered or paid

AnyTool captions images with an on-device AI model and uploads nothing, which is safe for confidential or unreleased images. The AI caption is a DRAFT — on-device models can be generic or miss context, so review and edit it for accuracy and the image’s purpose; decorative images should use empty alt="". Comparison as of July 2026.