{{ item.detail }}
Image Format Converter
{{ summaryTitle }}
{{ summaryValue }} {{ summaryLine }} {{ requestedFormatLabel }} {{ outputDimensionsLabel }} {{ sizeChangeLabel }}Preparing the current output preview.
| Measure | Value | Review note | Copy |
|---|---|---|---|
| {{ row.label }} | {{ row.value }} | {{ row.note }} |
Format guidance
{{ comparisonContext }}
{{ comparisonStatus }}
{{ chartExportAnnouncement }}Similar tools
- Image Compressor Compress one image locally in your browser, compare size and visual quality, then download a resized or reformatted copy with metadata controls.
- Image Background Remover Remove simple image backgrounds in your browser, tune color and edge masking, and review transparency before downloading a PNG cutout.
- Image Resizer Resize one image locally, compare fit or crop geometry, and tune format quality against a file-size target before downloading.
- Image Metadata Stripper Strip hidden metadata from an image in your browser and create a clean JPEG, PNG, or WebP copy with a check for remaining privacy markers.
A photograph, a screenshot, and a logo place different demands on an image file. A photograph has many subtle color changes, a screenshot needs readable text and sharp edges, and a logo may need a transparent background. Converting image formats changes how that picture is stored so it can suit a receiving application, a website, or an icon requirement. It can also change detail, transparency, and file size.
Raster images store a grid of sampled pixels. Enlarging that grid creates more pixels by estimating colors between existing samples, so a larger raster does not recover missing detail. Vector images such as SVG describe shapes, paths, and text that can be drawn at a chosen size. Rasterization turns those instructions into pixels. Choosing the required pixel dimensions before rasterization lets vector edges be drawn at that size; enlarging the resulting raster later loses that advantage. Any photographs embedded inside an SVG still have their own pixel limits.
- Pixel dimensions
- The number of pixels across and down, such as 2400 × 1600. These dimensions determine the available pixel grid.
- Pixel density
- Pixels per inch, or PPI, relates that grid to a physical print size. A 2400-pixel-wide image spans 8 inches at 300 PPI. Changing a density label alone does not create more detail. Printer dots per inch, or DPI, describes a different quantity.
- File size
- The bytes needed to store the encoded image. Two files with identical pixel dimensions can have very different byte counts.
A filename extension identifies an expected format, but the encoded contents determine what the file actually is. Renaming a JPEG with a PNG extension does not convert it. Lossless encoding, as used by PNG, preserves the pixel values presented to the encoder. Lossy encoding trades some image information for a smaller representation. Saving an already compressed JPEG as PNG cannot restore detail that the JPEG discarded, and lossless encoding cannot undo a crop or resize performed beforehand.
Transparency is carried by an alpha channel, which describes how opaque each pixel is. It allows a logo or soft edge to blend with different backgrounds. An opaque format needs those pixels combined with a solid background, called a matte. Once that background becomes part of the picture, converting the file to an alpha-capable format does not separate it again.
Fewer bytes do not establish equivalent visual quality. A smaller file might use better compression, fewer pixels, stronger loss, or an opaque background instead of transparency. Fine lettering, gradients, and partially transparent edges are useful places to inspect. A suitable conversion satisfies the destination's format and size requirements while keeping the appearance that matters; the original remains valuable for future resizing and editing.
How to Use This Tool:
The page initially converts a generated sample. Replace it with your own image; conversion runs automatically when the image or conversion settings change.
- Choose one image with Browse image, drag a file onto Source image, or paste an image from the clipboard. If you drop several files, only the first is used.
- Select the Target format accepted by the destination. The initial choice is WebP; selecting a format requests that encoder, and the result reports what the browser actually produced.
- Choose Image sizing. Keep Original dimensions, use Fit inside box for maximum dimensions, choose Exact canvas for a fixed frame, or use Scale by percentage. An exact canvas also needs a choice between containing, cropping, and stretching. For resized raster pixels, Advanced offers Resampling quality choices of High (the default), Medium, and Low.
Enable Allow upscale when you need a larger render, including a larger raster from SVG. It starts off.
- Adjust Encoding quality for JPEG, WebP, or a browser-supported AVIF output. The initial setting is 88%; inspect small text and detailed edges after lowering it.
- Choose Preserve transparency or Flatten to matte where available. JPEG and BMP always use the Matte color, initially white. For ICO, choose the required Icon payloads preset.
- Review Converted image and the Conversion ledger, especially the actual format, output dimensions, and any crop or padding. Confirm that the summary describes your current source and settings.
If Conversion needs attention reports an invalid Output frame, enter positive whole-pixel dimensions within the stated limits. A valid correction starts conversion again automatically.
- Download the current image from Converted image once its preview and actual format match your needs. To investigate file sizes first, open Byte size comparison, then select any preferred format as the main target before downloading it.
Interpreting Results:
Actual output identifies the format returned by the encoder. A MIME type is a format identifier associated with the encoded file. If an AVIF request falls back to PNG, the result reports PNG and the download receives a PNG extension. Being able to display an input format does not establish that the browser can encode that format.
The preview helps reveal cropping, padding, changed proportions, rotation, and unexpected colors. Check the downloaded image in its receiving application as well. The preview can fit a large image into a smaller space, so inspect the file at its intended display size when fine detail matters. Output dimensions describes the canvas, while Drawn image describes the image placed on it. For ICO, the selected payload sizes describe the actual icon entries.
Measured format comparison
Opening Byte size comparison requests real PNG, JPEG, and WebP encodings at the current geometry. Source shows the original file's bytes, and Current shows the current converted file's bytes. These references may have different dimensions, or may represent an SVG document or a multi-size ICO, so their difference includes more than a change of compression format.
- JPEG and WebP use the current quality percentage. PNG has no quality-percentage setting. Equal percentages across formats do not mean equal visual quality.
- With transparency preserved, PNG and WebP retain alpha while JPEG uses the matte. With flattening selected, all three alternatives use the matte. A JPEG or BMP main target does not by itself flatten the PNG and WebP comparison alternatives.
- An unavailable encoder is omitted from the plot and identified in the comparison CSV. A fallback file is not presented as a measurement of the requested format.
- The comparison measures bytes, not visual quality. After choosing a candidate, make it the main target and inspect its actual converted image.
Unchanged comparisons can be reused; changing the source or conversion settings requires fresh measurements. If only the chart fails to load or draw, the measurements remain available in CSV and the converted image remains downloadable. Retry comparison retries the chart. An encoding failure also offers retry while keeping the primary image available.
The ledger supports row copying, CSV copying or downloading, and DOCX export as a conversion record. Comparison downloads in PNG, WebP, and JPEG contain an image of the chart; its CSV contains the measurements and encoding conditions. Those chart downloads are separate from the converted image.
Technical Details:
Raster conversion has three consequential stages: interpret the source image, draw it into the chosen pixel geometry, and encode those pixels in the output format. Resizing, cropping, and flattening change the pixels before compression. For SVG, vector shapes are rendered at the selected geometry instead of enlarging an initial small raster. Subsequent conversions use the loaded source again, so changing settings does not repeatedly compress the previous output.
Formula Core: pixel geometry
Let W and H be the source width and height in pixels, Bw and Bh the requested box dimensions, and p the scale percentage. The requested scale uses the smaller box ratio for fitting the whole image and the larger ratio for covering the frame.
When enlargement is allowed, the applied scale s equals the requested scale r. With enlargement blocked, the applied scale is capped at 1.
The drawn width Dw and height Dh are rounded once after scaling, with a minimum of one pixel per side.
Positive half-pixel results round upward. Whole-pixel rounding can slightly change the ratio of very small images. The sizing modes use these dimensions as follows.
| Sizing mode | Final canvas | Image placement |
|---|---|---|
| Original dimensions | Source width and height | No geometric resizing. |
| Scale by percentage | Rounded drawn dimensions | Uniform scale from the percentage. |
| Fit inside box | Rounded drawn dimensions | Uniform fit within both maximum sides; unused box space is not added to the canvas. |
| Exact canvas: Contain | Requested box width and height | Uniform fit, centered with padding where needed. |
| Exact canvas: Cover | Requested box width and height | Uniform cover scale, centered; anything outside the canvas is cropped. |
| Exact canvas: Stretch | Requested box width and height | Independent horizontal and vertical scaling, which can change proportions. |
Stretch uses horizontally and vertically, with the same cap of 1 applied independently when enlargement is blocked. Each axis then follows the same rounding rule. The exact canvas keeps its requested dimensions regardless of that cap. Consequently, Cover and Stretch can leave padding when the source is too small to fill the frame without enlargement. Centering offsets are rounded to whole pixels, so opposite borders can differ by one pixel.
For a 2400 × 1600 source inside a 1200 × 900 maximum box, the smaller ratio is 0.5, producing 1200 × 800 pixels. An exact 1200 × 900 canvas with Contain keeps that drawn size and adds 50 pixels above and below. Cover instead uses a scale of 0.5625, draws 1350 × 900, and crops 75 pixels from each side.
SVG dimensions and rasterization
An SVG viewport is the rectangle into which its contents are drawn. A viewBox describes the source coordinate rectangle and its proportions; it does not by itself require the final raster to use the same pixel count. The authored aspect-ratio behavior is retained within that viewport before the chosen output sizing is applied.
Source sizing starts with the root width and height attributes. Positive unitless values and px values are pixels. Absolute units use 96 CSS pixels per inch. One inch also equals 2.54 cm, 25.4 mm, 101.6 quarter-millimeters, 72 points, or 6 picas. These are CSS unit conversions, not a measurement of a screen's physical pixel density.
- If both dimensions are usable absolute lengths, they determine the source viewport.
- If one dimension is missing or unresolved and a valid
viewBoxexists, its width-to-height ratio supplies the missing dimension. If both are unresolved, the viewBox width and height supply both. - Without enough information to infer a dimension, only the remaining missing width defaults to 300 pixels and the remaining missing height to 150 pixels. With neither dimension available, the fallback is 300 × 150.
Percentage lengths and auto do not supply an independent source pixel size here, and CSS-only dimensions do not replace these attribute rules. Resolved dimensions round to whole pixels with a minimum of one pixel. A viewBox-only 0 0 80 40 resolves to 80 × 40; a width of 96 px and height of 1 in resolves to 96 × 96. Zero or negative dimensions, unsupported root units such as em, and malformed or nonpositive viewBox spans are rejected.
Accepted SVGs must be static, self-contained UTF-8 images. Shapes, self-contained styles, references to gradients or shapes within the same document, and embedded raster images can be used. Embedded raster data must be Base64-encoded and may be PNG, JPEG, WebP, GIF, AVIF, or BMP, subject to decoding support. SVG is treated as an isolated browser image, not an editable document.
Scripts, event handlers, animation, embedded HTML or other non-SVG elements, external resources and document-type declarations are rejected. Styles cannot use imports, other CSS at-rules, or CSS escapes, and embedded SVG data images are not accepted. Invalid UTF-8 bytes or a declaration naming another encoding produce an error rather than silently replacing characters. Save an affected file as UTF-8 and export a static, self-contained version before trying again.
Formats, compression, and transparency
Recognized input formats are PNG, JPEG, WebP, GIF, SVG, AVIF, BMP, ICO, HEIC, and HEIF. Raster input still needs a working decoder in the browser; HEIC and HEIF use an additional local decoder. The output choices have these distinct behaviors.
| Target | Encoding | Transparency |
|---|---|---|
| PNG | Lossless encoding of the rendered pixels; no quality slider. | Preserved or flattened. |
| JPEG | Lossy photo encoding at the selected quality. | Always flattened to the matte. |
| WebP | Browser encoding at the selected quality; no explicit lossless mode. | Preserved or flattened when encoded as WebP. |
| AVIF | Requested at the selected quality; available only when the browser can encode it. | Preserved or flattened when encoded as AVIF. |
| BMP | Uncompressed 24-bit bitmap with row padding. | Always flattened to the matte. |
| ICO | One or more square PNG images stored in an icon container. | Preserved or flattened. |
For browser-encoded targets, an unsupported requested format can produce PNG instead. The actual returned format controls the download extension. Encoding quality ranges from 40% to 100%; a value of 100% does not guarantee lossless encoding. PNG, BMP, and ICO do not use that quality percentage.
Resampling controls how colors are estimated when existing raster pixels are resized. A resampling-quality choice asks the browser for an interpolation quality; it does not specify one identical algorithm across browsers or sharpen lost detail.
Flattening paints the matte behind the image before encoding, including any padding. Alpha-capable output can otherwise retain decoded transparency. Partially transparent edge pixels mix with the matte, so choosing a background that matches the destination can prevent an unwanted border.
ICO presets contain square PNG payloads at 16, 32, and 48 pixels for Favicon; 32, 48, and 256 for App icon; 16, 32, 48, 64, 128, and 256 for Full set; or one 256-pixel payload for Single. Each entry proportionally fits the already rendered canvas into its square. This final icon-sizing step can enlarge a small canvas even if Allow upscale was off for the main sizing step. The headline canvas dimensions therefore are not the dimensions of every icon entry. Older icon readers may require BMP-style entries instead of PNG payloads.
What re-encoding preserves
The result is a new still image. Animated inputs contribute one browser-decoded still frame; animation timing and other frames are not preserved. HEIC/HEIF collections, sequences, bursts, depth maps, and Live Photo sidecars are outside this still-image conversion.
Original EXIF camera data, GPS data, embedded color profiles, and other auxiliary content are not intentionally retained. The browser determines how source orientation and color are decoded, and an encoder can write new basic metadata or color information. Re-encoding is therefore not a promise of archival color fidelity or a complete metadata-removal audit. Available fonts and browser rendering can also change the appearance of SVG text.
Formula Core: byte-size change
For nonempty files, percentage change compares output bytes O with source bytes I. A negative result means the output is smaller.
The summary rounds the magnitude to one decimal place and reports Same byte size when the absolute change is below 0.05%, so that label does not require identical byte counts. Displayed KB and MB use divisors of 1024 and 1,048,576 respectively. The comparison CSV also supplies exact bytes. Compression results depend on the picture and encoder; the dimension examples above do not predict file sizes.
Size and processing limits
File size and pixel count are separate limits. A compact compressed file can expand into a large image, and source dimensions are checked before output resizing can reduce them. The listed maxima are inclusive.
| Item | Limit |
|---|---|
| Standard raster source file | 40 MiB |
| HEIC or HEIF source file | 80 MiB |
| SVG source file | 2 MiB |
| SVG elements | 20,000 |
| Source or main canvas side | 1 to 12,000 px |
| Source or main canvas area | 64,000,000 pixels |
| Scale by percentage | 1% to 400% |
| Optional comparison canvas area | 16,000,000 pixels |
One MiB is 1,048,576 bytes; one megapixel is 1,000,000 pixels. The browser image-decoding step and each optional comparison encoding have a 10-second timeout. That is not a deadline for the complete conversion or the additional HEIC/HEIF decoding. These limits do not guarantee that a browser can immediately interrupt an unusually expensive SVG path or filter. If decoding times out, use a smaller or simpler source. An image above the 16-megapixel comparison limit can still be converted within the main limits; reduce its output dimensions to compare formats.
Privacy Notes:
Source decoding, resizing, SVG rasterization, encoding, and preview take place in the current browser tab. Image contents are not uploaded for conversion. Source images and generated files remain in page memory until you leave or replace them; downloading saves a copy through your browser.
- The page may download supporting code for HEIC/HEIF decoding and chart display. Local image processing does not guarantee that every feature works without a network connection.
- The URL can retain format, sizing, fit and upscale choices, quality, transparency and matte, icon preset, resampling, and the selected result view. It does not carry the source filename, source image, or Base64 image data.
- Reloading restores those preferences with a generated sample. Select your own image again to resume work on it.
Worked Examples:
A larger image from an SVG logo
A static SVG resolves to 120 × 60 pixels, but a destination needs 480 × 240. Select PNG, Scale by percentage, and 400%, then enable Allow upscale. The ledger reports 480 × 240, and vector shapes are drawn at that size. Leaving enlargement off keeps the output at 120 × 60. The PNG remains a raster image, so keep the SVG if other sizes will be needed later.
A square cover with enlargement blocked
Place a 200 × 100 image on a 400 × 400 Exact canvas with Cover and crop. With Allow upscale off, the drawn image remains 200 × 100, leaving 100 pixels on each horizontal side and 150 above and below. Turning enlargement on draws 800 × 400 and crops 200 pixels from each horizontal side. The ledger distinguishes the drawn size from the final 400 × 400 frame, and the preview shows which content is lost.
References:
- SVG 2: Coordinate Systems, Transformations and Units, W3C.
- SVG 2: Conformance Criteria and Processing Modes, W3C.
- CSS Values and Units Level 4: Absolute Lengths, W3C, 12 March 2024.
- HTML Standard: Serializing Bitmaps to a File, WHATWG.
- Portable Network Graphics Specification, Third Edition, W3C, 24 June 2025.
- How to convert image format with ImageMagick, Simplified Guide.