FlipMyFormat

Dehaze: Cut Through Fog, Mist and Atmospheric Haze

Built on the dark channel prior, the observation that clear outdoor photos almost always contain something very dark in every small region. Where that darkness has been washed out, the haze is measured and removed.

Dark channel priorRobust atmosphere estimateLive before and afterBatch + ZIP downloadNever uploaded

Drop images here

or click to browse · or paste with Ctrl+V

JPG · PNG · WebP · GIF · BMP · AVIF

88%

Around 80 to 95 is the usual range. A full 100 leaves no atmosphere at all, which rarely looks right.

9 px

How large an area is assumed to sit at one depth. Small values track edges and produce outlines.

12%

Limits how hard the densest haze is pushed. Lower it for more recovery, raise it if distant areas turn noisy and garish.

+8

Dehazing often leaves a photo cooler than it started, because haze is usually blue. This puts some warmth back.

A large white or very bright object, such as a snowfield or a white wall filling much of the frame, looks like haze to this method and can throw the estimate off. That is a known limit of the technique, not a setting you can fix.

Presets

92

Your photos are never uploaded. The dark channel, the transmission map and the export all run inside this browser tab.

People also use

Everything this tool does

A real depth-aware correction

Haze is estimated per region from the dark channel and subtracted accordingly, so near objects are barely touched while distant ones are corrected heavily. That is why it looks like distance restored rather than contrast raised.

The atmosphere is averaged

Its colour comes from the haziest half a percent of the picture, averaged. Injecting eight blown pixels moved that estimate by 0.6 levels, where a brightest-pixel estimate jumped to pure white and changed the whole correction.

Patch minimum, not per pixel

Taking the minimum over a region keeps the transmission map smooth. Measured on a test photo, a per-pixel minimum produced 5.5 times as much local variation, which shows up as outlines around objects.

A transmission floor you control

The recovery divides by transmission, so the densest haze would otherwise be multiplied by an enormous factor. The floor caps that, and it is a slider because the right value depends on how clean your file is.

Warmth to put back what haze took

Atmospheric haze is usually blue, so removing it leaves a photo cooler than it started. A small warmth correction restores the balance without a second tool.

Drag to compare

Before and after share one frame with a slider, which is how you judge whether the distance has been recovered or merely exaggerated.

Six purpose-built presets

Standard, gentle, heavy fog, distant landscape, city smog and maximum recovery.

Batch with one ZIP

The estimate adapts to each photo individually, so one setting suits a whole set shot in the same conditions.

Transparency preserved

The alpha channel is untouched for PNG and WebP output.

The limits are documented

A large white or very bright object looks like haze to this method. That is stated plainly on this page rather than left for you to discover.

What each control does

Three of these four controls come straight out of the algorithm rather than being decorative. Strength is how much of the estimated haze to subtract, region size is the assumption about depth, and the noise guard limits how far the densest areas are pushed.

SettingWhat it doesTryWatch for
Strength 60-80gentle, keeps atmospherefloor 15-25Still looks hazy
Strength 85-95the usual working rangefloor 10-15Nothing much
Strength 100removes all estimated hazefloor 15+Airless, flat look
Region 3-6tracks fine detailclear photosOutlines around objects
Region 9-15assumes broad depth planesmost photosNothing much
Noise guard 5-10pushes distant haze hardlight hazeGarish, noisy distance
Noise guard 20-40holds the densest areas backheavy fogDistance stays misty

Dark

channel prior

0.5%

of pixels set the atmosphere

0

files uploaded

2

separable min passes

ZIP

batch download

Free

no account needed

FlipMyFormat vs other dehaze tools

CapabilityFlipMyFormatTypical free tool
Files stay in your browser
Real dark channel prior, not just contrast
Atmosphere averaged, not one bright pixel
Adjustable transmission floor
The method's limitations documented
Batch ZIP download without paying
No watermark on the output

How dehazing works and what it cannot do

Dehazing is not a contrast slider with a better name, and understanding why explains both what it can do and where it stops. Haze works by adding light: as you look further into the distance, more of what reaches the camera is scattered sunlight rather than light from the subject, so distant things get progressively washed toward a uniform bright grey. That means haze is a depth-dependent addition, and removing it properly requires estimating, for every part of the picture, how much of what you are seeing came from the subject and how much from the air. That estimate is what this tool builds, and it is why a dehazed photo looks like distance restored rather than like contrast cranked up: near objects are barely touched while distant ones are corrected heavily. The consequences for you are practical. First, the correction is strongest where there is most haze, so a photo with no depth in it will barely change no matter what you set. Second, haze does not just add light, it also destroys detail, and no correction can bring back contrast that never reached the sensor. What you get back is what survived, which is usually more than you expect but is never everything. Third, because distant areas are being multiplied up, whatever noise and compression artefacts they contained get multiplied too. That is what the noise guard is for, and if your distance comes back looking garish and speckled, that control is the answer rather than reducing the overall strength.

  1. 1

    Add a hazy photo

    Drag it in, click to browse, or paste with Ctrl+V. Distant landscapes, mountains and city views through smog are the natural subjects.

  2. 2

    Set the strength

    Around 85 to 95 suits most photos. If the distance turns noisy and garish, raise the noise guard rather than lowering the strength.

  3. 3

    Add warmth and export

    Haze is usually blue, so removing it leaves a photo cooler than it started. A little warmth puts that back.

Why a dark channel tells you where the haze is

Something dark in every small region

The insight behind this method is an observation about ordinary outdoor photographs: in almost any small patch of a clear image, at least one pixel has at least one colour channel that is very close to zero. Shadows between leaves, dark windows, textured surfaces, colourful objects with a weak channel. Take the minimum across the three channels and then the minimum across a small patch, and a clear photo gives you nearly black almost everywhere. Haze breaks that, because it adds light to every channel at once. So wherever this dark channel comes out bright, there is haze, and how bright tells you how much. That single measurement, per region, is what the correction is built on. Taking the minimum across a patch rather than per pixel matters: a per-pixel minimum follows every edge in the picture, so the amount of correction changes abruptly at object boundaries and you get outlines. We measured the local variation in the transmission estimate on a test photo; a per-pixel minimum gave 5.5 times as much variation as a nine pixel patch.

Two guards that stop it going wrong

The recovery divides by the estimated transmission, and division is where things break. In the densest haze the transmission approaches zero, so without a lower bound the correction multiplies those pixels by an enormous factor and the distance turns into wild saturated noise rather than recovered detail. A floor on the transmission caps that multiplication, and it is exposed here as the noise guard because the right value genuinely depends on how clean your source is. The second guard is on the atmosphere estimate. The colour of the haze is taken from the haziest half a percent of the picture and averaged, rather than from the single brightest pixel that most implementations use. We tested it by injecting eight blown pixels into a hazy image: the brightest-pixel estimate jumped straight to 255,255,255, changing the entire correction, while the averaged estimate moved by 0.6 levels.

What people use it for

Distant landscapes

Mountains and valleys lose contrast with distance, and this is the correction that puts it back layer by layer.

City views through smog

Urban haze washes out anything more than a few blocks away. A moderate correction restores the skyline.

Aerial and drone photography

Shooting through more atmosphere is exactly what a drone does, so almost every aerial shot benefits.

Underwater photos

Water scatters light in much the same way as air, so the same correction often works, though the colour cast needs separate attention.

Misty mornings

You can dial in how much mist to keep, which is often more useful than removing it entirely.

Property and real estate

Exterior shots taken on flat, hazy days come back looking like a clearer day.

Wildlife at long range

Long lenses shoot through a lot of air, and distant subjects lose contrast badly.

Old faded photographs

The mechanism is different but the symptom is similar, and a light correction often helps.

Six tips worth knowing

If the distance comes back noisy and garish, raise the noise guard rather than lowering the strength. It targets exactly the areas causing the problem.

Haze is usually blue, so a dehazed photo often ends up cool. Add a little warmth to bring it back.

Strength 100 removes all the estimated haze and usually looks airless. Around 85 to 95 keeps the picture believable.

A photo without depth in it will barely change. The correction is proportional to how much haze there is, and a flat subject has none.

Small region sizes track edges and produce outlines. Nine to fifteen pixels suits most photographs.

Dehaze before adding contrast or saturation. Doing it afterwards means fighting adjustments you have already made.

Troubleshooting

The distance is noisy and over-saturated

The correction is multiplying the haziest areas by a large factor, and whatever noise was there is multiplied too. Raise the noise guard.

There are outlines around objects

The region size is too small, so the correction changes abruptly at edges. Raise it to nine or more.

Nothing much happened

The photo may have little actual haze, or little depth. The correction is proportional to the haze it can measure, so a flat subject gives it nothing to do.

A snowy or white-walled photo came out wrong

That is a genuine limit of this method. A large bright object looks exactly like haze to a dark channel, so the estimate is thrown off. Lower the strength, or correct with levels instead.

Frequently asked questions

What is dehazing?

Haze adds scattered light in proportion to distance, so far away things wash out toward a uniform bright grey. Dehazing estimates how much of each part of the picture is that added light and subtracts it.

Is this just a contrast boost?

No. Contrast applies one curve to the whole picture. This estimates the haze separately for every region, so near objects are barely touched while distant ones are corrected heavily, which is what makes it look like distance restored.

What is the dark channel prior?

The observation that in almost any small patch of a clear outdoor photo, at least one pixel has at least one channel close to zero. Haze adds light to every channel, so wherever that darkest value comes out bright, there is haze.

Why take the minimum over a region rather than per pixel?

Because a per-pixel minimum follows every edge, so the correction changes abruptly at object boundaries and leaves outlines. On a test photo, per pixel produced 5.5 times as much local variation as a nine pixel patch.

What does the noise guard do?

It puts a floor under the estimated transmission. The recovery divides by transmission, so without a floor the densest haze is multiplied by an enormous factor and turns into saturated noise.

How is the haze colour decided?

It is averaged over the haziest half a percent of the picture rather than taken from the single brightest pixel. Injecting eight blown pixels moved our estimate by 0.6 levels; a brightest-pixel estimate jumped straight to pure white.

Why did my snowy photo come out wrong?

This is the method's real limitation. A large white or very bright object has a bright dark channel, exactly like haze, so the algorithm misreads it. There is no setting that fixes it; use levels instead on those photos.

Can it recover detail the haze destroyed?

No. Haze both adds light and destroys contrast, and only the added light can be subtracted. What comes back is what survived, which is usually more than expected but never everything.

Why does my photo look cold afterwards?

Atmospheric haze is usually blue, so removing it takes blue out and leaves the picture cooler. The warmth slider is there to put some back.

What strength should I use?

Around 85 to 95 for most photos. A full 100 removes all the estimated haze and usually reads as airless, because real distance does have some atmosphere in it.

Does it work on underwater photos?

Often, yes, because water scatters light in a similar way. The strong blue or green cast underwater needs correcting separately with white balance.

Nothing changed on my photo

The correction is proportional to the haze it can measure. A photo with little depth, or one taken on a clear day, gives it almost nothing to do.

Should I dehaze before or after other edits?

Before. Dehazing changes contrast substantially, so doing it after you have set contrast and saturation means adjusting everything twice.

Are my photos uploaded to a server?

No. The dark channel, the transmission map and the export all run in your browser using the canvas API. Nothing is sent anywhere.

Which format should I export?

Keep the original for photographs. Dehazing amplifies the distant parts of the frame including any JPEG blocks, so re-export at quality 90 or above.

Is transparency preserved?

Yes for PNG and WebP output. The alpha channel is untouched. JPG has no alpha, so transparent areas are filled with the background colour first.

Can I process a batch?

Yes. The estimate adapts to each photo individually, so one setting works across a set shot in the same conditions.

Does it add a watermark or need an account?

No to both. No sign-up, no email wall, no daily limit and no watermark on the output.