Home › Image Tools › Dehaze Image

Dehaze Image

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:

nonemaximum
more contrastless noise
darkerbrighter
mutedvivid
Advertisement
Advertisement

How to use the Dehaze Image

  1. 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.
  2. Set Dehaze strength. 70-90% looks natural for most landscapes; 100% removes nearly all haze but can look harsh.
  3. Tune the finish: raise Protect distant areas if the sky gets noisy or blotchy, and use Brightness to lift the shadows that dehazing darkens.
  4. Check the result by dragging across the photo, or open the Haze map tab to see how much haze each area had.
  5. 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

PhotoStrengthProtect distant areasPatch
Light haze over hills or a city skyline70-85%0.10Standard
Morning mist in a valley85-95%0.10-0.15Standard
Thick fog, large flat areas90-100%0.15-0.25Large
Smog or wildfire smoke tint75-90%0.12Standard
Big bright sky in the frame60-80%0.20-0.35Large
Detailed scene (branches, wires)80-90%0.10Fine

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.
  • Finish with a touch of sharpening in the Sharpen Image tool, or swap a washed-out sky with Sky Replacement.

Frequently asked questions

How does this dehaze tool work?

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.

Related tools

Photo EnhancerOne-click auto enhance: fix exposure, contrast, color cast and sharpness, one photo or a batch.Sky ReplacementReplace a dull sky with blue, sunset or starry skies using AI sky detection. Private, in-browser.Image Noise RemoverRemove grain and color noise from photos with median, bilateral or non-local means filters.Image SharpenerSharpen soft or slightly blurry photos with a real unsharp mask and before/after view.Background RemoverRemove image backgrounds automatically with AI.Remove Object from PhotoBrush over unwanted objects, people or text and fill the area with matching background.Make Image TransparentRemove a white or solid-color background and save a transparent PNG, right in your browser.Photo to CartoonTurn photos into cartoons with smooth colors and bold outlines. Free, private, no upload.Add Watermark to PhotoAdd a text or logo watermark to one or many photos at once.Blur Image & Face Pixelate ToolBlur or pixelate faces, plates and backgrounds in a photo.Pixelate Image & Pixel Art ConverterTurn any picture into pixel art with retro palettes and dithering.Add Text to ImageAdd styled text layers with outline and shadow to any photo, then downloadRound Corners ImageGive any picture rounded, circle or squircle corners and save a transparent PNG.Grayscale Image ConverterTurn color photos into black and white with luma, luminance or average methods and sepia.Photo FiltersApply 27 one-click photo filters like Vintage, Noir and Teal & Orange with an intensity slider.Photo EditorEdit photos online: brightness, contrast, saturation, crop, rotate, flip and filters with undo.Invert Image ColorsTurn any picture into a color negative, with R/G/B channel toggles and an intensity slider.Screenshot BeautifierPut screenshots on gradient backgrounds with padding, rounded corners, shadow and a browser frame.Image Metadata ViewerSee a photo's EXIF data: camera, lens, exposure, date and GPS location, then strip it in one click.EXIF RemoverRemove EXIF, GPS location and other metadata from JPG, PNG and WEBP photos.Online PaintDraw and paint in your browser: brushes, shapes, fill bucket, text, undo and PNG export.Photo to SketchTurn any photo into a pencil, charcoal or color sketch in your browser and download it.GIF Frame ExtractorSplit an animated GIF into PNG frames with delays, a sprite sheet and ZIP download.Photo Frame MakerPut photos in polaroid, film strip, gallery, rounded or shadow frames with a caption.Duotone GeneratorTurn any photo into a bold two-color duotone image with presets, custom colors and intensity.Glitch Image EffectAdd RGB split, scanlines, slice shifts and noise to a photo for a digital glitch look.Add Date Stamp to PhotoStamp the EXIF or a custom date on photos in a retro orange camera font. Batch and ZIP download.Add Drop Shadow to ImageAdd a drop, long or reflection shadow to PNGs and photos and save a transparent PNG.Add Text to GIFPut captions on animated GIFs with outline, position and frame range, then download.Blend Two ImagesOverlay two photos with opacity, 16 blend modes, fades and free positioning, then download.Blur Photo BackgroundBlur the background of any photo for a portrait-mode look. AI subject detection, no upload.Brick Mosaic GeneratorTurn a photo into a toy-brick stud mosaic with a parts list and printable build guide PDF.Online Document ScannerTurn photos of paper into clean scans: auto edge detection, perspective fix, multi-page PDF.Add Film Grain to PhotoAdd realistic analog film grain, light leaks, fade and vignette to any photo, then download.GIF Speed ChangerSpeed up or slow down an animated GIF, or set each frame's delay, without losing quality.Halftone GeneratorTurn images into mono or CMYK halftone dots and lines; export PNG or SVG.Image Dithering ToolDither photos with Floyd-Steinberg, Atkinson or Bayer in 1-bit, Game Boy, CGA and retro palettes.Perspective CorrectionDrag 4 corners to straighten skewed photos of signs, screens and whiteboards, then download.Colorize Black and White PhotoAdd natural color to old black and white photos with AI that runs in your browser. No upload.Draw on ImageAnnotate photos and screenshots with arrows, boxes, text, highlighter and numbered steps.Photo to AnimeTurn selfies and landscapes into anime-style art with AI in your browser. Free, no upload.Face Shape DetectorUpload a selfie to find your face shape on-device, with hairstyle and glasses tips.Add Background to Transparent PNGFill the transparent areas of a PNG with a color, gradient or photo, plus padding and shadow.Add Stickers to PhotoPut emoji and cute stickers on your photos; scale, rotate, flip and layer them, then save PNG.Color Splash EffectKeep one color, or a brushed area, in color and turn the rest of the photo black and white.Old Photo Face RestorerRestore blurry and damaged faces in old photos with AI (GFPGAN) in your browser. Free, no upload.Image Opacity ChangerMake an image semi-transparent with an opacity slider or fade, and save a transparent PNG.Photo to WatercolorTurn a photo into a watercolor painting with soft washes, color bleed, wet edges and paper texture.Product Photo White BackgroundRemove the background and center products on pure white at 2000 x 2000 for marketplaces. Batch.Redact ImageBlack out or pixelate private info in screenshots; burned in, metadata stripped, PNG download.Rubber Stamp MakerDesign round or rectangular stamps with curved text, borders, stars and grunge ink; PNG or SVG.Signature Background RemoverTurn a signature photo or scan into a clean transparent PNG: threshold, ink color, auto-crop.Skin SmoothingSmooth skin in portraits with face-aware retouching that keeps eyes, lips and skin texture sharp.Straighten ImageFix a tilted photo: rotate by any angle with a grid, auto-crop the corners or level the horizon.AI Style TransferRepaint your photo in the style of any painting or pattern with AI, right in your browser.SVG EditorEdit SVG files visually: move shapes, change colors, text and strokes, add shapes, edit the code.Symmetry Drawing ToolDraw mandalas and kaleidoscope art with radial and mirror symmetry, glow brushes and PNG export.Virtual Background MakerDesign 1920×1080 video call backgrounds with your name, title, logo, blur and branded templates.EXIF EditorEdit photo EXIF and IPTC: date taken, camera, GPS location, copyright and caption, in batch.Face Symmetry TestUpload a face photo to see left-left and right-right mirror composites and a symmetry score.Sports Tactics BoardDraw plays on basketball, soccer, football and hockey diagrams with players, arrows and animated frames.Add Outline to PNGAdd a stroke outline around transparent PNG cutouts: width, color, softness and double borders.HDR Photo EffectGive any single photo an HDR look with local tone mapping, detail boost and a strength slider.Low Light Photo EnhancerBrighten dark and night photos with an adaptive tone curve plus noise reduction.Photo StackingStack photos online: star trails (lighten), noise reduction (mean) and remove passers-by (median).Photo Mosaic MakerBuild a big picture out of many small photos by color matching, then export a high-res PNG.Photo to Oil PaintingTurn a photo into an oil painting with brush size, detail, impasto and canvas texture.Red Eye RemoverClick on red eyes to fix them automatically: adjustable threshold, undo, download the photo.
See all 69 Photo Effects & Editing →