Gridwright Start for $1

Remove Background from Pixel Art: Sharp Transparent PNGs

Remove a white or solid background from pixel art sprites and sheets with hard edges, no halo and white eyes kept, then use them in Godot 4 or Unity.

Pixel Art Background Remover at work
Pixel Art Background Remover at work: Transparent sprites from a flat background.

You have the sprite sheet you need, and it sits on a white background. Drop it into the game and every frame walks around inside a white box. Sometimes it is worse: the grey and white checkerboard that only looks transparent, saved right into the picture. Either way the sprite can't go in the game until the background is gone.

The usual fixes make it worse. A magic wand works on one sprite at a time, so a sheet of forty frames is forty clicks. A colour-to-alpha filter in a photo editor fades the colour out, so every pixel close to white turns half see-through, and the shine in the eyes goes with it. Background removers made for photos give the subject a soft edge, which suits a portrait and blurs a 16 pixel sprite.

This guide shows what a clean pixel art cutout looks like, what goes wrong on the way, and how to do a whole folder of sprites at once with the Pixel Art Background Remover. You can try it here while you read.

What a clean cutout looks like

Pixel art has no soft edges. Every pixel is part of the sprite or it isn't, so a clean transparent sprite has two kinds of pixel only: fully solid and fully clear.

Pixel Monsters
Pixel Monsters: 16x16 pixel art RPG monsters: slimes, bats, ghosts, skeletons; move, hurt and death animations. One of the 150 packs in Gridwright.

That matters in the engine. A half-transparent pixel on the outline lets the colour behind it through, so the sprite gets a faint ring that changes with every level's background. It matters for the art too. The dark outline has to stay whole, and the white inside the sprite (eyes, teeth, a shine on a helmet) has to stay white.

What goes wrong

  • White eyes disappear. Deleting every white pixel deletes the white inside the sprite as well.
  • A pale halo stays round the sprite. A picture that was scaled with smoothing, or saved as a JPG, has a band of in-between colours where the sprite meets the background. On a dark level it shows as a light ring.
  • The background isn't one colour. A JPG saves flat white as dozens of near-whites, so an exact colour match leaves dots behind.
  • The checkerboard is baked in. That is two background colours, not one, and a tool that looks for one colour clears half the squares.
  • Pockets stay. The gap between a character's legs, or between frames that touch on a sheet, is closed in by the sprite. Anything that starts from the edge of the picture can't reach it.
RPG Item Icons
RPG Item Icons: 507 pixel art RPG item icons, 16x16: weapons, armour, potions, gems, magic items, resources and food in matching materials. One of the 150 packs in Gridwright.

Clear from the edges, not by colour

The way to keep white eyes is to start at the picture's border. The background touches the edge of the sheet; the inside of a sprite does not. Fill inward from the border through every pixel of the background colour, moving left, right, up and down only, and the fill stops at the outline. Because it never steps corner to corner, even a one-pixel diagonal outline holds it back.

The background colour can be found the same way. It is the most common colour along the picture's edges and corners, because sprites rarely touch the edge of a sheet.

The pockets the fill can't reach need one click each. If the sprites have no white of their own, it is quicker to clear every pixel of the background colour, wherever it is.

The fast way: the Pixel Art Background Remover

The Pixel Art Background Remover does all of this in your browser. Your pictures are never uploaded, so it is safe for art nobody has seen yet.

  1. Drop your pictures. One sprite, a whole sheet or many files at once: PNG, GIF, WebP or JPG, up to 4096 pixels a side. No picture at hand? It has a sheet of eight monsters on white to practise on.
  2. Check the colour. It reads the background from the edges and corners and shows it as a hex swatch. A saved checkerboard comes up as two swatches. To choose by hand, click the background on the left picture; Shift-click or + Add a colour adds another, up to four.
  3. Choose what to clear. From the edges keeps that colour inside sprites. Every matching pixel also clears it between frames and inside sprites. If a pocket stays, click it on the right picture and just that pocket goes. The tool tells you how many background pixels are still closed in.
  4. Tune the edges. Tolerance, from 0 to 128, takes colours near the background too; for a JPG it starts at a value that covers the background's own noise. Halo cleanup, up to 160, takes the light fringe next to the cleared area, one pixel deep or two, and a dark outline stays. Remove specks clears stray dots of up to 32 pixels.
  5. Look at it on black, white and pink. A halo you can't see on the checkerboard shows on black. A dark fringe shows on white. Pink shows almost everything.
  6. Download. One picture as a PNG, or all of them as one ZIP with a README that lists each file's size, the pixels kept and the background colours cleared.

Every pixel in the download is fully solid or fully clear. If the picture already had half-transparent pixels, the ones at least half solid become solid and the fainter ones become clear, so a sprite saved with soft edges comes out hard.

Your game, looking finished

Every Gridwright asset pack, made to fit together, and all 44 tools for the fiddly work, with every new release, for $17 a month. Try it in your own game first: 3 days for $1 with every tool and up to 10 packs. Cancel any time.

Start: 3 days for $1 See everything it includes

Settings for common pictures

  • A clean PNG on flat white: leave it as it opens. Tolerance 0, from the edges.
  • A JPG, or a picture someone scaled with smoothing: raise the tolerance until the dots go, then the halo cleanup until the pale ring goes. Tick 2 px deep if one pixel isn't enough.
  • A baked-in checkerboard: check that both swatches are there. If one is missing, add it from the left picture.
  • Frames that touch, with no white in the sprites: every matching pixel.
  • A white-eyed sprite on a white sheet with a gap between its legs: from the edges, then one click in the gap.
  • A whole folder: drop it in once. Each picture finds its own background on its own edges; a colour you pick by hand applies to all of them.

Use the sprites in Godot 4

  1. Drag the PNG into the FileSystem dock. Godot imports it as a texture and keeps the transparency.
  2. Set Project Settings > Rendering > Textures > Canvas Textures > Default Texture Filter to Nearest. A new Godot 4 project starts on Linear, which blurs pixel art. For one node only, set Texture > Filter under CanvasItem in the Inspector.
  3. Put a single sprite on a Sprite2D. For a sheet, set the Sprite2D's Animation > Hframes and Vframes to its columns and rows, or add it to an AnimatedSprite2D through Add frames from sprite sheet in the SpriteFrames panel.

In Unity, select the PNG and set Texture Type to Sprite (2D and UI), Filter Mode to Point (no filter) and Compression to None.

Sprite Sheet Cutter: Single frames from a sprite sheet
Sprite Sheet Cutter: Single frames from a sprite sheet. Included in Gridwright.

If a sheet needs cutting into single frames first, the Sprite Sheet Cutter does that, and the Sprite Outline Adder puts a clean outline round sprites that lost theirs.

When the result looks wrong

  • The sprite has holes. Every matching pixel cleared the white inside it. Switch to from the edges.
  • A pale ring shows on dark levels. Raise the halo cleanup, or tick 2 px deep.
  • Dots are left in the background. Raise the tolerance, or remove specks.
  • The background between the legs stays. Click it on the right picture.
  • Nothing is left. The tolerance is too high or the wrong colour was picked. The tool warns you; lower it or pick again.
  • The sprite is blurry in the engine. The texture filter is Linear. Set it to Nearest.

FAQ

Can I remove the background from a whole sprite sheet at once?

Yes. Drop the sheet in and the background goes from around every frame in one pass. Drop many sheets and they download together as one ZIP.

Will it remove the white in my sprite's eyes?

Not when it clears from the edges. The fill starts at the picture's border and stops at each sprite's outline, so white inside a sprite stays.

Are my pictures uploaded anywhere?

No. It runs in your browser and the pictures stay on your computer.

Clean your sprites today

Open the Pixel Art Background Remover, drop in your sheet, check it on black and download it. For sprites that come transparent already, the Pixel Monsters pack has slimes, bats, ghosts and skeletons at 16x16 with move, hurt and death animations. Both are part of Gridwright: 44 tools and 150 asset packs, 3 days for $1, then $17 a month.

Your game, looking finished

Every Gridwright asset pack, made to fit together, and all 44 tools for the fiddly work, with every new release, for $17 a month. Try it in your own game first: 3 days for $1 with every tool and up to 10 packs. Cancel any time.

Start: 3 days for $1 See everything it includes