Blur Background of a Photo

Blurs the background of a photo and keeps the subject sharp, the way a portrait lens does. The blur strength scales with the image, at 1.5 percent of its longest side, and the subject is cut out before blurring so no colour halo forms around it. Runs on your device, nothing is uploaded. One image at a time.

Last updated

Background
Blur
One image at a time

How to blur the background of a photo

01

Load a single photograph

This works best on images that have a real background worth keeping: an environment, a room, a street. A subject already shot against a plain wall gains very little from blurring it.

Tip: Some depth in the original scene sells the effect. A flat backdrop blurred still looks like a flat backdrop.
02

Let the model find the subject

The network runs locally and separates subject from background. The first run of a session downloads the weights, after which the browser cache handles it.

Tip: Subjects with a clear outline give the cleanest separation. Overlapping people or objects are harder.
03

Process and download

The background is blurred, the sharp subject is composited over it, and the finished image comes back as a PNG in your download.

Tip: Look closely at the boundary. Blur exaggerates a bad mask far more than a flat colour fill does.

What this background blur does

Context is preserved

Unlike a cut-out, the setting stays in the picture. The image still reads as a photograph taken somewhere real, just with attention pushed firmly onto the subject.

Subject stays genuinely sharp

Only the masked background is blurred. The subject is composited back at full detail rather than being softened along with everything else, which is what separates this from a global blur.

Local segmentation and compositing

Both the model and the blur run in your browser using canvas filters. Your photograph is never transmitted and the tool keeps working with no network connection once the model is cached.

One image per run

The engine allows exactly one segmentation at a time. Concurrent runs exhaust the memory a browser tab is allowed, and on phones they fail outright rather than merely slowing down.

Blur that scales with the photo

The radius is 1.5 percent of the image's longest side, kept between 6 and 64 pixels. A fixed radius was invisible on a 4000 pixel photo and heavy-handed on a 400 pixel one; a proportional one looks the same at both.

No coloured halo around the subject

The subject is removed from the background before the blur runs, so the blur cannot drag the subject's colour outward. An earlier version blurred the whole frame and a red mug came back wearing a faint red ring; this is what fixed it.

Frequently Asked Questions

How is this different from blurring the whole image?+
A global blur softens the subject too, which just looks like a mistake. Here the subject is masked out, only the background is blurred, and the sharp subject is composited back over it. The contrast between the two is the entire effect.
Is this the same as portrait mode on a phone?+
Similar in intent, different in method. A phone often has depth information from a second camera or a dedicated sensor. This works from the single image alone using segmentation, which is why it depends on the subject having a recognisable outline.
Why can I only process one image at a time?+
The segmentation model holds large intermediate tensors in memory alongside tens of megabytes of weights. Running two concurrently reliably exhausts what a browser tab can allocate, so the engine enforces a single slot.

The model stays cached between runs, so processing a series one after another is only slow for the first image.

Can I change the blur strength?+
Not currently. The strength is set from the image itself, at 1.5 percent of its longest side, so a 4000 pixel photo gets a 60 pixel blur and a 1000 pixel one gets 15. That keeps the effect looking the same whatever resolution you start from.
Why does the edge look wrong on my image?+
Blur is unforgiving of an imperfect mask, because a sharp fragment of background left inside the subject outline sits against a soft field and stands out immediately. Busy backgrounds and fine hair are the usual causes.
Does my photograph leave my device?+
No. Segmentation, blurring and compositing all happen in your browser. Nothing is uploaded, nothing is logged, and no copy exists anywhere but your own machine.

Format Comparison

Feature Specificationbackground blurAlternative
What happens to the backgroundBlurred, still recognisableRemoved entirely
Subject sharpnessFull detail, composited lastFull detail
Sense of placePreservedLost
Tolerance for mask errorsLow, errors are visibleModerate
Output file sizeLarger, the background is still thereSmaller, most pixels are transparent

Technical Overview & Specifications

Deep dive into background blur architecture and processing.

Show Details

Platform Overview

A blurred background does something a removed one cannot: it keeps the context. You can still tell the photograph was taken in a kitchen or on a street, the colours behind the subject still relate to the colours in front, and the result reads as a photograph rather than a cut-out pasted onto a card. Optically this is what a wide aperture gives you, and it is the single most recognisable difference between a picture taken on a proper lens and one taken on a phone. Doing it after the fact means separating the subject from the background and blurring only what is behind, which is exactly the same segmentation problem the other background tools solve.

The model here is ISNet, the same network used for transparent cut-outs, running in WebAssembly on your own device. It produces a per-pixel mask, the subject is cut out of a copy of the frame so the blur can only ever see background, that background is blurred by about one and a half percent of the image's longest side, and the sharp subject is composited back over the top. Nothing is uploaded and nothing is stored. As with every background tool on this site, exactly one image is processed at a time, because the network needs a large and contiguous chunk of memory to run and competing for it is how you get a tab killed halfway through.

Masking, blurring and recombining

The pipeline runs in three stages. First ISNet produces a per-pixel confidence mask separating subject from background, the same output the transparent and solid colour tools use. Then a copy of the frame has the subject punched out of it using that mask, leaving a plate that holds only background, and the plate is blurred through the canvas filter property, which delegates to the browser's own optimised implementation rather than convolving pixels by hand in JavaScript. Finally the masked subject is drawn over the blurred copy at full sharpness. Because the mask carries partial confidence rather than a hard boundary, the transition between sharp subject and soft background is itself gradual, which is what stops the composite looking like a sticker.

The order matters, and it took two attempts to get right. Blurring the whole frame and drawing the sharp subject on top looks correct at a glance, but by then the blur has already sampled the subject and dragged its colour into the background around it: a red mug came back wearing a red halo. Punching the subject out first means the blur can only sample background. That leaves a transparent hole, and the blur pulls the transparency outward into a see-through ring, so the blurred plate is drawn four times over to make that ring opaque again before the subject goes on top. Where the browser offers no canvas filter, as on some Safari versions, the blur is approximated by shrinking the plate and scaling it back up rather than being quietly skipped. As with the other background tools, every segmentation call passes through a single concurrency slot, so a second image waits for the first to finish rather than allocating memory beside it.