{{ summaryTitle }}

{{ summaryValue }} {{ summaryLine }} {{ requestedFormatLabel }} {{ outputDimensionsLabel }} {{ sizeChangeLabel }}
Image source and conversion settings
Drop, paste, or browse one PNG, JPEG, WebP, GIF, SVG, AVIF, BMP, ICO, HEIC, or HEIF file. SVG must be static and self-contained, up to 2 MiB.
{{ sourceDropTitle }} {{ sourceDropLine }}

{{ sourceStatus }}

The browser reports when a native encoder falls back to a different MIME type.
Sizing changes happen before encoding. SVG vectors are rasterized directly at the selected pixel geometry.
Enter width and height in pixels.
× px
{{ normalizedScalePercent }}%
Turn this option on when allow upscale is required.
{{ allow_upscale ? 'Upscale allowed' : 'No enlargement' }}
{{ normalizedQuality }}%
This setting matters only when decoded pixels are resized.

Preparing the current output preview.

MeasureValueReview noteCopy
{{ row.label }}{{ row.value }}{{ row.note }}
{{ tableExportAnnouncement }}

Format guidance

{{ item.title }}{{ item.status }}

{{ item.detail }}

{{ comparisonStatus }}

{{ comparisonContext }}

{{ comparisonStatus }}

{{ chartExportAnnouncement }}
{{ statusAnnouncement }}

Similar tools

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.

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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.
  7. 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.

rfit=min(BwW,BhH) rcover=max(BwW,BhH) rpercent=p100

When enlargement is allowed, the applied scale s equals the requested scale r. With enlargement blocked, the applied scale is capped at 1.

s=min(1,r) when Allow upscale is off

The drawn width Dw and height Dh are rounded once after scaling, with a minimum of one pixel per side.

Dw=max(1,round(W×s)) Dh=max(1,round(H×s))

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.

How each sizing mode determines the canvas and drawn image
Sizing modeFinal canvasImage placement
Original dimensionsSource width and heightNo geometric resizing.
Scale by percentageRounded drawn dimensionsUniform scale from the percentage.
Fit inside boxRounded drawn dimensionsUniform fit within both maximum sides; unused box space is not added to the canvas.
Exact canvas: ContainRequested box width and heightUniform fit, centered with padding where needed.
Exact canvas: CoverRequested box width and heightUniform cover scale, centered; anything outside the canvas is cropped.
Exact canvas: StretchRequested box width and heightIndependent horizontal and vertical scaling, which can change proportions.

Stretch uses rx=BwW horizontally and ry=BhH 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.

A wide image with a circle and two edge marks: Contain leaves padding in a square frame, Cover crops away the edge marks, and Stretch turns the circle into an ellipse.
The same image fitted into a square frame with enlargement allowed. Gray space indicates padding.

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.

  1. If both dimensions are usable absolute lengths, they determine the source viewport.
  2. If one dimension is missing or unresolved and a valid viewBox exists, its width-to-height ratio supplies the missing dimension. If both are unresolved, the viewBox width and height supply both.
  3. 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.

Requested output formats and their encoding and transparency behavior
TargetEncodingTransparency
PNGLossless encoding of the rendered pixels; no quality slider.Preserved or flattened.
JPEGLossy photo encoding at the selected quality.Always flattened to the matte.
WebPBrowser encoding at the selected quality; no explicit lossless mode.Preserved or flattened when encoded as WebP.
AVIFRequested at the selected quality; available only when the browser can encode it.Preserved or flattened when encoded as AVIF.
BMPUncompressed 24-bit bitmap with row padding.Always flattened to the matte.
ICOOne 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.

change=O−II×100%

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.

Source, output, SVG, and optional comparison limits
ItemLimit
Standard raster source file40 MiB
HEIC or HEIF source file80 MiB
SVG source file2 MiB
SVG elements20,000
Source or main canvas side1 to 12,000 px
Source or main canvas area64,000,000 pixels
Scale by percentage1% to 400%
Optional comparison canvas area16,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.