How to blur the background of a photo
The short answer
A background is blurred by a camera when the lens is wide open, the subject is close, the background is far behind it, and the lens is long or the sensor large. If your photo did not get that, you can add blur afterward in two ways: by depth, where the blur grows with distance from what is in focus (it looks like a lens), or by subject, where everything except the subject gets the same blur (it looks like portrait mode). Depth blur looks more natural on scenes; subject blur is simpler on a portrait. Both go wrong at thin edges like hair and wires.
A sharp subject against a soft, creamy background is the look people mean by "a professional photo". It draws the eye to one thing and hides a messy room. You can get it with a camera, with a phone's portrait mode, or afterward on a picture you already have. This guide explains why it happens, so that you can both shoot for it and judge the fake ones.
Why a lens blurs the background
A lens focuses on one distance. Things nearer or farther are drawn as small discs instead of points, and the farther from the focus, the bigger the disc. The size of those discs depends on four things:
- The aperture. A wide-open lens (a small f-number such as f/1.8) makes big discs. Closing it down (f/11) makes small ones, so more of the picture looks sharp.
- The distance to the subject. The closer you stand, the more the background blurs.
- The distance behind the subject. A background a long way behind blurs much more than a wall right behind the person.
- The focal length and the sensor. A longer lens and a larger sensor blur more. This is why a phone with a tiny sensor needs software to imitate what a bigger camera does by itself.
The practical advice: step close to the subject, move the subject away from the background, zoom in a little, and open the aperture. If you did all that, you may not need to fake anything.
How big the blur gets: the numbers
Optics gives a simple formula for the size of the blur disc that a background point makes on the sensor. With focal length f, f-number N, the subject at distance s and the background at distance D, the disc's diameter is
b = f² / (N × (s − f)) × (D − s) / D
(the depth of field article gives the same thing in terms of magnification). Working it through for a 50 mm lens at f/1.8 on a full-frame camera (a sensor 36 mm wide), with the subject 2 meters away, shows which of the four factors does the most work:
| Background distance | Blur disc on the sensor | As a share of the picture's width |
|---|---|---|
| 3 m (1 m behind the subject) | 0.24 mm | 0.7% |
| 5 m | 0.43 mm | 1.2% |
| 10 m | 0.57 mm | 1.6% |
| Very far (mountains, sky) | 0.71 mm | 2.0% |
Moving the background from 1 meter behind the subject to 8 meters behind it more than doubles the blur, but going from 10 meters to the horizon adds only a quarter more: the term (D − s) / D can never pass 1. Stepping closer pays off faster. With the subject at 1 meter instead of 2 and the background still at 10 meters, the same lens makes a disc of 1.32 mm, 2.3 times bigger.
The sensor makes the largest difference between cameras. Take a sensor six times smaller across, with a lens six times shorter (8.3 mm) so that it frames exactly the same shot at the same f/1.8. The disc for the background at 10 meters becomes 0.0155 mm on a sensor 6 mm wide: 0.26% of the picture's width instead of 1.6%, about a sixth. At the same framing and f-number, background blur shrinks in step with the sensor. Phone sensors are several times smaller across than full frame, which is why phones blur backgrounds with software.
Matching the Blur setting to a lens
Our Background Blur sets the largest blur radius as a share of the picture's shorter side: the Blur slider runs from 0 to 6%. Using the same formula for a 3:2 full-frame picture (shorter side 24 mm), with the subject at 2 meters and the background at 10 meters, gives a rough guide to which setting looks like which lens:
| Camera and lens | Blur radius (share of shorter side) | Blur setting with the same radius |
|---|---|---|
| Sensor six times smaller, same framing as 50 mm, f/1.8 | 0.19% | about 3 |
| Full frame, 35 mm at f/2.8 | 0.37% | about 6 |
| Full frame, 50 mm at f/1.8 | 1.2% | about 20 |
| Full frame, 85 mm at f/1.4 | 4.5% | about 75 |
The default of 45 sits between a fast 50 mm and a fast 85 mm portrait lens. In lens blur mode the full radius goes to the part of the scene farthest in depth from your focus point, so this match applies to the farthest background; in subject mode every background pixel gets the full radius. The tool's depth is relative (near to far within the picture, with no meters), so treat the table as a starting point for your eye rather than a calibration.
When you need to add it afterward
- The picture was taken on a phone without portrait mode, or with it off.
- The background was too close, or the aperture was small, because the light was bright.
- You want to tame a busy background in a photo you cannot retake.
On an iPhone: change the blur after the shot
If the photo came from an iPhone, check what the phone already stored before reaching for another tool. Apple's iPhone guide describes three things you can do in the Photos app:
- Change the strength. Open a Portrait mode photo, tap the edit button, tap Portrait and drag the Depth Control slider. A gray dot marks the value the photo was taken with, so you can always find your way back.
- Move the focus. On iPhone 13 or later, tap Portrait and then tap a new subject; the blur rearranges itself around it. Apple's advice is to pick a subject that was not already blurred or far away.
- Turn an ordinary photo into a portrait. On supported models, photos of a person, dog or cat taken in Photo mode can get the portrait effect later: open the photo, tap the edit button, then Portrait.
Turning the effect off (Portrait, then Portrait Off) brings back the photo as the camera took it. Many Android phones have similar portrait modes with their own editing steps. For everything else, such as older photos, pictures from a camera without depth data, scans and screenshots, the blur has to be made from the picture alone, which is what the rest of this guide covers.
Two ways to add the blur
| By depth (lens blur) | By subject (portrait look) | |
|---|---|---|
| How | A depth model estimates how far each part of the picture is. You click what stays in focus, and the blur grows with distance from it, in front and behind. | A model finds the main subject. It stays sharp, and everything else gets the same blur. |
| Looks like | A real lens with a wide aperture: a gradual change, a sharp plane. | Phone portrait mode: a flat cut-out against a blurred wall. |
| Good for | Landscapes, streets, a subject at an angle, a floor that recedes. | One person, pet or product against a background. |
| Goes wrong at | Thin things, glass and reflections (the depth estimate is rough there); a subject that is long in depth, such as a car seen from an angle, is partly blurred. | Fine edges the subject model misses (cables, hair strands); the blur has no sense of distance, so a floor right next to the subject is as blurred as the far wall. |
Here is the depth method on a real photo. One click on the car chose what stays sharp:
Our Background Blur does both in your browser, with a live preview of the real result. It also models two things that make a fake look fake or real:
- Sharp stays sharp. A blurred background must not smear into the sharp subject, and a blurred foreground should still spread over what is behind it. The tool lets a pixel's blur count only where that pixel's own blur disc actually reaches.
- Bright lights bloom. In a real photo a small bright light far behind the subject becomes a soft disc, a six-blade lens makes it a hexagon. The Bright spots setting gives bright pixels extra weight so lights in the background bloom instead of being averaged away.
A worked example, and what each choice changed
The car picture above was made with these settings: Lens blur, one click on the car about a third of the way in from the left and a third down from the top, Blur 55 and Sharp zone 30. The reasoning behind each number:
- Blur 55 is a radius of 3.3% of the picture's shorter side (about 34 pixels on a 1024-pixel picture), a little stronger than the default of 45.
- Sharp zone 30 was needed because a car seen at an angle is deep. The sharp zone is measured in the picture's own depth range: at the default of 12, everything within 3.6% of that range in front of or behind the focus stays sharp; at 30 the band is 9% each way. At 12 the rear of the car started to soften.
- The click takes the median depth of a small window around the point, so a single odd pixel under the cursor cannot decide the focus.
In tests on a photo of a retriever against leaves, we measured sharpness (the average difference between neighboring pixels) to see what each mode does to the subject itself:
| Setting | Dog | Leaves in the corner |
|---|---|---|
| Original photo | 7.33 | 2.04 |
| Lens blur, focus in the middle, where the dog is | 6.42 | 0.57 |
| The same, with "Blur things in front of the focus too" off | 7.33 | not measured |
| The subject mode | 7.33 | 0.53 |
| Lens blur, focus clicked on the leaves | 1.53 | 3.23 |
With the focus on the dog, lens blur kept 88% of its sharpness: the parts of the dog nearer than the focus point fell outside the sharp zone and blurred slightly, as they would with a real lens. Switching off the blur in front of the focus kept every pixel of the dog, and so did the subject mode. For a portrait where the subject is the nearest thing in the picture, lens blur with the front blur switched off gives you a sharp subject and a background that still gets softer with distance. Widening the sharp zone has a large effect on how much is left alone: from 0 to 60, the share of the picture left exactly as it was rose from 5% to 47%.
How to get a believable result
- Click the right place. In depth mode the focus is the depth under your click. Click the middle of the part that should be sharpest, usually the eyes of a face or the front of an object.
- Widen the sharp zone for a deep subject, as in the car example, or choose the subject method.
- Do not overdo it. A very strong blur on a picture with a lot of detail looks like a smudge. The blur radius in the tool tops out at 6% of the shorter side. A moderate amount reads as a lens and a heavy one reads as a filter.
- Check the edges at full size. Look at hair, glasses frames and the line where the subject meets the background. A thin halo of sharp background around a subject is the usual sign that the mask was a little off. Trimming the edge in the subject mode, or a slightly wider sharp zone in depth mode, usually fixes it.
- Look at the depth map. If a part of the picture blurs wrongly, the depth view shows the cause: a wrong shade means a wrong blur.
- Keep the original. Blur cannot be undone from the saved file. The tool never changes your original, and holding "Hold to see the original" shows the picture without the blur.
Troubleshooting
| What you see | Likely cause | What to do |
|---|---|---|
| Part of the subject is soft | The subject is deeper than the sharp zone, or it sticks out in front of the focus point | Raise Sharp zone, switch off "Blur things in front of the focus too", or use the subject mode |
| A patch of background stays sharp | The depth model gave it nearly the same depth as the subject (a wall right behind a person, thin parts at an angle) | Open the depth map view: if the patch has the subject's shade, use the subject mode for that picture |
| The floor at the subject's feet is as blurred as the far wall | The subject mode gives the whole background one blur | Switch to lens blur, where the floor gets sharper toward the subject |
| A cable, a strap or a thin branch disappears into the blur | The subject mask missed it (we saw this with a headphone cable) | Use lens blur, which works from depth instead of an outline |
| The first photo takes a while | The depth model (94 MB) or the subject model downloads once | Wait for the first run; after that the depth step took about 3.4 seconds a picture on our test computer, and finding the subject about 9 seconds |
| The saved picture is smaller than the original | Pictures longer than 4096 pixels are made smaller for saving, and the page says so | For a bigger print, enlarge the finished picture with the image upscaler |
What to use it on, and what not
- Good: a pet or person against trees, a car in a lot, a flower in a garden, a street with a person in the foreground. Landscapes get a tilt-shift look.
- Poor: a subject with lots of thin parts (a bicycle's spokes, a wire fence, a bush), a picture with glass or mirrors, and a picture where the subject and background are at the same distance (a wall).
- Not a way to hide things. Blur can be reversed in part, and a face or number plate behind a light blur may still be readable. To hide a face or text for real, use Blur Image with a strong setting, or cover the area with a solid block.
Is it a lie to fake a blurred background?
It is normal: phones do it by default and editors have done it for years. Where it crosses a line depends on context. For an ordinary photo it is a style choice. For a product listing, a news picture or a document, it can hide something the viewer needs, so do not blur away facts. A fake blur imitates a lens without having an f-number, so use the lens table above as a starting point and let the look you want decide the final amount.
Blur the background of a photo like a camera lens: click what should stay sharp, or let the tool keep the subject sharp. Round or six-blade bokeh, bright spots, live preview. It runs in your browser. Open the Background Blur.
Frequently asked questions
Why is my background not blurry?
Usually the aperture was small, the background was close to the subject, or the sensor was small, as on a phone. The camera habits near the top of this guide fix the next shot. For a photo you already took, add the blur afterward in the background blur tool.
What is the difference between lens blur and portrait mode?
Lens blur grows with distance, so near and far things blur by different amounts, like a real lens. Portrait mode keeps the subject sharp and blurs everything else the same. The first looks more natural on scenes; the second is simpler for one person against a background.
Why does the edge of my subject look strange?
Fine edges such as hair and wires are hard for both the depth model and the subject model, so a thin ring of sharp background can remain. Widen the sharp zone a little in depth mode, trim the edge in subject mode, and do not use a very strong blur.
Which f-number does the default Blur setting match?
There is no exact match, because the tool knows relative depth and no distances. As a rough guide, with the subject at 2 meters and the background at 10, the default of 45 falls between a full-frame 50 mm lens at f/1.8 (about 20) and an 85 mm lens at f/1.4 (about 75).
Can I change the focus point after saving?
Not in the saved file: the blur is baked into its pixels. Keep the original, open it again and click a different point. On an iPhone, Portrait mode photos keep their depth data, so the Photos app can move the focus later on iPhone 13 or later.
Does the background blur work on drawings and anime pictures?
The subject mode has a Drawing or anime picture type for finding the subject in illustrations. Lens blur depends on a depth estimate: look at the depth map view first, and if its shades do not follow what is near and far in the drawing, use the subject mode.
Can I blur a face so that nobody can see it?
Not with a soft background blur. Use a strong blur or a solid block on the face, because a light blur can be partly reversed. Our Blur Image tool is made for that.
Does adding blur make the photo smaller or lower quality?
The parts that stay sharp keep every pixel of the original. The blurred parts are made at up to 1600 pixels and enlarged, which is fine for a blur. The file size depends on the format you save in.