Image Background Color
Drop transparent images, choose a colour or a preset swatch, and download the flattened copies — every pixel opaque, processed on your device, never uploaded.
- Free
- No account
- Runs in your browser
- Nothing uploaded
Runs entirely in your browser — your input is never uploaded, logged, or stored.Privacy policy
What is Image Background Color?
This tool puts one solid colour behind an image by flattening its alpha channel onto that colour. It is the fix for a transparent PNG logo that can show up against black — or another unexpected colour — in an email client, a document or an older web page: paint white behind it and every viewer shows white, because there is no transparency left to misinterpret. It is also how you place a cut-out product shot on a coloured backdrop, or give a transparent image a set background before saving it as a JPG, which cannot store transparency at all.
What "flattening" means: a canvas of the image's exact pixel size is filled edge to edge with your colour, and the image is then drawn on top of it. Opaque pixels of the image cover the colour completely; transparent and semi-transparent pixels let it show through and end up fully opaque. The saved file therefore has no transparency anywhere — every pixel is solid. That is the whole point, and it is permanent: the alpha information is not stored in the output, so it cannot be brought back from the saved file. Keep your transparent original if you may need it again.
Be clear about what this does not do. It does not remove a background that is already painted into the pixels. If a "transparent" logo actually has a white rectangle baked into its pixels rather than a real transparent area, this tool sees an ordinary image with no transparency and leaves that rectangle exactly as it is — painting a colour under the picture cannot delete pixels that are already there. Removing a painted background is a different job. This tool only fills the genuinely see-through parts.
How it works: your browser decodes the image (a phone photo is straightened using its EXIF orientation), fills a canvas with the colour you chose, draws the image on top, and re-encodes the result. Because the picture is redrawn on a canvas, EXIF metadata — camera, date and GPS location — is not copied into the result, which is a privacy gain in itself. Nothing is uploaded; the Network tab in your browser's developer tools shows no request carrying your images.
Limits: up to 50 images at a time, 50 MB each, and about 100 megapixels (16,384 px per side). iPhones and iPads allow a canvas of only about 16.7 megapixels, so a very large photo may fail there with a message saying so. If you choose JPG, the transparency is gone for good and the colour you picked is what sits behind the image, since JPG has no alpha channel to store anything else.
1. The colour is validated first: it must be #rgb or #rrggbb and is normalised to lowercase #rrggbb before any file is read. 2. The file's size is checked (50 MB), and its first bytes confirm it is PNG, JPG, WebP, GIF, BMP or AVIF before it is decoded. 3. The image is decoded upright (its EXIF orientation is applied) and drawn onto a canvas of its own pixel size. 4. The canvas is filled edge to edge with the chosen colour (fillStyle + fillRect), then the image is drawn on top with drawImage. Transparent pixels reveal the colour; opaque pixels cover it; the composite is fully opaque. 5. The canvas is encoded to the chosen format — PNG (lossless), JPG or WebP (lossy, at the quality you set) — and named like logo-background.png. 6. The saved file carries no metadata and no alpha channel: every pixel is opaque.
Worked examples
- A transparent logo, logo.png, flattened onto #ffffff → logo-background.png, with every pixel fully opaque.
- #fff is read as #ffffff, so #fff and #ffffff produce the same result and the same file name.
- photo.png saved as JPG with #000000 → photo-background.jpg, with the note "JPG has no transparency — the colour you chose becomes the background of the finished image."
- shot.png saved as WebP at quality 80 → shot-background.webp, encoded at quality 0.8 (80%).
How to use Image Background Color
- Click "Choose images", drop files on the box, or paste a screenshot with Ctrl+V (Cmd+V on a Mac).
- Pick the background colour with the colour picker, or click one of the preset swatches (white, black or a neutral grey).
- Choose the output format, or leave "Same as input"; set the quality if you chose JPG or WebP.
- Click "Add background", then download each image or all of them as a ZIP.
Common errors
- "cyan" is not a colour. Use a hex value like #ffffff, or the short form #fff. — the colour box only takes a 3- or 6-digit hex value.
- "IMG_0042.HEIC" is actually a HEIC file, not PNG, JPG, WebP, GIF, BMP or AVIF. — convert HEIC photos to JPG first.
- "… is 62.40 MB, over the 50.00 MB limit for this tool…" — resize or compress the file first.
- "The output would be 20000 × 12000 pixels — more than a browser can safely draw (100 megapixels, 16,384 px per side). Choose a smaller size." — resize the image smaller first.
- "Your browser could not encode an image this large (…). Try a desktop browser, or resize it smaller first." — the image is larger than this device allows (about 16.7 megapixels on iPhone and iPad).
FAQ
How do I put a white background behind a transparent PNG?
Drop the PNG in, set the background colour to white (#ffffff) — it is the default — and click "Add background". The transparent areas are filled with white and the saved PNG is fully opaque, so any viewer shows white rather than black or a checkered pattern.
Does this remove the background from an image?
No — it does the opposite. It adds a background by flattening transparency onto a colour. It cannot remove a background that is already painted into the pixels, because those pixels are not transparent; this tool only fills genuinely see-through areas.
Can I choose any colour, or only the presets?
Any colour. Use the colour picker or type a hex value — 6 digits like #1a2b3c, or the short 3-digit form like #fff. The four swatches are just quick choices (white, black and two greys).
Will the result still be transparent?
No. Flattening makes every pixel opaque, so the saved file has no transparency left. That is the point of the tool; if you need transparency, keep using the original file.
Can I undo it and get my transparency back?
Not from the output file. The alpha channel is not stored in the result, so the transparency is gone permanently. Keep your transparent original if you might need it again.
Why do my transparent areas look black in a JPG?
JPG has no alpha channel, so a browser or editor that ignores transparency tends to composite it onto black. Choosing JPG here fills the transparent pixels with your colour first, so they become that colour instead of black.
Are my images uploaded anywhere?
No. Decoding, flattening and encoding all happen in your browser, and nothing is sent to a server. The Network tab in your browser's developer tools confirms it.
Related tools
- PNG to JPG ConverterDrop PNG images, choose a JPG quality and a colour for transparent areas, and download smaller JPG files — converted on your device, nothing uploaded.
- Grayscale Image ConverterDrop images, choose a grayscale method or a black-and-white threshold, and download the converted copies — processed on your device, never uploaded.
- Crop ImageDrop a photo, drag the crop box or type exact pixel values, choose an aspect ratio or a circle, and download the cropped image — processed on your device.
- Image ConverterDrop any common image — JPG, PNG, WebP, HEIC, AVIF, GIF, BMP, SVG or ICO — choose JPG, PNG, WebP or ICO, and download the converted files.
Prefer AllUtil on Google
One click adds AllUtil to your Google preferences. You'll see our tools highlighted with a Preferred badge in Search and AI answers.