# How to Remove the Background from a Photo for Free (AI)

> Open the photo in HF Photo Editor, select it and press Remove background (AI) in the Cut out and mask section. The AI runs in your browser, so the photo is not uploaded. Fix edges with Restore and Erase, add a new background color if you like, and download as PNG to keep it transparent.

Source: https://hf-photo-editor.dafontstyle.io/blog/how-to-remove-background-from-photo · Updated 2026-10-04 · By DafontStyle Team · Tool: https://hf-photo-editor.dafontstyle.io/editor (free, in the browser)

Removing the background used to mean careful work with the pen tool in Photoshop. Now an AI model can do it in a few seconds. This guide shows how to remove the background from a photo for free, fix the edges, add a new background and save the result.

![Illustration of a portrait before and after removing the background](https://hf-photo-editor.dafontstyle.io/blog/remove-background-before-after.webp "1200x750|Illustration: the same portrait with the room behind it, cut out, and on new backgrounds.")

## What you can use it for

- **Product photos** for an online shop, on a clean white background.
- **Profile pictures** with a color or gradient behind you.
- **YouTube thumbnails** and posters where you stand in front of the text.
- **Passport and ID photos** that need a plain white background.
- **Stickers and cut-outs** for WhatsApp, Instagram stories and collages.

## Step 1: Open your photo

Open HF Photo Editor and click **Open**, drag the photo onto the page or paste it with Ctrl+V. Click the photo to select it.

Choose a photo where the subject is in focus and clearly separate from the background. Busy backgrounds work, but a person in front of a plain wall gives the cleanest edges.

## Step 2: Press Remove background (AI)

In the **Properties** panel, find **Cut out and mask** and press **Remove background (AI)**.

![The Remove background (AI) button in the Cut out and mask section of the editor](https://hf-photo-editor.dafontstyle.io/blog/remove-background-button.webp "1200x750|Select the photo, then press Remove background (AI).")

The first time, the browser downloads the AI model, which takes a moment on a slow connection. After that it is cached. The model runs on your own computer or phone, so your photo is never uploaded anywhere.

When it finishes, the background is gone and you see the checkered pattern that means transparent.

![A portrait with a transparent background shown on a checkered pattern in the editor](https://hf-photo-editor.dafontstyle.io/blog/remove-background-result.webp "1200x750|Example: the background is transparent, shown as a checkered pattern.")

## Step 3: Fix the edges

AI is very good, but hair, glasses and thin objects sometimes need a touch-up. Under **Cut out and mask**:

- **Restore** brings back parts that were removed by mistake. Paint over them.
- **Erase** removes leftovers of the background.
- **Invert mask** keeps the background and removes the subject instead.
- **Reset mask** brings back the whole original photo.

The brush size is in the tool options. Use a large, soft brush around hair and a small one along straight edges. The original photo is never changed, so you can always restore any part.

## Step 4: Add a new background

Open the **Canvas** tab and pick one:

- **Color:** choose white for product and passport photos, or your brand color.
- **Add gradient background:** a colorful backdrop for profile pictures and posts.
- **None:** keep it transparent.

![A cut-out portrait on a purple to pink gradient background in the editor](https://hf-photo-editor.dafontstyle.io/blog/remove-background-new-background.webp "1200x750|Add gradient background puts a new backdrop behind the cut-out.")

To place the subject on another photo, click **Add image**, choose the new background photo and move it below the subject in **Layers**. Then add text in front of or around the person; our guide to [put the cut-out on a YouTube thumbnail](https://hf-photo-editor.dafontstyle.io/blog/how-to-make-a-youtube-thumbnail) shows a popular layout.

Want to keep the room but make it soft instead? You can [blur the background instead of removing it](https://hf-photo-editor.dafontstyle.io/blog/how-to-blur-background-of-photo) with Portrait blur.

## Step 5: Download

- **PNG** keeps the transparent background, for logos, stickers and designs. Learn more about how to [save the result as a transparent PNG](https://hf-photo-editor.dafontstyle.io/blog/make-transparent-png).
- **JPG** for photos with a new background. Transparent areas become white, which suits shop listings.

Online shops often ask for the main product photo on a pure white background (#ffffff). Set the canvas color to white before you download a JPG.

## Tips for the best results

- **Good light.** Even, bright light gives sharper edges than a dark room.
- **Contrast.** Dark hair in front of a dark wall is harder than dark hair in front of a light wall.
- **Big photos.** Very large photos are processed at up to 2048 pixels and the result is scaled back to full size, so the edges stay smooth.
- **People work best.** The model is tuned for people and portraits. For products with fine details, check the edges and use Restore where needed.

## Next steps

A white background is also the first step to a [passport photo with a white background](https://hf-photo-editor.dafontstyle.io/blog/how-to-make-a-passport-size-photo) that you can print at home.

## Questions people ask

### Is the background remover free?

Yes. There is no sign-up, no watermark and no limit on the number of photos.

### Are my photos uploaded to a server?

No. The AI model runs inside your browser, so the photo never leaves your device. Only the model itself is downloaded once, the first time you use it.

### Why does the first removal take longer?

The first time, your browser downloads the AI model. After that it is cached, and the next photos are processed much faster. The first use needs an internet connection.

### What photos give the best result?

Photos where the person or product stands out clearly from the background, with good light and sharp focus. The model is tuned for people and portraits.

### How do I fix hair or edges the AI missed?

Use Restore to paint back parts that were removed by mistake and Erase to remove leftovers. A soft, large brush works best around hair.
