How to remove text from a photo
The short answer
There are four ways to remove text from a picture: crop it off, clone nearby pixels over it, run a classic fill, or use a filling-in model that redraws the gap. Which works depends on what is behind the text. Over sky, water, walls and blur, any fill works and a model is cleanest. Over faces, fine patterns and straight edges nothing recovers what was there, and the result is a guess. In our test the model fill was 18% closer to the true picture than a classic fill. Only do this to pictures you own or may edit.
A caption you no longer want, a date stamp, a title added for a post, subtitles burned into a screenshot, your own name you stamped on a photo and lost the clean file of: all of these are text on top of a picture, and all of them can be taken off, with different results. This guide compares the four ways and says what each is good for.
First: should you?
Remove text from pictures that are yours, or that you have permission to edit. Taking a credit, a name or a watermark off someone else's work does not give you the right to use it, and a picture that is meant as a record (a document, a receipt, evidence) should not be changed at all. If a mark sits on a picture you want to use, the better route is to get the clean, licensed version from its owner. Our guide to content credentials and watermarks covers the visible and invisible kinds.
The four methods
| Method | How it works | Works well when | Fails when |
|---|---|---|---|
| 1. Crop | Cut the picture so the text is outside. | The text is at an edge and you can spare the room. | The text is in the middle, or you need the original shape and size. |
| 2. Clone | Copy pixels from a nearby clean spot over the text, by hand. | The background is a texture you can match by eye: grass, sand, brick. | It is large or has a gradient or a pattern: repeats and seams show. |
| 3. Classic fill | An algorithm pulls the colors from the edges of the gap inward (the "Telea" method in OpenCV is one). | Thin letters over a smooth background. | Big gaps or texture: it smears into a soft blotch. |
| 4. Filling-in model | A neural network that has seen millions of pictures draws what probably belongs in the gap, from the picture around it. | Most backgrounds, including some texture and edges. | It invents: faces, logos, fine patterns and exact lines come back as plausible guesses instead of what was there. |
What we measured
To compare them fairly you need the clean picture behind the text. So we drew text ourselves on six photos (a meme-style title top and bottom, a yellow subtitle, a white sign in two sizes, a diagonal watermark, a date stamp and a script greeting), kept the clean photos, and measured how far each result was from the clean photo on the pixels the text covered (the average difference, 0 to 255; lower is closer):
| Picture with the text on it | Classic fill (Telea) | Our model, Fast | Our model, Best quality |
|---|---|---|---|
| Average over the six pictures | 19.3 | 19.0 | 15.9 |
The untouched pictures were at 87. So all three removed most of the text, in numbers. The fast model was no closer than the classic fill, and the best-quality model was 18% closer. A number like this does not show how natural the fill looks, which is the real test, so look at what the methods did on real backgrounds:
- Sky, water, snow, plain walls. All the fills were clean. This is the easy case, and the one that is nearly always worth doing.
- Grass, leaves. A diagonal watermark across a meadow vanished with the model fills; a clone by hand would take patience.
- Detail. The fast model smudged the reflection in a lake and drew a streak out of a fox's ear. The best-quality model was cleaner in both, but a title that touched the summit of a mountain left the summit slightly softer than the real one, a lighthouse lantern came back as a plausible lantern of a different shape, and a greeting across a kitten's ear left a smudge where the tip of the ear had been.
The rule that comes out of this: the more structure under the text, the more the fill is a guess.
How automatic text finding works
Marking every letter by hand is the slow part, so most tools now find the text for you. Two kinds of software can do that, and they behave very differently. A text reader (OCR, such as Tesseract) tries to recognize words and reports boxes around the ones it managed to read. A text detector answers a single question for every pixel: how likely is it that this pixel belongs to text? It never reads anything, so the language, the font and whether the words make sense do not matter to it.
We tried a reader first. On our six test pictures Tesseract marked between 0 and 61% of the text pixels, and 62 to 100% of what it did mark was not text. Our Remove Text from Image uses a detector instead, PP-OCRv5 mobile from the PaddleOCR project, a 4.6 MB model. It turns the picture into a map of probabilities, and a short clean-up step (called DB, for differentiable binarization) turns that map into marks:
- Every pixel with a text probability above 0.3 becomes a candidate.
- Touching candidates are joined into blobs, and blobs under 12 pixels are thrown away as noise.
- Each blob is scored by its average probability. Blobs that score below the Certainty setting are dropped. At 50%, where it starts, the cut-off is 0.6, the detector's own default; the slider moves it between 0.3 and 0.9.
- Each kept blob is grown outward, because the detector is trained to find the core of the letters. Margin sets how far. At 50% it is the detector's own amount, and the growth is larger for big solid blobs than for thin ones.
Both sliders redo only the last two steps from the probability map that is already there, so moving them changes the marks at once, with no new model run.
How much it marks, picture by picture
| Text on the test picture | Text pixels found | Letters cover | Marks cover |
|---|---|---|---|
| Meme title, top and bottom | 99.5% | 13.8% | 18.2% |
| Yellow subtitle | 99.9% | 3.0% | 4.7% |
| White sign in two sizes | 100% | 2.7% | 11.4% |
| Diagonal watermark at 45% opacity | 100% | 2.2% | 8.1% |
| Orange date stamp | 100% | 0.25% | 2.6% |
| Script greeting | 100% | 5.6% | 17.0% |
The marks are always bigger than the letters: 1.3 times for the heavy meme title, about 10 times for the tiny date stamp. The extra covers outlines, drop shadows and the soft edge around each letter, and it leaves the fill a strip of clean picture to start from. The date-stamp picture also showed a car, and the detector marked its badge and number plate too, since it finds every piece of text in the scene. On the meme picture, Margin at 0, 50 and 100 marked 10.1, 18.2 and 26.7% of the picture. At 0 the marks covered less than the letters themselves did (13.8%), so turning Margin down on bold, outlined lettering leaves rims behind.
Small text, other alphabets and false marks
The detector works on a copy of the picture with its longer side at 960 pixels (Normal text) or 1600 pixels (Small text). On a 3200-pixel picture, letters 22 pixels tall shrink to under 7 pixels in the Normal copy, and Normal found only 49% of them; Small text found 99.8%. Letters 30 pixels tall on the same picture were found completely with Normal. A practical rule: when the letters are smaller than about 0.8% of the picture's longer side, choose Small text. Making the copy even bigger (2048) found nothing more. Lines in Japanese, Cyrillic and Arabic were found completely.
On photos with no added text, Normal left a cat and a dog untouched and put a few small marks on a bird, a pair of headphones and a street (a shop sign and some wall stains), each under 1% of the picture. Small text sees more of everything: on a bicycle photo it made 110 specks where Normal made 20. The detector's own model card scores it lower on artistic lettering, handwriting and rotated lines than on ordinary printed text, so a decorative logo or a handwritten note may need some painting by hand.
Which method for which picture
- Text at the edge and the shape does not matter: crop. It is lossless in the sense that nothing is invented.
- Text over sky, water, a wall or a blurred background: a fill. The fast model is enough.
- Text over texture or near an edge: the best-quality fill, then look at it at full size. If an edge bends, redo that area in smaller pieces.
- Text over a face, hands, a logo or a pattern you must keep exact: do not rely on any fill. Use a different picture, or accept an obviously edited result.
Fast or Best quality: picking the fill
Our tool offers two filling-in models. Fast is MI-GAN (a 27 MB download) and Best quality is LaMa (208 MB). To see where the difference lies, we cut a 180-pixel hole into test pictures of different backgrounds, let both models fill it, and measured the average error inside the hole against the real picture (0 to 255, lower is closer):
| Background behind the hole | Fast | Best quality |
|---|---|---|
| Smooth gradient | 1.2 | 1.1 |
| Bricks | 12.0 | 8.1 |
| Leaves | 19.6 | 15.2 |
| Wire fence | 20.4 | 11.3 |
| Diagonal stripes | 41.3 | 18.7 |
On a smooth background the two are equal. The more regular the pattern, the further ahead Best pulls: about a third closer on bricks, almost twice as close on the fence, and more than twice as close on stripes, where Fast tends to bend the lines. Leaves are irregular, so both models are guessing and the gap is small.
Time is the other side. On our test computer, Fast finished a whole 800-pixel picture in 2 to 6 seconds, while Best took about 20 seconds for every separate area it filled (22 seconds for one area, 71 for four). Only one model is kept loaded at a time. A sensible routine is to run Fast first to check that the marks are right, press Undo last removal, and then run Best for the version you keep. Over sky, water or a wall, keep the Fast result and save the wait.
Why a large mark comes out soft
Both models work on a square of exactly 512 × 512 pixels. The tool takes each marked piece, cuts out a square window around it twice as wide as the piece's longest side (at least 256 pixels), scales that window to 512, fills it, and scales the patch back. Pixels outside the window are never touched. The scaling is what decides how sharp the fill can be:
| Longest side of the marked piece | Window cut from the photo | Before filling, the window is |
|---|---|---|
| 120 px | 256 px | enlarged 2 times: full detail |
| 256 px | 512 px | used as it is: full detail |
| 500 px | 1,000 px | shrunk 2 times |
| 1,200 px | 2,400 px | shrunk 4.7 times |
A caption running 1,200 pixels across a 4000-pixel photo is therefore filled at about a fifth of the photo's resolution and then enlarged, which is why a big fill looks smooth next to the grain of the photo around it. The cure is to remove a long line in sections: paint about 250 pixels of it, remove, then paint the next section. Each section is filled at full detail, and each later section sees the earlier fill as ordinary picture. It costs one model run per section, so save this for text over texture.
Cover the edges grows every mark before filling: 4 pixels on a picture up to 1024 pixels wide, scaled up with larger pictures (about 16 pixels on a 4000-pixel photo). It exists because a mark that stops short of the letters leaves a colored rim, and the fill then continues that rim. In a test with a mark painted 30 pixels too narrow, Cover the edges at 0 left 15,597 rim pixels behind, and at 20 it left none.
A worked example: three lines on a lake photo
The before and after picture near the top of this page started as a clean photo of Moraine Lake. We drew three lines on it: the title "Moraine Lake", a line reading "Banff National Park · September", and a credit, "© Your name". This is what the removal looked like in Remove Text from Image:
- Add the picture. The detector downloads once (4.6 MB) and finds the text on its own. It marked three pieces covering 10.6% of the picture, in red.
- Check the marks. The scene has no signs or plates, so there was nothing to erase. On your own pictures, this is the moment to zoom in and look for letters the red does not reach.
- Choose Best quality and press Remove the text. The three pieces were filled in two windows, because two of them sat close enough to share one window.
- Look at it at full size. The lake, the trees and the sky were clean. The middle summit, which the title touched, came back slightly softer than the real peak.
- Decide and save. For a photo to post, the softer summit is fine. To get closer to the real one, you could undo, paint only the part of the title over the summit, and remove it as a separate small section. A JPEG picture is saved as JPG at quality 95 by default, at its full size, with
-removedadded to the name.
Tips for a clean result
- Remove text before other edits. Resizing, sharpening or adding a filter first spreads the letters' edges into the pixels around them, so the marks need to be wider and the fill has less clean picture to work from.
- Remove, look, then repeat. A second pass on what is left is better than one huge mark.
- Keep the original. Work on a copy: a fill cannot be undone from the saved file.
Troubleshooting
| What you see | Likely cause | What to do |
|---|---|---|
| A faint outline of the letters remains | An outline, shadow or glow sat outside the marks, and the fill continued it | Raise Margin or Cover the edges, or paint over the rim and remove again |
| Some text was not marked at all | The letters are too small for the 960-pixel copy, or the text is decorative, handwritten or rotated | Switch to Small text, lower Certainty a little, or paint the rest by hand |
| Things that are not text are marked | Signs, plates and text-like shapes (spokes, stains, fences) look like text to the detector | Use Erase a mark on them before removing, or raise Certainty |
| The fill is a smooth smear on grass or gravel | A long piece was filled at reduced detail, or Fast was used | Use Best quality and remove the line in sections of about 250 pixels |
| A straight edge bends or a pattern breaks | The model guessed the structure under the letters | Best quality on a smaller section, or crop that edge off |
| A faint square shows in the sky | Fast's fill of a smooth sky can come out a shade off from the sky around it (we saw a faint box around a removed sign) | Undo and run Best quality on the same marks |
| Removal takes minutes | Best quality fills one area at a time (about 20 seconds each), and text spread over the whole picture makes many areas | Run Fast first; switch to Best only for the areas that need it |
On a phone: Clean Up and Magic Eraser
Both big phone photo apps have a remover built in, and both work by circling or brushing over what should go, which suits a date stamp or a single caption.
- iPhone, iPad and Mac: Clean Up in the Photos app is part of Apple Intelligence. Apple's requirements page lists the iPhone 15 Pro and 15 Pro Max, the iPhone 16 models, iPads with an A17 Pro or M1 chip or later and Macs with M1 or later, running iOS 18.1, iPadOS 18.1 or macOS Sequoia 15.1 (iOS 18.4 in the European Union). It does not work on devices bought in mainland China.
- Android and iPhone, through Google Photos: Magic Eraser started on Pixel phones. Google opened it to all Google Photos users from May 15, 2024, on devices with at least 3 GB of RAM running Android 8.0 or iOS 15 or later, according to its announcement.
The same rule about what is under the text applies on a phone. For many lines of small text, or text you want to find automatically and check letter by letter, a detector that marks everything for you saves a lot of brushing.
Beyond text: other things on a picture
The same fills work on a date stamp, a blemish, a person in the background or a power line, with the same rule: easy over plain areas, a guess over structure. Remove Object lets you paint over anything, and Watermark Remover is the same engine for marks on your own pictures.
Find the text in a picture, mark it in red automatically and fill the gaps in with a model that looks at what is around them. Check and correct the marks first, then remove. It runs in your browser. Open the Remove Text from Image.
Frequently asked questions
What is the easiest way to remove text from a photo?
If the text is at an edge, crop it off. Otherwise use a fill tool: mark the text, let the tool fill it from the picture around it, and check the result at full size.
Can I remove text from a screenshot?
Yes, and flat app backgrounds are among the easiest cases, since any fill matches a single color. A screenshot is usually a PNG, and the tool saves a PNG picture as PNG by default, which keeps the remaining text and lines crisp. Saving it as JPG instead would add blur around every letter that is left.
Can text over a face be removed?
It can be covered, but the fill cannot know what the face looked like, so the result is a guess and often looks wrong. Use a different picture if the face matters.
Does removing text lower the picture quality?
Only the marked area changes. In our test, pixels more than 40 pixels from the marks were identical afterwards. The filled area can be softer than the photo, and saving as JPG compresses the picture again.
Does automatic text finding work on Japanese, Arabic or Cyrillic text?
Yes. A text detector does not read the words, it only marks pixels that look like lettering, so the script does not matter much. In our test, lines in Japanese, Cyrillic and Arabic were marked completely.
How long does it take to remove text?
On our test computer, finding the text on an 800-pixel picture took under a second. The Fast fill took a few seconds for the whole picture; Best quality took about 20 seconds for each area it filled, after a one-time 208 MB download.
Will people be able to tell that text was removed?
Over asphalt, water, gravel and plain walls we could not see a trace when we compared the pictures side by side. Over grass, branches or a detailed object the filled patch tends to be smoother than the photo around it, and someone who looks closely at full size can spot it.
Is it legal to remove text or a watermark?
It depends on whose picture it is and why you do it. On your own pictures it is fine. Removing a credit or watermark from someone else's work does not give you the right to use it. We are not lawyers: ask the owner or use a licensed picture.