To convert a transparent PNG to WebP on Mac, use Google’s cwebp with the -lossless option and a new output filename. Open the WebP in the destination you plan to use, and decode a separate check copy with dwebp when you need to verify the transparency and pixel dimensions independently.
Choose a source with an observable transparent edge
Start with a single PNG you can verify easily, such as a logo with a transparent background around a colored letter or a diagram with soft transparent edges. Open it from Finder in Preview and look at what lies outside the visible shape. A transparent area can look white against an app’s default canvas. Look for evidence from an image inspector or check the image over a colored backdrop when the distinction matters. Keep an original PNG available for comparison.
This guide uses the official WebP command-line tools on macOS. Install a compatible package from the WebP team’s precompiled utilities page, and use cwebp -version and dwebp -version to check that your shell can run the commands. If you keep the tools in an extracted folder that is outside your shell’s command path, use each program’s actual path or run it from its folder. The commands below assume both tools can be reached by name. Google’s getting-started guide also explains the command-line conversion and viewing options. Google’s WebP getting-started guide
Put a copy of the source in a working folder. Choose a distinct destination filename and create a location for the final WebP. If you already have a WebP with the intended filename, choose a new name or a fresh folder to keep the earlier result available. Plan the final file based on what the receiving website or app accepts. An image can be correct in one local viewer and still be disallowed by a particular upload form or workflow.
Encode a lossless WebP from the PNG
Move to the working folder in Terminal and enter the following command. Here logo-source.png is the file you are converting, and logo-delivery.webp is a new file in the same folder.
cwebp -lossless "logo-source.png" -o "logo-delivery.webp"
The input remains a PNG. The output is a separate WebP. The -lossless option is useful for graphics where you want to preserve the visible colors and edges closely and maintain transparency. Google’s tool documentation distinguishes this from its lossy mode and describes which pixel values may be changed under completely transparent areas. Google’s cwebp options
For a particular workflow that requires preserving the invisible colors under fully transparent pixels as well, use the documented -exact option with lossless encoding. For example, someone who intends to process the RGB channels before restoring alpha may care about the values under an invisible pixel. For straightforward display on a web page, the visible effect of that fully transparent area is the practical check. An alpha edge with partially visible pixels is a different case and should be inspected against more than one background.
Check the terminal result and open the folder to confirm the new output exists. If the input filename contains spaces, keep the quotes around it. If cwebp cannot decode the file, open the exact source in Preview and confirm that it is a valid still PNG. A filename extension is a clue, and the file also needs to contain valid image data. Use an ordinary still PNG for the rehearsal so you do not have to diagnose a different source format or artistic feature at the same time.
Verify transparency and dimensions with a separate decode
Use dwebp to decode a separate PNG you can compare with the original. Keep this check file separate from both the source and the actual WebP.
dwebp "logo-delivery.webp" -o "logo-check-decoded.png"
The WebP team’s decoder supports PNG output and other formats. The PNG gives you a file you can inspect with normal macOS image tools. Use a new filename and check that you opened the decoded file, not the original. The output expected after this check is three files with distinct purposes: the source PNG, the deliverable WebP, and the decoded PNG for review. Google’s dwebp documentation
Open the source and the decoded PNG in Preview. Use the Inspector to compare pixel width and height. A 640 by 400 source should remain 640 by 400 because the command did not request cropping or resizing. Inspect the foreground object, then check the edge where the color meets the transparent area. A missing outline, solid backdrop outside the object, or unexpected edge color is a reason to inspect the conversion and the source again. Contrast helps: a gray fringe can be hard to see against white and much easier to spot against a darker background. Apple’s Preview image Inspector guide
If you can open the deliverable WebP in the site, app, or browser that will actually display it, verify it directly there. For an image used on a web page, compare its appearance over the actual page’s background. Do a second local check against a distinctly different background if a semi-transparent edge matters. The decoded PNG supports one part of the verification. The exact WebP on the destination tests whether the receiving software accepts and displays the expected file.
Work through an example with two kinds of transparency
Suppose a source contains a solid blue letter, a faint blurred shadow around it, and completely transparent corners. Before encoding, list the expected opaque blue letters, the shadow blending into the background, and the visible background color in the corner. Verify those three properties at separate positions inside the letter, shadow, and corner. Repeat the outline check over a light background and a dark background if the asset can be used in both modes.
Look at the image at its intended size and zoom in to inspect the edge if necessary. A view scaled down by a browser can conceal a thin fringe. A high-zoom view alone can exaggerate small interpolated edges that are unobtrusive at the displayed size. Together, the two views show whether the picture works in context and whether an unexpected edge entered the asset during conversion or was already in the source.
If the receiving site displays the asset on an opaque white canvas, that alone cannot establish whether the file lost transparency. Confirm the decoded copy independently and check the file in an app or page that lets the actual alpha show against a distinct color. If the transparent areas are still present locally but the site replaces them, examine the site’s own conversion or upload requirements before transferring more files.
Compare the final file size with the actual limit
Use Finder’s Get Info to check the size of the WebP you plan to send. A WebP can be smaller than the original PNG, depending on what it contains and the settings. Some assets already have very efficient compression. Treat the sizes you actually see as the decision input. A destination that requires, for example, no more than 150 KB also needs a file-size check in addition to the transparency test.
If the lossless WebP is larger than the budget, decide whether a reduced pixel size meets the destination’s dimension requirement. A logo printed across a large page and an icon displayed at 64 pixels have different detail requirements. Keep the larger master and experiment with a separate derivative. You can also compare a lossy WebP at a documented setting, then recheck the appearance, alpha, and file size. A file that meets the storage requirement but visibly degrades its edges still needs a different source or setting. Google’s WebP format overview
If the final result fits the budget and displays correctly, keep the source PNG and use the checked WebP in the intended workflow. Keep the decoded check copy in your working folder until any handoff review is finished. For delivery that requires standard JPEG and starts with photos in HEIC format, see the separate HEIC-to-JPG workflow.
Inspect the same image on two explicit backgrounds
If the asset will appear over more than one background, put both the PNG and WebP into a small local comparison page. Save an HTML file in the same folder with two horizontal rows. In each row display the same two filenames as images, and give the first row a white background and the second row a strong contrasting color. Open the HTML in the browser you will use to inspect the delivery. A regular image element can load neighboring files in this simple local comparison. Browser policy can differ for scripts or remote resources, so leave those out of this check.
For a small icon, display both copies at their intended sizes using equal width and height constraints that maintain their aspect ratio. You are looking for the same edge and alpha behavior, not comparing two different scales. A gray patch that stays visible over both colors may be an opaque part of the source. A translucent shadow can take on different color appearances as the background changes. Verify which behavior belongs to the original. If the original already has an unwanted patch, edit the original PNG before making another WebP. Compression settings will not fix a source alpha mask.
Use this check on a graphic with an awkward edge, such as a diagonal white line with a shadow. If the WebP looks fine on the light background but shows a vivid halo on dark, compare the halo’s location in the original and decoded PNG. A difference in how several pixels were blended can become obvious there. If both files behave the same in your browser but the receiving editor changes the edge, use the editor’s actual preview or export as the next check. Choose the delivery version after you see how the receiving editor actually renders it.
Decide what to keep for later editing
A source PNG, a delivery WebP, and a decoded inspection PNG can look interchangeable in Finder if the extensions are hidden. Use names that describe their purpose. Keep the original PNG as your source for future changes, particularly if the graphic has formal colors, alpha values, or a separate editable project. Keep the decoded check copy with the conversion notes while you need the evidence. Use the final WebP when the receiver specifically wants that format. The fact that a decode produced a PNG simply shows one way to inspect the WebP and does not give it the original file’s history.
If you are converting a set, rehearse with a deliberately difficult image before repeating the recipe. A file with only flat opaque areas cannot test transparency. A finished sample should contain the kinds of edges, gradients, and transparency that appear in the rest of the set. When a single image differs, keep its source, exact encoder settings, and decoded result together during troubleshooting. That makes it possible to rerun that one image without discarding or re-encoding derivatives that already meet the requirement.
Compare lossless and lossy versions of the same transparent graphic
Suppose a product catalog needs a 640 by 400 illustration with a soft shadow, transparent outside the product, and a fixed byte limit. Start with the lossless export, then make an alternate candidate using lossy RGB compression and lossless alpha. Google’s encoder documents that an alpha quality of 100 preserves alpha in lossless form when using the lossy color mode. The color channels can still change. Leave both output files available so you can compare appearance independently of the file extension. Google’s alpha quality and color encoding options
cwebp -lossless "catalog-source.png" -o "catalog-lossless.webp"
cwebp -q 90 -alpha_q 100 "catalog-source.png" -o "catalog-compact.webp"
dwebp "catalog-lossless.webp" -o "check-lossless.png"
dwebp "catalog-compact.webp" -o "check-compact.png"
Inspect a four-piece comparison. Look at a fully opaque highlight on the product, a line only a few pixels wide, the middle of the translucent shadow, and the empty area beyond the shadow. In both candidates the intended background should be visible in that empty area. The shadow should retain its planned outline. The compact option may show a color or texture difference along the product, even if the shadow’s alpha values were preserved. This is a reason to judge opacity and visible color separately.
Measure the byte size for both WebP files and record whether each is below the receiver’s actual limit. Keep the maximum size in bytes if the specification gives it that way. If the limit is 150,000 bytes, a result of 150,001 falls outside that particular rule even though the rounded Finder label looks close. If only the compact file passes, use it when its visible comparison also passes. If neither passes, confirm whether the receiver allows reduced pixel dimensions. Prepare a smaller new derivative only after that choice is clear, then repeat both comparisons at the intended display scale.
For a logo with thin saturated text and a photo with a transparent cutout, the best decision can differ even at the same dimensions. Compare representative images before changing a whole folder. The logo may show a color fringe immediately. The photo may preserve the look of its textured surface at a smaller size. Test the approved option on the exact type of graphic it will be used for, recording the output dimensions, actual bytes, and the visual checks where defects were most apparent.
Check embedded color when the destination depends on it
An alpha check says whether part of the background shows through. Color management gives a different result to verify. If the source PNG is tagged with an ICC profile and the receiver reads embedded profiles, preserve that profile deliberately when it is required. The encoder copies no metadata by default and supports choosing ICC separately from EXIF or XMP. Confirm that the supplied image contains the expected profile first, using the source inspector or the export controls of the tool that created it. Google’s metadata copying options
cwebp -lossless -metadata icc "catalog-source.png" -o "catalog-with-profile.webp"
webpmux -info "catalog-with-profile.webp"
Obtain the matching WebP team’s utilities if your installation only has the encoder and decoder. The muxing tool reports what is present in the created WebP. Check whether the report identifies an ICC profile and whether the canvas dimensions are correct. If you need the embedded bytes for authorized comparison, extract the ICC chunk to a separate file. A missing chunk can mean that the source had no suitable profile or that the source and encoder setup did not provide it. Resolve that question at the source before trying to assign a different profile from a different image. Google’s WebP muxing and inspection commands
webpmux -get icc "catalog-with-profile.webp" -o "check-catalog.icc"
Now open the profiled candidate in the destination browser or editor and compare it against the same profiled source. Use the same display, background, and scale. Inspect one known brand color and a subtler area where a change would be easy to miss. A reported profile shows that a chunk exists. Appearance in the receiving app determines whether this use of that profile gives the expected result. If the receiver instructs you to use a particular color space, use its stated export specification and verify the actual rendition.
Some workflows need to re-edit the artwork, including colors that sit beneath fully transparent pixels. Lossless WebP’s default can change those invisible RGB values. Google’s encoder offers -exact to preserve them, and they may matter in a downstream editor which reveals or moves the alpha mask. Test that requirement in the actual editor with a practice graphic where an invisible pixel has a known color. The normal on-background visual inspection cannot establish those hidden values. The most straightforward editable master remains the original image or source project you retained. Google’s explanation of preserving RGB behind transparency
Verify the receiver’s copy when it processes images again
Some asset workflows accept the WebP as uploaded, while others create additional renderings or transform the uploaded image before showing it. For an authorized preview, use a harmless test image that clearly reveals such behavior. Place a hollow bright circle on a transparent canvas, add a soft shadow, then check the native WebP’s decoded PNG. Upload only to the intended test area when that is part of your work. Check the actual preview over a dark background and inspect the image the recipient displays if the interface lets you retrieve that copy.
If the local candidate passes and the receiver shows a solid rectangle behind the circle, find out whether the site converted it, whether its background color merely looks like an opaque fill, and whether an overlay hides the actual edge. Try the same test over a second allowed background. If you can download the processed asset, check its actual format and open it separately. A pipeline that serves a flattened copy may require a different image setting or a conversation with the destination owner. Retain the good local WebP while that choice is resolved.
Finally, identify whether your source is meant to move. An ordinary static PNG logo and an animated asset have different acceptance criteria. This walkthrough delivers a single transparent frame. If the source is an animation, compare its actual frames and timing in the intended player and use a documented animation workflow that creates and verifies each required frame. Selecting one usable static still is reasonable when the brief calls for it. It should be identified as the agreed still instead of passing it off as a timed asset.
For a production batch where each image is delivered on both a light and a dark theme, write down those themes by their actual background colors or approved names. Identify the edge, mark, or line you checked on each. If the web team later changes the background, that record shows exactly which image area to review again. This distinction matters especially for nearly white graphics, where a light preview can hide a missing outline that a dark theme would immediately reveal.