Median Filter for Noise Reduction

Reduce digital noise (grain, outlier pixels) in a photo with a median filter applied to a small neighborhood window, while preserving edges better than a classic blur.

Example:
Drag and drop, or click to browse (25 MB max)

How It Works

The median filter replaces each pixel with the median value (not the mean) of the pixels in its immediate neighborhood, channel by channel. This approach effectively removes isolated outlier pixels (salt-and-pepper noise, digital grain) without over-smoothing the sharp edges of the image, unlike a classic Gaussian blur.

Why are large images resized before processing?

The median filter recalculates and sorts neighborhood values for each pixel, which is quite expensive computationally. To keep the tool smooth directly in the browser, images whose largest dimension exceeds 1400 pixels are automatically downscaled before processing.

What window size should I choose?

The 3×3 window keeps a maximum of detail while reducing fine noise, making it suitable for most photos. The 5×5 window is more aggressive: it removes more noise but can slightly soften fine textures and small details.

100% local processing: the filtering is done entirely in your browser in JavaScript — your photo is never sent to a server.