Prompt to Change or Remove a Photo Background
A copy-paste prompt that changes, blurs, or removes the background of any photo with AI — with clean cutout edges, lighting that matches the new scene, and your subject left exactly as it was.
Copy-ready prompt
Edit the attached photo. Change only the background — leave the subject completely untouched. Keep the subject's exact pose, proportions, colors, skin, hair and edges pixel-for-pixel. New background: [solid white studio / soft blurred office / beach at golden hour / plain #f5f5f5 / remove entirely to transparent PNG]. Cutout quality: - Trace a clean, precise edge around the subject, including individual strands of hair and fine details. - No halo, no leftover fringe from the old background, no cut-off limbs. Make it look real: - Match the new background's lighting direction, color temperature and intensity to the subject. - Add a soft, natural contact shadow beneath the subject consistent with that light. - Match perspective and horizon so the subject sits believably in the scene, not pasted on. Output: photorealistic, high resolution, same framing and aspect ratio as the original. If the new background needs a light direction I haven't specified, ask me before editing.
Want a version tailored to you?
Answer a few quick questions and the AI Photo & Headshot Generator builds a custom prompt from your exact details.
📷 Open the AI Photo & Headshot GeneratorWhy background swaps look fake — and how to fix it
Removing or replacing a background is one of the most requested photo edits, and one of the easiest to get wrong. The two failure modes are almost always the same. First, the cutout: the edge around the subject is rough, hair turns into a solid blob, or a thin colored fringe from the original background survives and glows around the person. Second, the composite: the cutout is clean, but the subject clearly does not belong in the new scene because the lighting, shadows or perspective don't agree. Your eye catches the mismatch instantly even if you can't name it.
The prompt above tackles both. It asks for a precise edge that follows individual hair strands and explicitly forbids halos and leftover fringe, which handles the cutout. Then it asks the model to match the new background's light direction, color temperature and intensity, and to add a soft contact shadow beneath the subject — the single detail that most often sells a composite. Finally it protects the subject: change only the background, keep the person pixel-for-pixel. Without that lock, many models will subtly reshape or retouch the subject while they replace what's behind them.
Solid colors, blurred scenes, and full backgrounds
Different jobs call for different backgrounds. A solid color — pure white, light grey, or a specific hex value — is the cleanest option and the standard for e-commerce, ID photos and profile pictures; state the exact color so the model doesn't drift to off-white. A blurred scene, like a softly out-of-focus office or park, keeps context while pushing all attention onto the subject; this is the natural "portrait mode" look and works well when a stark color would feel cold. A full replacement scene — a beach, a city street, a studio set — is the most demanding, because now lighting and perspective have to match convincingly. The more literal the new environment, the harder the model must work to make the subject sit in it, so those requests benefit most from the light-matching and shadow instructions.
Removing the background entirely to a transparent PNG is its own case. Ask for transparency explicitly and confirm the output format supports it, since a flattened JPEG will silently fill transparency with white.
Product photos and e-commerce white backgrounds
For product listings the bar is specific: marketplaces like Amazon expect a pure white (#FFFFFF) background, the product centered, no shadow that looks dirty, and no reflections from the old setting. Ask for a clean cutout, a true-white fill, and a subtle, even shadow only if the platform allows it — some require no shadow at all. Keep the product's real colors and finish; a common mistake is letting the model "polish" a product until its actual color shifts, which misleads buyers. For a set of products that need to match, describe one reference setup — same white, same framing, same soft top light — and reuse it so every image in the catalog looks consistent.
Whatever the target, the source matters. A subject shot against a busy, low-contrast background is harder to separate cleanly than one shot against a plain wall. If your first result has a rough edge, don't regenerate blindly — say "refine the edge around the hair, remove the fringe on the left shoulder" and let the model correct just that region.
Why this prompt works
Background swaps fail in predictable ways: a jagged or haloed cutout around the hair, a subject that looks pasted because the light comes from the wrong side, or an AI that "helpfully" retouches the person while it works. This prompt separates the two jobs — a clean edge and a believable composite — and locks the subject so nothing about the person changes. By naming hair strands, contact shadows, matched color temperature and perspective explicitly, you get the details that make a swap read as a real photo instead of a sticker dropped on a stock image.
How to customize it
- Pick one background option from the bracketed list and delete the rest before sending.
- Say "change only the background" every time — it's the instruction that keeps your subject from being altered.
- If the edge is rough, ask the model to refine just that region instead of regenerating the whole image.
Example output
Sample onlyFilled-in prompt (e-commerce white background):
"Edit the attached photo. Change only the background — leave the product completely untouched, keeping its exact colors, finish and proportions. New background: pure white #FFFFFF. Trace a clean, precise edge around the product with no halo and no leftover fringe from the old background. Center the product in the frame. Add a subtle, even contact shadow directly beneath it. Photorealistic, high resolution, same aspect ratio as the original."
Typical result: the product sits cleanly on a seamless pure-white field with a soft, natural shadow anchoring it, true to its real color, ready to drop into a product listing alongside other shots edited the same way.
Prompt variations to try
Remove background to transparent PNG
Edit the attached photo. Remove the background entirely and output a transparent PNG. Leave the subject completely untouched — exact pose, colors, hair and edges. Trace a precise cutout that follows individual hair strands, with no halo and no fringe from the original background. Do not fill the transparency with any color. High resolution, same framing as the original.
Blurred portrait-mode background
Edit the attached photo. Keep the subject exactly as-is. Replace the background with a soft, naturally out-of-focus version of a bright indoor office, blurred as if shot at a wide aperture. Match the background's light direction and color temperature to the subject and add a gentle contact shadow. It should look like a real portrait-mode photo, not a cutout on a blurred image.
New scene with matched lighting
Edit the attached photo. Leave the subject untouched. Place them on a beach at golden hour with the sun low behind them. Match that warm, low, backlit lighting onto the subject, add a subtle rim light on their edges and a soft long shadow on the sand. Match perspective so they stand believably on the ground, not pasted on top.
Common mistakes to avoid
- Not locking the subject. If you don't say "change only the background, leave the subject untouched," the model may reshape or retouch the person while it works. State the lock first.
- Ignoring the hair edge. Generic requests give you a blobby cutout. Ask it to
follow individual hair strandsand to remove any halo or fringe explicitly. - Forgetting the shadow. A subject with no contact shadow floats and looks pasted. Always request a soft, natural shadow consistent with the new light.
- Mismatched lighting. Dropping a subject lit from the left onto a scene lit from the right breaks the illusion. Tell the model to match light direction and color temperature.
- Vague background color. "White" often drifts to off-white or grey. For product shots specify the exact value, e.g.
pure white #FFFFFF.
Frequently asked questions
Can AI keep fine hair detail when it changes the background?
Yes, if you ask for it. The default cutout often loses flyaway strands, so the prompt explicitly requests tracing individual hair strands and forbids halos. If the first pass still looks blobby, ask the model to refine only the hair edge rather than starting over.
How do I get a true white background for product photos?
Specify the exact color — pure white #FFFFFF — rather than just "white," which tends to come out slightly grey or cream. Also ask to keep the product's real color and finish so the edit doesn't misrepresent what buyers receive.
Why does my subject look pasted onto the new background?
Almost always a lighting, shadow or perspective mismatch. Make sure the prompt asks to match the new scene's light direction and color temperature, to add a contact shadow, and to align perspective so the subject sits on the ground plane rather than in front of it.
Can I get a transparent background?
Yes — ask to remove the background entirely and output a transparent PNG, and say not to fill the transparency with any color. Confirm the file you download is a PNG, because a JPEG cannot store transparency and will show white where the background was.
Tip: replace the parts in [square brackets] with your own details before you send. The more specific you are — audience, tone, goal, constraints — the better the AI output.