Clear up hazy, foggy or smoggy photos in seconds. The tool estimates how much haze sits in front of every part of the picture with the dark channel prior method and removes it, restoring contrast and color in distant hills, skylines and landscapes. Everything runs on your device, so your photos are never uploaded.
Last updated:
◂ ▸
OriginalDehazed
Removing haze…
nonemaximum
more contrastless noise
darkerbrighter
mutedvivid
Advertisement
Advertisement
How to use the Dehaze Image
Add a photo: drop a hazy or foggy picture on the box, choose it or paste it with Ctrl+V. A misty sample is shown until you do.
Set Dehaze strength. 70-90% looks natural for most landscapes; 100% removes nearly all haze but can look harsh.
Tune the finish: raise Protect distant areas if the sky gets noisy or blotchy, and use Brightness to lift the shadows that dehazing darkens.
Check the result by dragging across the photo, or open the Haze map tab to see how much haze each area had.
Download the cleaned-up photo as PNG (best quality) or JPG (smaller file).
The haze model and the dark channel prior
Haze, mist and smog scatter light, so a distant object reaches the camera mixed with a bright veil of scattered sky light. Image scientists describe this with the atmospheric scattering model:
I(x) = J(x) · t(x) + A · (1 − t(x))
I is the hazy photo you have, J the clear scene you want back.
A is the atmospheric light, the color of the haze itself (usually a light gray, blue-gray or yellowish tone). The swatch below the settings shows the estimate for your photo.
t is the transmission, the share of light from the scene that survives: close to 1 for nearby objects, falling toward 0 with distance (t = e−βd for depth d and haze density β).
The dark channel prior (He, Sun and Tang, 2009) observes that in haze-free outdoor images, most local patches contain some pixels that are almost black in at least one color channel. This tool computes that dark channel, min over a patch of min(R/A, G/A, B/A), uses it to estimate t = 1 − ω · dark channel, smooths the estimate along the edges of your photo with a guided filter, and finally solves J = (I − A) / max(t, t0) + A for every pixel.
Settings guide
Photo
Strength
Protect distant areas
Patch
Light haze over hills or a city skyline
70-85%
0.10
Standard
Morning mist in a valley
85-95%
0.10-0.15
Standard
Thick fog, large flat areas
90-100%
0.15-0.25
Large
Smog or wildfire smoke tint
75-90%
0.12
Standard
Big bright sky in the frame
60-80%
0.20-0.35
Large
Detailed scene (branches, wires)
80-90%
0.10
Fine
Tips for the best result
Start from the highest quality file you have. Dehazing raises contrast in distant areas, which also makes JPEG artifacts and sensor noise more visible; clean them first with the Image Denoiser if needed.
Keep a little haze. Aerial perspective is how the eye judges distance, so 100% removal can make a landscape look flat or artificial.
Use the Haze map tab to check the estimate: distant hills should look lighter (more haze) than the foreground.
It uses the dark channel prior: in clear outdoor photos, almost every small patch has at least one pixel that is very dark in one color channel (shadows, dark leaves, saturated colors). Haze adds a bright, grayish veil that lifts those dark pixels. By measuring how bright the darkest values in each patch are, the tool estimates how much haze is in front of that area, then inverts the haze model I = J·t + A·(1 − t) to recover the clear scene J.
What do the strength and protect distant areas settings do?
Strength (often called omega) is the fraction of the estimated haze that gets removed; leaving a little haze keeps the sense of depth. Protect distant areas sets the minimum transmission t0. Dividing by a very small transmission amplifies noise and JPEG blocks in far-away regions and skies, so a higher value keeps those areas smoother at the cost of slightly less clearing.
Why does the sky look dark or blotchy after dehazing?
Bright, smooth skies break the dark channel prior because they have no dark pixels, so the method thinks they are very hazy and pushes them too hard. Raise Protect distant areas to 0.2-0.3, lower the strength a little, or try the Large haze detection patch. You can also replace a dull sky afterwards with the Sky Replacement tool.
Does dehazing work on fog, smoke and underwater photos?
It works best on haze, mist, light fog and smog in outdoor scenes where distance varies. Thick fog that hides objects completely cannot be undone because the detail is not in the photo. Smoke usually responds well. Underwater photos have a different, color-dependent haze; the tool can help a little, but a dedicated color correction usually works better.
Why is my dehazed photo darker?
Removing the bright haze veil lowers the overall brightness, which is physically correct but can make shadows look heavy. The Brightness slider applies a gentle gamma curve that lifts shadows and midtones without clipping highlights; it starts at +10 for that reason.
Is my photo uploaded anywhere?
No. The whole algorithm, including the minimum filters and guided filter, runs in JavaScript inside your browser. The image never leaves your device and the tool keeps working offline once the page is loaded.
What size photos can I dehaze?
The default output is up to 1600 px on the long side, which processes in about a second on most devices. Large (2600 px) and Original (up to 4000 px) keep more detail but need more memory and time, especially on phones.
Are all the tools on FreeToolCabin tested for quality and accuracy?
Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.