Skip to main content
IF

Image Format Converter

Convert an image between PNG, JPEG, WebP and BMP entirely in your browser — no upload, instant preview, adjustable quality.

Did you like the tool? Thanks!
Share:

More Image Tools Tools

IC

Image Cropper

Crop any image to exactly the area you need, with a live preview — nothing is uploaded, everything happens in your browser.

IR

Image Resizer

Resize any image to an exact width and height in your browser — optional aspect-ratio lock, PNG/JPEG/WebP output, nothing uploaded.

IC

Image Compressor

Shrink an image's file size by re-encoding it at a chosen quality level — live before/after size comparison, JPEG/WebP/PNG output, done locally.

IF

Image Flip & Rotate

Flip an image horizontally or vertically and rotate it by any angle — quick 90/180/270° buttons or a free-angle slider, corners never clipped.

IT

Image to Base64

Convert an image into a Base64-encoded string — full data URI or raw Base64, character count, one-click copy, all done locally.

BT

Base64 to Image

Paste a Base64 string or data URI and preview the decoded image instantly — auto-trims whitespace, lets you pick the assumed format, download in one click.

PI

Placeholder Image Generator

Generate a simple placeholder image for wireframes and mockups — custom size, colors and text, auto-sized to fit, PNG/JPEG/WebP output.

FG

Favicon Generator

Turn any image into a complete favicon package — six PNG sizes plus a combined multi-resolution .ico file, generated locally in your browser.

AA

ASCII Art Generator

Turn a photo into text-based ASCII art, or type a short message as a large block-letter banner — both rendered entirely in your browser.

QC

QR Code Generator

Generate a real, scannable QR code from text, a URL, Wi-Fi details, an email address or a phone number — encoded entirely in your browser, no external API.

doesn't support transparency, so any transparent areas are flattened onto a white background before export.

Original

Preview ()

Converting…

How to Use Image Format Converter

Choose an image file, pick an output format from PNG, JPEG, WebP or BMP, and a live preview updates automatically. For JPEG and WebP, drag the quality slider to trade file size against visual quality. JPEG and BMP don't support transparency, so any transparent areas are automatically flattened onto a white background before export — a note explains this whenever it applies. Click "Download" to save the converted file.

About Image Format Converter

Every image format makes a different trade-off between file size, quality and compatibility, and "just convert it" is rarely as simple as it sounds because those trade-offs don't line up neatly. PNG is lossless and supports transparency, which makes it the right choice for screenshots, logos and anything with sharp edges or text, but it compresses photographs relatively poorly compared to a format designed for them. JPEG is lossy — it throws away image detail humans are less likely to notice, controlled by a quality setting — and produces much smaller files for photographs, but it has no transparency channel at all and can introduce visible blocky artifacts at low quality. WebP is a newer format that generally beats both PNG and JPEG at their own games, offering both lossless and lossy modes with better compression than either older format at an equivalent quality, though a small number of older tools and workflows still don't accept it. BMP is essentially the odd one out: an old, deliberately simple, uncompressed format that stores every pixel's colour value directly with no compression at all, which makes it enormous compared to any of the other three, but guarantees pixel-perfect fidelity and total compatibility with very old or minimal software that can't parse a compressed format. This tool handles the decode side by leaning entirely on the browser's own image decoder: the file is loaded into a plain `<img>` element, and whatever formats that specific browser already knows how to display natively — PNG, JPEG, WebP, GIF, BMP, and often SVG and AVIF too — are read successfully. This is deliberate: rather than trying to reimplement a JPEG or PNG decoder in JavaScript (a huge, error-prone undertaking that would inevitably lag behind and disagree with the browser's own battle-tested decoder), the tool simply asks the browser to do what it already does every time it displays any image on any webpage, then draws the fully-decoded result onto a canvas. From that canvas, three of the four output formats (PNG, JPEG, WebP) are produced using the browser's native `canvas.toBlob()` export, which every modern browser supports directly. BMP is the exception, and it's worth being explicit about why: no browser's `canvas.toBlob()` implementation supports exporting to BMP, in any browser, on any platform — it's simply never been implemented, presumably because BMP has had essentially no web use for decades. So for BMP output specifically, this tool hand-rolls a minimal, uncompressed 24-bit BMP encoder directly in JavaScript: reading the decoded pixel data back out of the canvas with `getImageData()`, then writing the exact byte layout the BMP file format specifies — a 14-byte file header, a 40-byte info header, and the raw pixel data itself, stored bottom-up (the last row of the image is written first) in BGR byte order rather than the RGB order canvas uses internally, with each row padded to a multiple of 4 bytes. This is a fully spec-compliant, if basic, BMP writer — it just doesn't apply any compression, matching what "uncompressed 24-bit BMP" has always meant. A few input formats are explicitly out of scope, and it's worth knowing why rather than hitting a confusing silent failure. HEIC (the format modern iPhones save photos in by default) only decodes in browsers that have added native HEIC support — this varies by browser and version and isn't something this tool controls; if your browser can't decode it, the file will show a clear error rather than a blank result. TIFF isn't decoded natively by any mainstream browser at all, so it will always fail to load here — convert it with dedicated desktop software first. And animated GIFs will convert successfully, but only their first frame: a canvas only ever "sees" one static frame of an animated image, by design, so the output is always a single still frame rather than the full animation, regardless of which output format you choose.

Details & Tips

How conversion actually works, step by step: the chosen file is loaded into an `<img>` element and the browser's native decoder does all the real work of interpreting the file's bytes into pixels — this tool never parses image-format bytes itself for decoding. Once the `<img>` fires its `onload` event, the fully decoded image is drawn onto an off-screen `<canvas>` element at its original resolution using `drawImage()`. If the chosen output format is JPEG or BMP (neither of which support transparency), the canvas is first filled solid white with `fillRect()`, and only then is the image drawn on top — this flattens any transparent or semi-transparent pixels onto a white background exactly the way most image editors handle a "discard transparency" export, rather than leaving transparent areas as an undefined or black colour, which is what happens if you skip this step. A short note appears in the interface whenever the selected output format triggers this flattening, so the behaviour is never a silent surprise. For PNG, JPEG and WebP output, the canvas's own `canvas.toBlob(callback, mimeType, quality)` method produces the final file directly — this is a standard, well-supported browser API, and the quality parameter (a number from 0 to 1, exposed here as a percentage slider) only has any effect for the two lossy formats, JPEG and WebP; PNG output ignores it entirely since PNG compression is always lossless. For BMP output, a hand-rolled encoder takes over: `getImageData()` reads the canvas's raw RGBA pixel values back into JavaScript, then a `BITMAPFILEHEADER` (14 bytes: the 'BM' signature, total file size, and the offset to where pixel data begins) and a `BITMAPINFOHEADER` (40 bytes: width, height, 24 bits per pixel, and the uncompressed BI_RGB compression flag) are written directly as raw bytes using a `DataView`, all multi-byte fields in little-endian order as the format requires. The pixel data itself is written bottom-up — BMP's first stored row is the bottom of the image, the reverse of how canvas and most other formats store rows — and each pixel is written in BGR (blue, green, red) byte order rather than canvas's native RGB, with each row's byte length rounded up to the next multiple of 4 bytes and the remainder left as zero padding, exactly as `BITMAPINFOHEADER`'s documented row-alignment rule requires. Worked example of the BMP row math: a 10-pixel-wide image at 24 bits per pixel needs `10 × 3 = 30` bytes of real pixel data per row; the padding formula `rowSize = floor((24×width + 31) / 32) × 4` gives `floor((240+31)/32)×4 = floor(8.47)×4 = 8×4 = 32` bytes, meaning 2 bytes of zero padding are appended after every row's real pixel data so each row lands on a 4-byte boundary — a hardware-era requirement carried forward into the modern file format spec. Nothing you convert here is ever uploaded anywhere: the file is read directly into browser memory via `URL.createObjectURL()`, decoded, redrawn, and re-encoded entirely on your device, and the resulting download never passes through a server. Very large source images (many tens of megapixels) may take a moment to process since decoding, redrawing and re-encoding all happen on the main thread, but no file size or resolution limit is otherwise enforced by the tool itself.

Frequently Asked Questions

Is my image uploaded to a server?
No. The file is read directly into your browser's memory and decoded, redrawn and re-encoded entirely on your device using the Canvas API. Nothing is ever sent over the network — this even works with no internet connection once the page has loaded.
Why isn't BMP an option in every browser's native export?
No browser's canvas.toBlob() function supports exporting to BMP — it has simply never been implemented in any browser, likely because BMP has had almost no use on the web for decades. This tool works around that by hand-writing the BMP file format's bytes directly.
Why does converting to JPEG or BMP add a white background?
Neither JPEG nor BMP support a transparency channel. Any transparent or semi-transparent pixels in your source image are flattened onto a solid white background before export, matching how most image editors handle this same situation — otherwise transparent areas would render as an undefined or black colour.
Can I convert a HEIC photo from an iPhone?
Only if your specific browser can decode HEIC natively — this varies by browser and version and isn't something this tool controls. If it can't, you'll see a clear "could not decode this file" error rather than a blank or broken result.
Can I convert a TIFF file?
No — no mainstream browser decodes TIFF natively, so TIFF input will always fail here. Convert it to PNG or JPEG with dedicated desktop software first, then use this tool from there.
What happens if I upload an animated GIF?
Only the first frame converts. A canvas can only ever "see" one static frame of an animated image at a time, by design, so the result is always a single still frame regardless of which output format you pick.
What does the quality slider actually control?
It only affects JPEG and WebP output, both lossy formats where a lower quality value produces a smaller file at the cost of visible detail loss. PNG output ignores the slider entirely, since PNG compression is always lossless regardless of the setting.
Which format should I pick for a photo I want to keep editing later?
PNG, since it's lossless — repeated saves don't degrade quality. JPEG and WebP are better suited to a final, one-time export where a smaller file matters more than perfect fidelity being preserved through further edits.
Why is my BMP output so much larger than the original?
BMP, as implemented here, stores every pixel's colour value directly with no compression at all, which is exactly what "uncompressed 24-bit BMP" means. It trades file size for guaranteed pixel-perfect fidelity and compatibility with very old or minimal software.
Is there a file size or resolution limit?
The tool doesn't enforce one itself, but very large source images may take noticeably longer to decode, redraw and re-encode since all of that work happens directly in your browser tab rather than on a server.
Does converting to a lossy format and back lose quality permanently?
Yes — once JPEG or lossy WebP compression discards image detail during export, that detail is gone for good. Converting the resulting file to PNG afterward preserves whatever quality remains at that point, but can't recover what was already discarded.

Part of These Collections

Also Available As

image format converter, convert image online, png to jpg, jpg to webp, image to bmp converter, convert png jpeg webp bmp

Found a Problem?

Let us know if something with Image Format Converter isn't working as expected.

Thanks — we'll take a look.