Image Text Overlay

Add captions, titles and labels to a picture, with several lines, a choice of typeface, an outline and a box or bar behind the text, and check the text is readable with a measured contrast ratio.

Tool Media & Files Updated Oct 16, 2026
How to Use
  1. Drop an image on the box, click to browse, or paste one. TIFF, PSD, HEIC, TGA and camera RAW files open too. A built-in sample is loaded so you can try the presets straight away.
  2. Type your Text; press Enter for a new line. Presets change the style and keep your words.
  3. Pick a typeface, Size (a share of the picture height), colour and outline, then place the text with X, Y and the alignment.
  4. Add a Box or a full-width Bar behind the text when the picture is busy, and watch the contrast readout: 4.5 : 1 or more reads well.
  5. Save the picture in any format from the Save panel. The text is drawn at the picture’s full size, so it stays sharp.
Image & Text
Enter = new line
% of height
% of size
%
%
× size
Presets
Result
Text Size
—
Lines
—
Text Block
—
Contrast
—

Worked Example

White text over a mid-grey wall, RGB (128, 128, 128). Each channel is 128 ÷ 255 = 0.502, which becomes ((0.502 + 0.055) ÷ 1.055)2.4 = 0.2159 in linear light, so the grey’s luminance is 0.2159; white is 1. The contrast ratio is (1 + 0.05) ÷ (0.2159 + 0.05) = 3.95 : 1: enough for a large headline, short of the 4.5 : 1 that normal-sized text needs.

The same text on a black bar at 55% opacity. The bar darkens the wall to 128 × 0.45 = 57.6, stored as 58, whose luminance is 0.0423. The contrast rises to (1 + 0.05) ÷ (0.0423 + 0.05) = 11.37 : 1, easily readable, while the picture still shows through the bar.

The common mistake: white text on a bright sky. A pale sunset pixel such as (246, 197, 143) has a luminance of 0.6151, so white text over it reaches only 1.05 ÷ 0.6651 = 1.58 : 1 and almost disappears. Black text on the same sky would give 13.30 : 1; with white text, add an outline or a bar.

Show Work

Load an image to see the text layout and its contrast worked out.

Formulas

Text size
F = H × size ÷ 100
lines are F × line height apart
Block height
h = F × lh × (n − 1) + F
n lines, centred on Y
Linear light
c = ((s + 0.055) ÷ 1.055)2.4
s = value ÷ 255; s ÷ 12.92 when s ≤ 0.04045
Relative luminance
L = 0.2126R + 0.7152G + 0.0722B
of the linear-light values
Contrast ratio
CR = (L₁ + 0.05) ÷ (L₂ + 0.05)
L₁ the lighter; 4.5 : 1 normal text, 3 : 1 large text
Box over the picture
b = p + (k − p) × a
p = picture, k = box colour, a = box opacity

Why Contrast Matters

The contrast ratio used here comes from the W3C’s Web Content Accessibility Guidelines. WCAG 2.0, published in December 2008, set the minimum at 4.5 : 1 for normal text and 3 : 1 for large text (Success Criterion 1.4.3), and the same thresholds carry on in WCAG 2.1 and 2.2. The formula works on relative luminance, the brightness of a colour in linear light weighted by how sensitive the eye is to red, green and blue, which is why green counts for 71.52% and blue for only 7.22%.

Text on photographs is harder than text on a flat page, because the background changes from letter to letter. Film and television subtitles solve it with an outline or a drop shadow around white letters, and news captions with a solid or semi-transparent band behind them. Both tricks are here: Outline draws a stroke round every letter, and Box or Bar puts a band of colour behind the text.

About This Tool

This tool adds one or more lines of text to a picture in four typefaces, with an outline, alignment and position, and an optional box or full-width bar behind it. Show Work gives the measured size of the text block and the WCAG 2 contrast ratio between the text and what is behind it, plus the share of backdrop pixels that would be hard to read on their own. Settings can be put in the page address, for example ?box=bar&y=90.

Images are decoded and saved in your browser by the engine behind the Universal Image Converter, so TIFF, PSD, HEIC, TGA and RAW files work too. Nothing is uploaded.

Related tools: Watermark, Meme Generator, and Social Media Image Sizer.

Frequently Asked Questions

How is readability measured?

With the contrast ratio from the Web Content Accessibility Guidelines (WCAG 2): (L₁ + 0.05) ÷ (L₂ + 0.05), where L₁ and L₂ are the relative luminances of the lighter and darker colour. The tool compares the text colour with the average of every pixel behind the text block, box included. WCAG asks for at least 4.5 : 1 for normal text and 3 : 1 for large text, meaning 18 pt or 14 pt bold.

What are “weak spots”?

An average can hide trouble: white text over a picture that is half sky and half shadow may average out fine while the letters over the sky are hard to read. Weak spots is the share of backdrop pixels that give less than 3 : 1 against the text on their own. An outline, a box or a bar brings it down.

Which fonts can I use?

Four families that every system has a version of: a sans-serif (system-ui, Segoe UI, Roboto or Arial), a serif (Georgia or Times New Roman), a monospace font and a condensed display face (Impact). The exact font comes from your device, so line widths can differ slightly between computers; Show Work gives the measured width.

How does the outline work?

The outline is drawn as a stroke around each letter and the fill is painted on top, so only the outer half of the stroke shows. An outline of 6% on 50 px text shows 3 px around the letters, drawn with a 6 px stroke. It keeps light text readable over bright parts of a photo.

How is this different from the Watermark tool?

Watermark is for faint, repeated ownership marks: a semi-transparent credit in a corner or tiled across the picture. Text Overlay is for text that people are meant to read: captions, titles, quotes and labels, with several lines, typefaces, boxes and a readability check.

How do I use the Image Text Overlay?

Just type your numbers. The answer shows up right away — there is no button to press. Change anything and it updates by itself.

Does it cost anything or need an account?

No. The tool is completely free, there is no account to create, and it keeps working offline after the page first loads.

Is anything I type uploaded?

No. The tool works entirely on your device, so the values you enter never leave your browser.

Common Use Cases

Photo captions

A one-line caption on a 55% black bar along the bottom: white text still reaches at least 4.7 : 1 even where the scene behind the bar is pure white.

Quote graphics

A two-line quote in serif type centred on a calm background, checked for at least 4.5 : 1 before posting.

Labels on screenshots and diagrams

Black text on a solid yellow (#ffd400) box to point out a button or a part, at a contrast of 14.67 : 1.

Titles and thumbnails

A bold title with a dark outline across the top of a picture for a blog header or video thumbnail.

Last updated: