Portrait Background Blur
AI-powered bokeh effect. Blur backgrounds professionally while keeping subjects sharp.
What is Portrait Background Blur?
Portrait background blur, also known as bokeh effect, is a photography technique where the subject remains sharp and in focus while the background becomes beautifully blurred. This effect is normally achieved with expensive camera lenses that have wide apertures (like f/1.4 or f/1.8). Our AI-powered tool simulates this professional effect by using machine learning to separate the subject from the background, then applying Gaussian blur only to the background layer.
The bokeh effect helps isolate your subject, eliminate distracting backgrounds, and create depth in photos. It's widely used in professional portrait photography, product shots, and social media content to make subjects pop and create a more polished, professional look.
How It Works — 100% In Your Browser
This tool uses MediaPipe's image segmentation AI that runs entirely in your browser. The neural network downloads once (about 20MB) and is cached for future use. All processing happens on your device using WebGPU or WebAssembly — your photos never leave your computer.
The AI first segments the image to create a mask separating the subject from the background. Then the tool applies a multi-pass box blur (approximating Gaussian blur) only to the background pixels. The blur intensity slider controls how many passes are applied, from subtle (0-5) to extreme (20-30). Edge smoothing blends the transition between sharp subject and blurred background for natural results.
Blur Intensity Guide
0-5 (Subtle): Light background softening, keeps some background detail visible. Great for environmental portraits where context matters.
10-15 (Medium): Classic portrait bokeh. Background is noticeably blurred but colors and shapes are still recognizable. Best for most portraits.
20-30 (Strong): Extreme blur creates dreamy, artistic effect. Background becomes abstract shapes and colors. Perfect for dramatic portraits or product focus shots.
Use Cases
Profile Photos: Create professional headshots for LinkedIn, resumes, or business cards by blurring distracting backgrounds.
Social Media: Make your Instagram, Facebook, or Twitter photos stand out with professional-looking bokeh effects.
Product Photography: Focus attention on products by blurring busy backgrounds in product shots.
Portrait Enhancement: Turn smartphone photos into professional-looking portraits by simulating expensive camera bokeh.
Tips for Best Results
• Use photos with clear subjects (people, pets, products) for best segmentation
• Photos with good contrast between subject and background work best
• Start with medium blur (10-15) and adjust up or down to taste
• Increase edge smoothing (5-7) for natural transitions between sharp and blurred areas
• For portraits, position subject in front of detailed backgrounds for most dramatic effect
Technical Details
The blur algorithm uses a multi-pass box blur kernel which approximates a Gaussian blur when applied 3+ times. This is much faster than true Gaussian convolution while producing nearly identical visual results. The blur is applied only to masked background pixels, preserving full sharpness in the foreground subject. Edge smoothing uses alpha channel blending to create natural falloff between sharp and blurred regions.
Privacy & Performance
Your photos never leave your device. All AI processing happens locally in your browser with no uploads or tracking. The model runs on your hardware (GPU if available). Processing is instant after the initial model load. Modern laptops with GPUs process images in 1-2 seconds; older devices may take 3-5 seconds.