Home › Guides › Image Alt Text: What to Write and How Long

Image Alt Text: What to Write and How Long

Alt text describes what the image does for the reader, in one sentence. Decorative images get an empty alt, and keywords stay out of it.

The short answer

Alt text should say what the image does for a reader who cannot see it, in one sentence, in plain words. If the image is a chart, say what the chart shows. If it is a product photo, say what the product looks like. If it is purely decorative, leave the alt attribute empty. And keep keywords out of it: alt text is a description for people, not a place to store search terms.

That is the whole rule. The reason it needs a guide at all is that alt text is written for three audiences at once — screen reader users, search engines, and readers whose images fail to load — and the habits that serve one audience are sometimes wrong for the others. The rule above serves all three, which is why it has survived every change in how search engines work.

Who actually reads alt text

The first audience is people using screen readers, and they are the reason the attribute exists. A screen reader announces an image by reading its alt text aloud, in place of the image. A good description lets a blind reader follow the article; a missing or useless one — "image", "photo", a filename — leaves a gap in the middle of the sentence they were reading.

The second audience is search engines. Crawlers cannot see images, so alt text is one of the signals they use to understand what an image shows, and it contributes to how the page is understood. It also feeds image search: a descriptive alt text is part of why an image surfaces for a query about its subject. But its influence on ordinary web ranking is small, and anyone telling you alt text is a major ranking lever is overstating it.

The third audience is everyone, on a bad connection. When an image fails to load, the browser shows the alt text in its place. A reader on a slow network sees your description instead of a broken-image icon, and can decide whether the image was worth waiting for. This is the most common audience of all, and the one people forget, because they test pages on fast connections where images never fail.

How to write it

Describe the content and the function, not the file. Ask two questions: what would a reader miss if this image were removed, and what is the image doing in this spot? The answer to the first gives you the content; the answer to the second gives you the angle.

A chart showing search traffic doubling after a redesign: "Line chart showing weekly search visits rising from 400 to 900 over eight weeks following the redesign." A product photo of a red kettle: "Red stainless-steel kettle with a black handle, photographed on a white background." A screenshot of a tool's output: "The SERP preview tool showing a title truncated at 60 characters with the cut marked in red." Each one says what the image contains and why it is there.

The formula that works for most images is: what it is, plus the detail that matters, plus nothing else. "What it is" is the subject. "The detail that matters" is the one thing the surrounding text depends on — the number on the chart, the colour of the product, the error the screenshot shows. Anything beyond that is narration the reader did not ask for.

How long should it be?

One sentence, and usually under 125 characters. That number is not a rule from a specification; it is a practical limit from screen readers, several of which split or cut off alt text beyond roughly that length. A description that runs to three sentences will be truncated mid-thought for the very audience it was written for.

If one sentence cannot describe the image, the image is probably doing two jobs and should be split, or the description belongs in the visible text instead. A complex chart deserves a paragraph of explanation next to it, with the alt text carrying the summary: "Bar chart comparing load times before and after optimisation; full figures in the table below." The alt text points at the explanation; it does not try to be the explanation.

Long alt text has one more cost: it bores the listener. A screen reader user navigating a page hears every image announced, and a fifty-word description for a stock photo of a handshake is fifty words of their time spent on nothing. Brevity here is not style, it is respect.

Decorative images get an empty alt

Not every image needs a description. A divider, a background texture, a stock photo that adds mood but no information, an icon that sits next to a text label saying the same thing — these are decorative, and the correct alt text for a decorative image is an empty string: alt="".

Empty does not mean missing. An image with no alt attribute at all forces a screen reader to guess, and it usually guesses the filename — "hero-banner-final-v2.jpg" read aloud, in the middle of your article. An empty alt attribute tells the screen reader to skip the image entirely, which is exactly right for something that carries no information.

The test is simple: if you removed the image and nothing in the article became harder to understand, it is decorative. Be honest about this. Most images on most pages are decorative, and the reason so many sites have bad alt text is that their authors wrote earnest descriptions for images that needed none.

Common mistakes

Keyword stuffing. Alt text reading "cheap running shoes, best running shoes, running shoes sale, buy running shoes" is not a description, it is a keyword list, and it is read aloud to screen reader users in exactly that form. It also does not help rankings: search engines have treated keyword-stuffed alt text as a spam signal for years. Describe the image once, in words a person would use.

Starting with "image of" or "picture of". A screen reader already announces that the element is an image, so "image of a dog" is heard as "image, image of a dog". Start with the subject: "A dog sleeping on a porch."

Using the filename. "IMG_4821.jpg" or "screenshot-2026-10-27-final.png" is not a description of anything. If the filename is the alt text, the alt text was never written.

Repeating the caption. If the image has a visible caption saying the same thing, the alt text should not repeat it word for word — a screen reader user hears it twice. Either shorten the alt text to the detail the caption omits, or, if the caption fully describes the image, leave the alt empty.

Describing text inside the image without transcribing it. If an image contains words — a screenshot of an error message, a photo of a sign — the alt text should include those words, because they are the content. "Screenshot of an error" does not help; "Screenshot showing the error message 'Payment failed: card declined'" does.

Alt text and the rest of the page

Alt text is one part of how a page presents its images, and it works alongside the other parts rather than replacing them. The file name should be readable too — red-kettle.jpg rather than IMG_4821.jpg — because file names are another signal about the image's subject, and because they are what people see when they save or share the file.

Captions, titles, and surrounding text all contribute. A caption can carry the context — where the photo was taken, who is in it — while the alt text carries the description. The two should complement each other, not duplicate each other.

And the same discipline applies to the tags that describe the page when it is shared. The Open Graph preview tool on this site shows what a link's share card will look like, including whether its image renders at all — a related check, because a share card with a broken image and a page with undescribed images are the same failure in two places: the image was treated as decoration when it was doing real work.

What to do

Audit the images on your ten most visited pages. For each one, ask whether it is decorative — if so, set an empty alt. If it is informative, write one sentence describing what it shows and why it matters, under 125 characters, without keywords and without "image of". If the image contains text, transcribe the words that matter.

Then make it part of publishing, not a cleanup project. The pre-publish checklist already includes an alt text step; the rule to attach to it is one sentence long, and it fits on the same line: describe what the image does, or leave it empty. Images added later inherit the habit, and the audit never needs repeating at scale.

Limitations

The 125-character guide is a practical limit from screen reader behaviour, not a specification, and different screen readers handle long alt text differently. Treat it as a default, and let a genuinely complex image exceed it when the alternative is leaving out information a reader needs.

Alt text also does not make an inaccessible image accessible on its own. A chart whose data matters needs a data table or a text summary alongside it; a diagram that explains a process needs that process explained in words. Alt text is the label on the image, not a substitute for the content the image carries.

About the author

Hongtao Ren (任宏涛) — Developer based in Xi'an, China. Builds browser-based tools and JetBrains IDE plugins. He built and maintains SerpPrism.

Corrections are the most useful thing you can send. If a tool or guide here gives you a wrong answer, that is a bug, not a judgement call — use the contact page.

Questions

What should image alt text say?

What the image does for a reader who cannot see it, in one sentence: the subject plus the detail the surrounding text depends on. Keep it under about 125 characters and keep keywords out of it.

How long can alt text be?

Aim for one sentence under about 125 characters. Several screen readers split or cut off longer text, so a description that runs to three sentences gets truncated for the audience it was written for.

What alt text should a decorative image have?

An empty alt attribute: alt="". That tells screen readers to skip the image. A missing alt attribute is different — it makes the screen reader guess, usually by reading the filename aloud.

Does alt text help SEO?

A little. It helps search engines understand what an image shows and feeds image search, but its influence on ordinary web ranking is small. Its main job is accessibility, and that is reason enough to write it well.

Should I repeat the caption in the alt text?

No. A screen reader user would hear the same words twice. Either shorten the alt text to the detail the caption omits, or leave the alt empty if the caption fully describes the image.