“Blur” sounds like one thing. Open any photo editor and you will find half a dozen kinds. Two matter most: Gaussian blur, the soft, even haze used everywhere in interfaces, and lens blur, the creamy out-of-focus look of a real camera. They feel completely different, and knowing why helps you pick the right one.
Gaussian blur
A Gaussian blur replaces each pixel with a weighted average of its neighbours. Nearby pixels count a lot; distant ones count a little. The weights follow a bell curve, the Gaussian distribution, named after the mathematician Carl Friedrich Gauss.
The result is perfectly smooth. Edges melt, detail dissolves, and bright and dark areas blend into gentle gradients. Nothing in the image keeps a shape.
- Looks like: frosted glass, fog, a steamed-up mirror.
- Controlled by: one number, the radius.
- Fast: it can be computed in two simple passes, one horizontal and one vertical, which is why computers and phones can do it in real time.
When CSS says blur(12px), in filter or backdrop-filter, this is the blur you get. Every frosted panel on this site is Gaussian.
Lens blur
Lens blur imitates what happens inside a camera. When something is out of focus, each point of light from it spreads into a small disc on the sensor, shaped like the lens aperture. Photographers call the quality of that out-of-focus area bokeh, from a Japanese word for blur or haze.
- Bright points become discs. A distant street lamp turns into a glowing circle, or a hexagon if the aperture blades are straight.
- Highlights stay bright. They do not fade into grey as they do with Gaussian blur.
- Edges of the blur are defined. The discs have a visible rim.
- It depends on depth. Things further from the focus plane blur more.
It looks like photography, because it is how lenses actually behave.
Side by side
| Gaussian | Lens | |
|---|---|---|
| Weighting | Bell curve, soft falloff | Even across a disc or polygon |
| Bright points | Fade into a soft glow | Become crisp discs |
| Character | Smooth, neutral, foggy | Photographic, sparkly |
| Speed | Very fast | Much slower |
| Real-time on the web | Yes, built into CSS | Not built in |
| Best for | Interfaces, backgrounds, privacy | Photos, portraits, cinematic scenes |
The rest of the family
- Box blur: a plain average of neighbours with equal weight. Fast but slightly blocky. Run three times, it closely approximates a Gaussian, a trick many graphics systems use.
- Motion blur: smears in one direction, suggesting speed.
- Radial and zoom blur: smears around or out from a point.
- Tilt-shift: a band of focus with blur above and below, making scenes look miniature.
- Surface or bilateral blur: smooths areas but keeps edges, used for skin retouching.
Why interfaces use Gaussian
- Speed. It must run sixty or more times a second as you scroll.
- Neutrality. A UI backdrop should recede. Sparkling bokeh discs would draw the eye away from the content.
- Even contrast. Gaussian blur flattens light and dark, giving text a calm surface. Lens blur preserves bright spots, which is the opposite of what you want behind words.
- Predictability. One number, one result, on every device.
The cost of all this real-time blurring is covered in blur effects and GPU performance.
When lens blur wins
- Portraits. A softly defocused background with round highlights flatters a subject.
- Product shots. Fairy lights or city lights behind a product turn into glowing orbs.
- Hero images. A photograph with natural bokeh already has a calm area for text.
- Faking depth. Phone “portrait mode” estimates distance and applies a lens-style blur, with brighter discs where there are lights.
Blur on video calls
Background blur in call apps is usually a Gaussian-style blur applied to everything the software decides is not you. Some apps offer a “portrait” option that mimics lens blur more closely. How well it works depends mostly on the cut-out, not the blur; see blur in video conferencing compared.
What “radius” really means
In CSS, the value in blur(12px) is the standard deviation of the bell curve, not a hard edge. The visible softening reaches roughly two to three times that distance. So a 12 pixel blur mixes in colour from 25 to 35 pixels away. That is why a modest number produces a strong effect, and why big values get expensive quickly. Image editors may define radius differently, so the same number will not match between apps.
Getting a bokeh feel on the web
CSS cannot do true lens blur, but you can suggest it:
- Start with a photo that already has real bokeh.
- Place a few soft, semi-transparent circles in the background and blur them lightly. Bright discs over a dark gradient read as out-of-focus lights. Our effect previews do exactly this.
- Use an SVG filter or canvas for a custom kernel if you need accuracy, accepting the performance cost.
Choosing quickly
- Behind text or controls: Gaussian.
- Hiding something for privacy: Gaussian, and plenty of it.
- Making a photo feel professional: lens.
- Suggesting speed: motion.
- Real-time, on a phone: Gaussian, small radius.
The short version
Gaussian blur is a smooth, even average: fast, neutral and perfect for interfaces. Lens blur spreads light into discs like a camera: slower, sparkly and perfect for photographs. Use the first to make things recede and the second to make them beautiful. Feel the Gaussian for yourself in the generator by dragging the Blur slider from 0 to 30.
FAQ
Gaussian blur averages pixels with a soft bell-curve falloff. Lens blur spreads each point into a disc, like an out-of-focus camera lens.
CSS blur() in filter and backdrop-filter is a Gaussian blur.
The look of the out-of-focus areas in a photo, especially the soft discs formed by points of light.