Guide · Images
JPG, PNG, WebP, HEIC and SVG: which image format to use
By NREX Group · Published · Sources last checked: · 12 min read
Drafted with AI assistance and checked against the sources listed at the end.

Every image file answers three questions: is the picture stored as pixels or as shapes, is some detail thrown away to save space, and what else is kept beside the pixels. JPG, PNG, WebP, HEIC and SVG answer them differently, and the answers explain why the same screenshot can be 24 KB as one format, 50 KB as another and under 2 KB as a third, while a photograph puts the formats in a different order. This guide covers the differences, with measured sizes and the sources behind each claim.
Raster and vector
A Raster. An image stored as a grid of pixels. JPEG, PNG, WebP, GIF and HEIC are raster formats, so enlarging one beyond its pixel size makes it look soft or blocky. Read the guide image is a grid of pixels: JPEG, PNG, WebP, GIF and HEIC all work that way, so its detail is fixed at the pixel size it was made at, and enlarging it makes it look soft. A Vector. An image stored as drawing instructions (shapes, curves, fills) instead of pixels, so it can be drawn at any size without blur. SVG is the web's vector format. Read the guide image is drawing instructions. SVG, defined by the W3C as a language for two-dimensional graphics, builds a picture from vector shapes such as paths of lines and curves, plus images and text.[10] MDN describes SVG as ideal for diagrams, icons and anything that must be drawn accurately at different sizes.[1]
The size consequence is easy to measure. This 181-byte icon, a circle with a check mark, is a complete SVG file:
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10" fill="#2547ea"/><path d="M8 12l3 3 5-6" fill="none" stroke="#fff" stroke-width="2"/></svg>
| Pixel size | PNG | WebP, lossless | SVG |
|---|---|---|---|
| 48 × 48 | 2,377 | 1,540 | 181 |
| 192 × 192 | 8,202 | 4,548 | 181 |
| 768 × 768 | 30,867 | 13,692 | 181 |
| 1536 × 1536 | 77,571 | 24,582 | 181 |
The raster files grow with the pixel count; the SVG does not change at all, because it never contained pixels. The numbers are bytes before any server-side compression. Real icons carry more shapes and gradients, so their SVGs are bigger, but the shape of the result holds: vector size follows the number of shapes, raster size follows the number of pixels. A photograph has no shapes to describe, which is why it stays a raster.
PNG to SVG does not change that. It wraps the PNG in an SVG element as an embedded base64 image, so the picture stays a bitmap. Base64 writes 3 bytes as 4 characters, so a 10,000-byte PNG becomes roughly 13.5 KB of SVG and a 1,000,000-byte one roughly 1.33 MB. The wrapper suits cases such as a form that accepts only .svg. A real vector from a bitmap needs tracing. SVG to PNG goes the other way: an SVG has no fixed pixel size, so the converter takes a scale (1x to 4x) or a width, and falls back to the viewBox, then to a 300 × 150 canvas, when no size is declared.
Lossy and lossless
Lossless. Compression that can be undone exactly: the decoded file has the same pixels or bytes as the original. PNG and the plain 'repack' step of a PDF compressor are lossless, so the saving is limited to what repetition and structure allow. Read the guide compression can be undone exactly. PNG is a lossless format for static and animated raster images.[2] Lossy. Compression that throws some detail away to get a smaller file, so the decoded result only approximates the original. JPEG is the best-known example; each further lossy save can remove a little more. Read the guide compression discards detail the eye is less likely to miss. JPEG is the best-known case; MDN calls it the most widely used lossy format for still images, well suited to photographs and poor for sharp diagrams or charts.[1] The JPEG standard defines DCT-based modes and a separate lossless mode in its annexes, and the ordinary “JPG” file uses the lossy kind.[3, 1] WebP has both. Its lossy mode uses VP8 intra-frame encoding and its lossless mode stores pixel values exactly.[5]
Google reports lossless WebP images 26% smaller than PNG and lossy WebP images 25-34% smaller than comparable JPEGs at an equivalent SSIM quality index.[4] Those are averages over Google’s test material. To see the spread on individual pictures, two test images were encoded with the same browser encoders the Image Converter uses (Chrome 156). The photo is 2000 × 1500, 9,000,000 bytes as raw RGB; the screenshot is 1280 × 800, 3,072,000 bytes raw.
| Encoding | Photo | Screenshot |
|---|---|---|
| PNG | 3,423,844 | 23,973 |
| JPEG, quality 90 | 285,207 | 50,477 |
| WebP, quality 90 | 135,074 | 4,240 |
| WebP, quality 100 (lossless) | 1,968,472 | 1,804 |
The ranking flips. For the photo, JPEG compressed 9,000,000 bytes to 285,207 (about 32 to 1), lossy WebP to 135,074, and PNG to 3,423,844, only about 2.6 to 1, because the grain in a photograph leaves lossless coding little to work with. For the flat screenshot JPEG was the largest at 50,477 bytes, since the sharp edges of text are what lossy coding handles worst, while lossless WebP reached 1,804. This is the split MDN describes: lossless encoding for screenshots, diagrams, logos and line art, lossy for photographs.[1]
Quality settings move the numbers a long way. On the same photo, the Image Compressor measured JPEG at 71,868 bytes for quality 50, 159,658 for 80, 363,531 for 95 and 1,304,212 for 100, so the last five points more than tripled the file. It also matters what is compressed: re-encoding a JPEG usually loses a little more detail, even when the file grows, which is why the best available copy is the better starting point. JPG to PNG makes the same point from the other side: the PNG is an exact copy of the JPG as it looks now, several times larger, and no sharper.
The opposite direction depends on transparency. PNG to JPG paints the picture over a background color, white by default, because a JPG cannot hold see-through pixels. A screenshot that is several megabytes as PNG can drop to a fraction as JPG, though screenshots, diagrams and logos are what JPEG suits least, as the table shows.
Transparency and color depth
An Alpha channel. An extra value stored for each pixel that says how opaque it is, from fully see-through to solid. PNG and WebP can store one; JPEG cannot, which is why transparent areas turn white or black when converting to JPG. Read the guide stores how opaque each pixel is. JPEG has none; PNG has an optional one.[1, 2] WebP supports transparency in both modes: Google puts lossless transparency at a cost of 22% additional bytes and says lossy WebP with transparency is typically 3 times smaller than PNG.[4] GIF can only mark one palette color as fully transparent.
Color depth. The number of bits stored for each pixel's color. 8 bits for each of red, green and blue (24 bits per pixel) allows about 16.7 million colors; an 8-bit indexed image such as a GIF allows at most 256. Read the guide is bits per pixel. A JPEG pixel has three 8-bit channels, 24 bits and about 16.7 million colors. PNG allows samples of 1 to 16 bits, with indexed, greyscale and truecolor modes, so a 16-bit truecolor pixel is 48 bits.[2, 1] A WebP lossy image is built on VP8, which works only on 8-bit YUV 4:2:0 data: every 2 × 2 block of luma pixels shares a single pair of chroma values.[6] That sharing hides well in a photograph, but thin colored lines, small text and pixel art can come out soft or tinted.
PNG to WebP always writes lossy WebP at quality 92 and keeps transparency exactly. Four test PNGs, encoded in Chrome 156:
| Test PNG | PNG | WebP | Change |
|---|---|---|---|
| Photo, 2000 × 1500 | 2,052,270 | 179,446 | 91% smaller |
| Screenshot, 1280 × 800 | 4,593 | 4,086 | 11% smaller |
| Logo on transparency, 600 × 600 | 4,183 | 6,600 | 58% larger |
| Sticker on transparency, 600 × 400 | 2,879 | 4,186 | 45% larger |
The photo shrank far more than Google’s “typically 3 times smaller” figure for lossy WebP with transparency; the icons show the limit, since a PNG of a few kilobytes was already small. The reverse conversion has the mirror-image catch. WebP to JPG fills transparent areas with white before encoding, because without a fill they would come out black.
Browser support
PNG and JPEG are supported in every version of Chrome, Edge, Firefox, Opera and Safari, according to MDN.[1] Basic SVG has been supported since Chrome 4, Firefox 3, Safari 3.2 and Edge 12, per Can I use.[9] WebP, including its lossless, alpha and animation features, arrived later: Chrome 32, Firefox 65, Edge 18, Safari 14 on macOS 11 or later (16 on every supported macOS) and iOS Safari 14.[7] AVIF is newer still, at Chrome 85, Firefox 93, Safari 16.4 and Edge 121.[8]
MDN’s advice for raster images on the web is to prefer WebP or AVIF, which generally compress better than PNG, JPEG and GIF, with a PNG or JPEG fallback in a picture element where older browsers matter; for diagrams, charts and icons it points to SVG.[1] Support in browsers is a separate question from support in other software: email clients, slide decks, print services and upload forms each have their own lists, and that is where converting to JPG or PNG most often comes up.
HEIC on iPhone
HEIF is an ISO standard (ISO/IEC 23008-12, first published in 2017), a container that can hold images coded with HEVC and other codecs and that supports both lossy and lossless storage; HEIC is a subtype.[12] Apple turned it on with iOS 11 and macOS High Sierra. iPhone 7 and later can capture HEIF, and Settings › Camera › Formats chooses between High Efficiency (HEIF and HEVC) and Most Compatible (JPEG and H.264). Apple states that HEIF and HEVC offer better compression than JPEG and H.264 while preserving the same visual quality.[11]
Outside Apple’s software, support is patchier. MDN’s guide to web image formats does not list HEIC; it names HEIF only as the container AVIF uses.[1] The Library of Congress record notes that, as of 2020, Windows 10 support depended on explicitly adding codecs.[12] Apple itself says that when media is shared by AirDrop, Messages or email to a device that does not support the newer formats, it might be sent as JPEG automatically, and that importing over USB to a PC might convert it too.[11]
HEIC to JPG expects a bigger file. On a 2000 × 1500 test photo that macOS saved as HEIC (152,016 bytes), the JPG was 293,519 bytes at quality 90 (1.9 times larger), 147,576 at quality 75 (about the same) and 80,909 at quality 50 (47% smaller). A 12-megapixel iPhone photo has four times the pixels of that test image. HEIC to PNG is further from the original still: 4032 × 3024 is 12,192,768 pixels, about 36.6 MB as raw RGB, and PNG removes only part of it, so the result is tens of megabytes against a HEIC of a few.
Metadata inside a photo
EXIF. Exchangeable image file format: a standard way to record technical details of a photo (camera settings, date and time) inside a JPEG or TIFF file, in extra segments next to the pixel data. Read the guide records the technical details of a shot. The Library of Congress describes the Exif specifications as intended mainly for technical details of digital photography, stored in a JPEG as APP1 and APP2 marker segments beside the compressed pixels, with tags for camera settings.[13] CIPA, which publishes the standard, lists the current edition as Exif Version 3.1.[14] The data can include a location: Apple notes that with Location Services on for the Camera app, the coordinates are embedded in each photo, and people the file is shared with may be able to see them.[15]
WebP and PNG have their own places for the same data, an EXIF chunk in WebP and an eXIf chunk in PNG.[5, 2] Because Metadata. Information stored in a file about the file: in a PDF, fields such as title, author, the program that made it and the creation date; in a photo, the camera settings and capture time. It travels with the file unless something removes it. Read the guide sits beside the pixels, a converter that redraws the picture writes a new file without it, which is how EXIF Remover works: it draws the decoded pixels onto an empty canvas and encodes a new file. In its tests no test value (make and model, capture time, exposure, GPS position, XMP creator, PNG comment) survived in Chrome 156, Firefox 155 or WebKit 26.6. The browsers did add a little technical data of their own, such as a color profile.
Matching format to content
Putting the measurements and the sources together gives the pairings below. They describe what each format suits, not a rule for any particular job.
| Content | Usually suits | Why |
|---|---|---|
| Photographs | JPEG, lossy WebP, HEIC | Lossy coding hides its losses in continuous tone. In testing, 135 to 285 KB against 3.4 MB for PNG. |
| Screenshots, diagrams, line art | PNG, lossless WebP | Sharp edges and text show lossy artifacts. In testing, JPEG was the largest of four encodings. |
| Logos and icons | SVG; otherwise PNG | Vector size follows shape count, not pixels. 181 bytes at any size in the example above. |
| Transparency | PNG, WebP | JPEG has no alpha channel. Small PNGs can already be smaller than lossy WebP. |
| iPhone photos sent to non-Apple software | JPG copy | HEIC support outside Apple’s ecosystem is uneven, and sharing may convert it anyway. |
Questions
Is WebP always smaller than JPEG or PNG?
No. Google reports lossless WebP 26% smaller than PNG and lossy WebP 25-34% smaller than comparable JPEGs at the same SSIM quality index, but those are averages on its test sets. In the GoConvertFiles test the photo was 135,074 bytes as quality-90 WebP against 285,207 as JPEG, while a 600 x 600 transparent logo grew from 4,183 bytes as PNG to 6,600 as lossy WebP.[4]
Why is the JPG copy of a HEIC photo bigger?
Apple says HEIF compresses better than JPEG at the same visual quality, so a JPG of the same picture normally costs more bytes. On a 2000 x 1500 test photo saved as HEIC by macOS (152,016 bytes), a JPG at quality 90 was 293,519 bytes, at quality 75 147,576 bytes and at quality 50 80,909 bytes.[11]
Does converting a JPG to PNG restore lost quality?
No. A JPG has already discarded fine detail, and PNG cannot bring it back. The PNG is an exact copy of the picture as it looks now, stored without further loss, and it is usually several times larger than the JPG, particularly for photographs.[1, 2]
Why does a PNG turn white or black where it was transparent after converting to JPG?
JPEG has no alpha channel, so every pixel has to carry a color. A converter either paints the picture over a chosen background first, white by default in the PNG to JPG tool, or leaves the transparent pixels to whatever color is stored under them, which can come out black.[1]
Does PNG to SVG make a scalable vector?
Not in this tool. It wraps the PNG inside an SVG file as an embedded base64 image, so the picture stays a bitmap and blurs when enlarged. Turning pixels into shapes is called tracing and is a different job. The wrapper adds about a third to the bytes, because base64 writes every 3 bytes as 4 characters.[10]
Is a photo's location stored in the image file?
It can be. Apple's guide to Photos says that when Location Services is on for the Camera app, the coordinates where a photo or video was taken are embedded in it, and people the file is shared with may be able to read them. The EXIF standard defines where that kind of data sits in a JPEG; an EXIF remover that redraws the picture onto a canvas, as this site's does, writes a new file without it.[15, 13]
Sources
Every link below was opened and checked on November 8, 2026. File sizes for photos and screenshots come from the published tests on the tool pages named in the text; the SVG and raster icon sizes were measured for this guide with Pillow 11.3.0.
- MDN, Image file type and format guide. JPEG as the most widely used lossy format and without an alpha channel, PNG as lossless with alpha and 16-bit samples, SVG as drawing commands, the advice to prefer lossless for screenshots, diagrams and line art, WebP and AVIF as better-compressing options with a picture-element fallback, and HEIF mentioned only as the container for AVIF. Accessed November 8, 2026.
- W3C, Portable Network Graphics (PNG) Specification, Third Edition. PNG as a lossless format for static and animated raster images; indexed-color, greyscale and truecolor images with an optional alpha channel and sample depths of 1 to 16 bits; the eXIf chunk. Accessed November 8, 2026.
- ITU-T T.81 (JPEG), W3C copy. The sequential and progressive DCT-based modes (Annexes F and G) and the separate lossless mode (Annex H) the JPEG standard defines. Accessed November 8, 2026.
- Google, WebP overview. Lossless WebP 26% smaller than PNG, lossy WebP 25-34% smaller than comparable JPEGs at an equivalent SSIM index, lossless transparency at a cost of 22% additional bytes, and lossy transparency typically 3 times smaller than PNG. Accessed November 8, 2026.
- RFC 9649, WebP Image Format. Lossy compression with VP8 intra-frame encoding, lossless compression, alpha, animation, and the optional EXIF and XMP chunks. Accessed November 8, 2026.
- RFC 6386, VP8 Data Format and Decoding Guide. VP8 works exclusively on 8-bit YUV 4:2:0 images, where each chroma pixel corresponds to a 2 x 2 block of luma pixels. Accessed November 8, 2026.
- Can I use, WebP image format. Support for WebP, including lossless, alpha and animation: Chrome from 32, Firefox from 65, Edge from 18, Safari from 14 on macOS 11 or later and from 16 on all supported macOS, iOS Safari from 14. Accessed November 8, 2026.
- Can I use, AVIF image format. Support for AVIF: Chrome from 85, Firefox from 93, Safari from 16.4, Edge from 121. Accessed November 8, 2026.
- Can I use, SVG (basic support). Basic SVG support: Chrome from 4, Firefox from 3, Safari from 3.2, Edge from 12. Accessed November 8, 2026.
- W3C, Scalable Vector Graphics (SVG) 2, Introduction. SVG as a language for two-dimensional graphics built from vector shapes, images and text. Accessed November 8, 2026.
- Apple Support, Using HEIF or HEVC media on Apple devices. HEIF compressing better than JPEG at the same visual quality, capture on iPhone 7 and later, the Camera Formats setting (High Efficiency or Most Compatible), and automatic conversion when sharing or importing. Accessed November 8, 2026.
- Library of Congress, High Efficiency Image File (HEIF) Format, MPEG-H Part 12. HEIF as ISO/IEC 23008-12, first published in 2017, a container for images coded with HEVC and other codecs and supporting lossy and lossless storage, with HEIC as a subtype, and the 2020 note on Windows 10 support. Accessed November 8, 2026.
- Library of Congress, Exif Exchangeable Image File Format, Version 2.2. Exif as metadata for the technical details of digital photography, stored in a JPEG as APP1 and APP2 marker segments, with tags for camera settings. Accessed November 8, 2026.
- CIPA, Standards. CIPA DC-008, Exchangeable image file format for digital still cameras: Exif Version 3.1, published 2026-01-30. Accessed November 8, 2026.
- Apple Support, Manage location metadata in Photos. Camera coordinates embedded in each photo and video, and the fact that people a file is shared with may be able to access them. Accessed November 8, 2026.