Home › Image Tools › Sky Replacement

Sky Replacement

Turn a gray, washed-out sky into a clear blue day, a golden sunset or a starry night. A sky segmentation model finds the sky, a guided filter fits the edge to trees and rooftops, and color harmonization shifts the light in the rest of the photo so the new sky looks like it belongs. Everything runs on your device.

Last updated:

New sky
offstrong
top of skyhorizon
less skymore sky
crispsoft
Use your own ONNX model

Load a sky or binary segmentation model (.onnx) from your computer. It must take one RGB image (NCHW, ImageNet normalization) and return one channel where high values mean sky.

Advertisement
Advertisement

How to use the Sky Replacement

  1. Add a photo with a dull or blown-out sky: drop it on the box, choose it or paste it with Ctrl+V. A sample lakeside photo is shown until you do.
  2. Click Detect sky with AI for the cleanest result. The first time, the model downloads once and is cached; Quick detection gives an instant result meanwhile.
  3. Pick a new sky from the presets or choose your own sky photo, then move it with Sky position and flip it if the light comes from the wrong side.
  4. Blend it in: set Color harmonization so the landscape takes on the new light, and fine-tune Mask adjust and Edge softness (check the Sky mask tab).
  5. Download the finished photo as PNG or JPG.

How the new sky is blended in

Every output pixel is a mix of the new sky and your original photo, weighted by the sky mask m (0 = foreground, 1 = sky):

output = m × new sky + (1 − m) × harmonized foreground

  • Mask: the AI model (or Quick detection) produces a low-resolution sky probability. It is upscaled and passed through a guided filter, which uses the brightness of your photo as a guide so the mask edge snaps to real edges such as rooflines and tree crowns.
  • Mask adjust and Edge softness turn that probability into the final weight with a smooth step: Mask adjust moves the threshold (more or less sky), softness sets how wide the transition is.
  • Harmonization: the tool measures the average color of the old sky and of the new sky behind it, then multiplies the foreground's red, green and blue by matching gains (limited to a safe range) and nudges its exposure, so warm skies warm the scene and night skies darken it.

Choosing a sky that looks real

Your photoGood sky choiceHarmonizationTip
Midday, hard shadowsClear blue or fluffy clouds30-50%Keep the sun on the same side as the shadows (use Flip)
Overcast, soft lightFluffy clouds or storm50-70%A dramatic storm sky suits flat light better than bright sun
Late afternoon, long shadowsGolden sunset or pink dusk60-80%Move Sky position toward Horizon so the glow sits behind the scene
Dusk or blue hourPink dusk or starry night70-100%Night skies need strong harmonization to darken the foreground
Real estate exteriorClear blue or light clouds30-50%Subtle beats dramatic for listings

Tips for clean edges

  • Use the Sky mask tab: blue shows what will be replaced. Look closely at tree crowns, wires and the horizon.
  • If a hazy horizon is left out, move Mask adjust toward More sky by 5-10. If bright walls or water are replaced by mistake, move it toward Less sky.
  • Water reflects the sky. After a big change (gray to sunset), a lake can look wrong; crop it out with the Image Cropper or pick a sky closer to the original.
  • For hazy landscapes, run Dehaze Image first so the hills have contrast before the new sky goes in.

Frequently asked questions

How does AI sky replacement work?

A segmentation neural network looks at a 320 × 320 version of your photo and outputs, for every pixel, how likely it is to be sky. That rough mask is scaled up and refined with a guided filter that follows the edges in your full-size photo, so branches and rooftops stay sharp. The new sky is then blended in through the mask, and the foreground is color-matched to it.

What does color harmonization do?

A sunset sky over a scene lit by gray midday light looks fake. Harmonization compares the average color and brightness of the old sky with the new one, then shifts the white balance and exposure of the foreground in the same direction, plus a light tint of the sky color. At 0% the foreground is untouched; around 50-70% looks natural for most photos.

Is my photo uploaded to a server?

No. The sky model is downloaded to your browser and runs on your own device with ONNX Runtime Web (WebAssembly). Quick detection and all blending are plain JavaScript. Your photo never leaves your computer or phone.

What is the difference between AI detection and Quick detection?

Quick detection is a classic image-processing method: it looks for bright, smooth, sky-colored areas connected to the top edge of the photo. It is instant and works offline, but it can miss skies behind leaves or include white walls. The AI model has learned what skies look like, so it handles complex skylines, hazy horizons and tree gaps much better.

Why are there halos or leftover old sky around trees?

Fine branches are smaller than the model's mask resolution. Move Mask adjust toward More sky to replace more of the bright gaps, lower Edge softness for a crisper cut, or raise it to hide a visible seam. Very detailed trees against a white sky are the hardest case for any sky replacement tool.

Can I use my own sky photo?

Yes. Click Choose your own sky photo and pick any image of sky; it is scaled to cover the sky area and you can move it with Sky position. Shots taken with the camera pointed slightly upward and with the horizon at the bottom work best. Use your own photos or images you have the rights to.

Is it okay to replace the sky in real estate or travel photos?

Sky replacement is common in real estate and travel photography to show a property on a nicer day. Many listing platforms allow it as long as the property itself is not misrepresented; check your local rules, and do not use edited skies in photos meant as documentation or evidence.

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

Dehaze ImageRemove haze, fog and smog from photos with the dark channel prior. Free, private, in your browser.Background RemoverRemove image backgrounds automatically with AI.Photo EnhancerOne-click auto enhance: fix exposure, contrast, color cast and sharpness, one photo or a batch.Blur Photo BackgroundBlur the background of any photo for a portrait-mode look. AI subject detection, no upload.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.Image to Text (OCR)Extract text from images, screenshots and photos with OCR in 25+ languages, right in your browser.Photo to CartoonTurn photos into cartoons with smooth colors and bold outlines. Free, private, no upload.PSD to PNGConvert Photoshop PSD files to PNG and export every layer as its own PNG, no Photoshop needed.Image CompressorShrink images to a target size like 100 KB.Image ResizerResize images to any size without losing quality.Compress Image to 20KBShrink any photo to under 20KB (or any target size).Compress Image to 100KBShrink any photo to under 100KB automatically, with the best quality that fits.Compress JPEG to 50KBShrink photos to under 50KB for forms, passports and exams.HEIC to JPGConvert iPhone HEIC photos to JPG.WEBP to JPGConvert WEBP images to JPG in bulk.PNG to JPGBatch convert PNG images to JPG with a background color.JPG to PNGBatch convert JPG images to PNG.Image CropperCrop images, including circle crops for profile pictures.Rotate & Flip ImageRotate images by any angle or mirror them, one or many at once.Meme GeneratorMake memes with classic templates and custom text.Collage MakerCombine photos into a grid collage.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.Logo MakerDesign a text logo with fonts, icons and colors, then save SVG or PNG.Certificate MakerDesign certificates from templates and export one or many as PDF.WEBP to PNGConvert WEBP images to PNG, keeping transparency.SVG to PNGConvert SVG graphics to PNG or JPEG at any scale.PNG to ICOCreate multi-size favicon .ico files from PNG.GIF MakerTurn videos and images into GIFs, trim and compress.Business Card MakerDesign business cards and download a print-ready PDF.Flyer MakerDesign printable and social media flyers from free templates.Poster MakerDesign posters in A0–A5 and US sizes and download a print-ready PDF.Invitation Card MakerCreate printable birthday, wedding and party invitations for free.Color Palette GeneratorGenerate beautiful color palettes and export them.HEX to RGBConvert HEX colors to RGB and other formats.RGB to HEXConvert RGB to HEX with sliders, live swatch and one-click copy.Add Text to ImageAdd styled text layers with outline and shadow to any photo, then downloadThumbnail MakerDesign 1280×720 YouTube thumbnails with templates, bold text and stickersImage Color PickerPick any pixel colour from an image and get HEX, RGB, HSL plus a paletteImage Border AdderAdd a border, rounded corners, matte and shadow to a photo onlineWallpaper GeneratorCreate gradient and pattern wallpapers sized for any phone, tablet or desktopColor Shades GeneratorTurn one HEX color into a 50-950 scale plus tints, shades and tones, ready to export.Round Corners ImageGive any picture rounded, circle or squircle corners and save a transparent PNG.Printable Calendar MakerMake a printable month or year calendar with holidays, then print or save PDF.YouTube Thumbnail GrabberPaste a YouTube link to get every thumbnail size, from HD 1280x720 down to 120x90.Tailwind Color GeneratorTurn one color into a full Tailwind 50–950 shade scale and export the config or CSS.Printable Planner GeneratorDesign daily or weekly planner pages with your dates and colors, then print them as a PDF.CSS Gradient GeneratorDesign linear, radial and conic CSS gradients with draggable stops and export CSS or PNG.Grayscale Image ConverterTurn color photos into black and white with luma, luminance or average methods and sepia.Graph Paper GeneratorMake printable square, dot, isometric or hex graph paper and download it as PDF, PNG or SVG.Color MixerMix two colors in sRGB, linear, OKLab or OKLCH, or blend them with Photoshop-style modes.Photo FiltersApply 27 one-click photo filters like Vintage, Noir and Teal & Orange with an intensity slider.Lined Paper GeneratorCreate printable lined paper: wide, college or handwriting ruling, Cornell notes, PDF or PNG.Random Color GeneratorGenerate random HEX colors one at a time or in batches, with hue, saturation and lightness ranges.Photo EditorEdit photos online: brightness, contrast, saturation, crop, rotate, flip and filters with undo.Chart MakerMake bar, line, area, pie and doughnut charts from a simple table and download PNG or SVG.Color WheelFind complementary, triadic, analogous and other color harmonies on an interactive wheel.Image SharpenerSharpen soft or slightly blurry photos with a real unsharp mask and before/after view.Venn Diagram MakerMake 2- or 3-circle Venn diagrams from lists; overlaps are found for you. Export PNG or SVG.Invert Image ColorsTurn any picture into a color negative, with R/G/B channel toggles and an intensity slider.Mind Map MakerBuild mind maps fast with keyboard shortcuts and auto layout, then export PNG, SVG or JSON.Image SplitterSplit an image into a rows × columns grid of tiles and download them one by one or as a ZIP.Org Chart MakerType an indented list of names and titles and get a clean org chart to download as PNG or SVG.Image CombinerCombine images side by side, stacked or in a grid, with spacing, background color and alignment.Timeline MakerCreate horizontal or vertical timelines from dated events with colors, then save PNG or SVG.Screenshot BeautifierPut screenshots on gradient backgrounds with padding, rounded corners, shadow and a browser frame.
See all 368 Image Tools →