Field notes on AI image upscalingNot affiliated with Magnific or Freepik · Run by the team behind Upsampler
Upscaler Benchmagnificai.org
Home / Guides
Guide · editing

Change the background of a photo, with AI

Swapping a background used to mean a careful mask in Photoshop. Today you can describe the new scene in a sentence and an AI editor rebuilds the photo around your subject. It works well when you get three things right: a clean source, matching light, and checking the edges.

Updated 16 Nov 20267 min readWho runs this site
Disclosure. This site is run by the team behind Upsampler, which appears in the comparison below. It is not affiliated with Magnific or Freepik. We don’t publish made-up scores; every price and limit is copied from the vendor’s own page and dated. Full disclosure
Try it in the browser

A free AI photo editor that swaps backgrounds from a text prompt (our product) needs no sign-up and adds no watermark. Upload, describe the new background, download. The steps below work the same in any prompt-based editor.

Remove, replace or blur?

People search for “change background of photo” when they want one of three different results, and the right tool depends on which:

  • Remove the background: a cut-out on transparency or plain white. Right for marketplace listings, logos, stickers and anything you will composite yourself later.
  • Replace the background: the subject in a new place, with light and shadows that match. Right for portraits, profile pictures, product lifestyle shots and social posts.
  • Blur the background: same place, less distraction. Right when the location is fine but busy. Many phones and Windows Photos do this without any generative AI.

This guide focuses on replacing, because that is where AI editors save the most time, and covers removal and blur in the comparison further down.

Step by step: replace a background with an AI editor

  1. Start with a usable photo. The subject should be sharp, fully in frame and reasonably separated from the background. A person standing in front of a wall is easy; a person half-hidden behind a plant is not. Crop first so the subject sits where you want it in the final image.
  2. Upload and pick a model. You can upload the photo to a browser AI image editor. It offers two models: Qwen Image Edit 2509 Turbo Lightning, the default, usually finishes in under ten seconds and handles background swaps well; Flux 2 Klein 4B is a little slower, holds fine detail more tightly and is better when the new background also changes the light on the whole scene (sunset, neon, candlelight). It accepts PNG, JPG and WebP, with a small free daily allowance.
  3. Write one clear instruction. Name the new background, the light, and what must stay: “Replace the background with a sunlit beach at golden hour, light coming from the left, keep the person, face and clothing unchanged.”
  4. Check at 100%. Look at hair, ears, glasses, fingers, the outline of clothing, and where feet or a product meet the ground. Then compare with the original: did the face, logo or text change?
  5. Refine, don’t stack. If the result is close, rewrite the instruction more precisely and run it again. Do not add three more requests to the same sentence; one change at a time gives cleaner results.
  6. Finish once. Crop to the final shape, then enlarge the finished image once if you need more pixels for print or a large display. Free editors may return a resized image (the paid editor on the same site keeps full resolution and adds masking), so check the pixel size before you use it.

Prompts that work

GoalPrompt
Professional headshot“Replace the background with a softly blurred modern office, neutral grey and white tones, soft window light from the right, keep the face and clothing unchanged.”
Product lifestyle shot“Place the bottle on a light oak kitchen counter with a blurred tiled wall behind, soft morning light from the left, natural shadow under the bottle, label unchanged.”
Plain studio backdrop“Replace the background with a seamless light-grey studio backdrop and a soft floor shadow, subject unchanged.”
Travel photo“Replace the background with a mountain lake at sunset, warm light from behind the subject, keep the pose and face unchanged.”
Clean white“Replace the background with pure white, keep a faint shadow under the shoe, product unchanged.”

Vague prompts (“nicer background”, “make it pop”) leave the model guessing. Specific places, materials and light directions give it something to match.

Getting edges, light and shadows right

Light direction

The most common giveaway. If the sun in the new background is on the left but the face is lit from the right, the brain notices even when it cannot say why. Look at where the highlights are on your subject and ask for light from the same side. If the new scene needs very different light, use a model that can relight, or see our notes on AI relighting.

Contact shadows

People and products that float look pasted. Ask for “a soft natural shadow under the feet” or “a contact shadow under the product”. For white-background product shots, a faint shadow usually looks more professional than none.

Perspective and camera height

A photo taken from waist height placed in front of a scene shot from a drone looks wrong. Describe a background viewed from roughly the same height and distance (“street-level view”, “tabletop view”).

Hair, glass and fine edges

Prompt-based editors regenerate edges rather than cutting them, which avoids the hard halo of older tools, but fine hair can be simplified or slightly reshaped. Glasses, veils and transparent bottles should show the new background through them; check that they do. For hair-heavy portraits, the advice in faces and portraits applies here too.

Depth of field

A sharp subject photographed with a phone at f/1.8 sitting in front of an equally sharp landscape looks like a collage. Asking for a “softly blurred” background is often the single most effective realism fix.

Other ways to change a background

A browser AI editor is not always the best tool. Features and plans change, so check the vendor’s current details.

ToolRemovesReplacesAccountNotes
Upsampler free AI image editor (our product)Via promptYes, from a promptNoFast, no watermark, small daily allowance; image is processed on a server
iPhone / iPad (touch and hold the subject)YesNoNoLifts the subject out for pasting elsewhere; on-device
Samsung Galaxy AI, Google Pixel / Google Photos editorsYesPartlyDevice or Google accountVaries by phone model and region
Windows PhotosYesSolid colourNoBackground blur, remove and replace with a colour, on-device
Adobe PhotoshopYesYes (generative)SubscriptionRemove Background plus generative tools; precise masks and layers
CanvaYesWith templatesYesBackground remover is in paid plans
remove.bg, Photoroom, PixelcutYesTemplates / AI scenesUsuallyFocused on cut-outs and product photos; full-resolution downloads often need credits or a plan
GIMP, PhotopeaBy handBy handNoFree and exact, but you do the selection and compositing yourself

For confidential images (unreleased products, ID documents, children) prefer on-device tools: a web editor, ours included, uploads the image. For more on how browser editors compare with desktop software, see free AI image editors compared.

For product photos specifically

Marketplaces have rules. Amazon requires the main image on pure white (RGB 255, 255, 255); lifestyle backgrounds belong in the secondary images. Keep the product itself untouched: a prompt-based editor can subtly redraw a label or a logo, which is a problem on a listing. Check the text letter by letter, and if it changed, use a masked edit or a cut-out tool instead. The product photo guide covers marketplace sizes and when not to upscale.

Common mistakes

  • Mismatched light. The fastest way to make a swap look fake. Always state a light direction.
  • No shadow. Subjects without a contact shadow float.
  • Several changes in one prompt. “New background, brighter, add a hat, remove the bag” gives a compromise on all four.
  • Not saying what stays. Without “face unchanged” or “label unchanged”, the model may adjust them too.
  • Upscaling before editing. Edit at a normal size, then enlarge the finished image once. Compare versions blind with the A/B tool if you are unsure which is better.
  • Misleading edits. A changed background on a property listing, a used-car ad or an ID photo can mislead buyers or break rules. Keep edits honest where it matters.

FAQ

How do I change the background of a photo for free?

Upload the photo to a free AI image editor and describe the new background in one sentence, including the light direction and “keep the person unchanged”. Some browser editors need no account and add no watermark. On a phone, the built-in subject cut-out on iPhone, Samsung or Pixel removes the background, and Windows Photos can blur, remove or replace it.

What is the difference between removing and changing a background?

Removing gives you a cut-out on transparency or plain white, which you then place on something else yourself. Changing (replacing) generates a new background around the subject in one step, ideally with matching light and shadows.

Why does my new background look fake?

Usually the light does not match: the subject is lit from one side and the new scene from another, or there is no contact shadow under feet or products. Name the light direction in the prompt, ask for a soft shadow, and choose a background shot from a similar camera height.

Can AI handle hair and transparent objects?

Better than older cut-out tools, but fine hair, glass, veils and smoke are still the hardest cases. Check them at 100%. A prompt-based editor regenerates the edge, which often looks more natural than a hard mask, but it can also change strands of hair.

Will the editor change the person’s face?

It should not, but prompt-based editors rebuild the whole image. Say “keep the face and clothing unchanged” and compare with the original. If a face must stay pixel-identical, use an editor with a mask so only the background is regenerated.

What background do marketplaces require?

Amazon requires the main product image on a pure white background (RGB 255, 255, 255). Other marketplaces are looser. Check the current image rules of the marketplace before you shoot; see the product photo guide on this site.