WebP to SVG: Trace a WebP into Editable Paths

A WebP can be lossy (VP8), lossless (VP8L) or extended (VP8X, with an alpha plane and possibly an animation), and which one you have changes how a trace behaves. This page reads the container first and reports the codec, the alpha plane and the frame count — then turns the pixels into one <path> per colour. Everything runs in the tab.

VP8 / VP8L / VP8XAlpha kept as holes4–24 coloursNo upload

1. Drop a WebP

parsed in this tab
Drop a .webp here
or
No image loaded yet — drop a WebP, or start from the sample.

2. Tracing

applies on change
Preset
Colours
Alpha
Detail5
Smoothing6
Decimalspath precision

3. Preview & export

—
Load a WebP to trace it
One <path> per colour with fill-rule="evenodd", so a hole in a letter stays a hole.

A WebP is three formats wearing one extension: a lossy bitstream (VP8), a lossless one (VP8L), and an extended container (VP8X) that carries an alpha plane, an animation or both. That matters before a single pixel is traced, because transparency changes what a trace should do and lossy prediction noise changes how much clean-up it needs. This page parses the RIFF chunks, reports which of the three you have, and only then quantises and traces.

What the container says before the pixels are read

The first twelve bytes are RIFF, a length and WEBP; the next four name the first chunk, and that name is the codec. Reading it takes microseconds and tells the tracer more than any pixel statistic can:

ChunkWhat it meansWhat the tracer does about it
VP8 Lossy, one frame, no alpha planeDenoise 1 px before quantising; edges carry prediction smear
VP8LLossless, so the pixels are exactly what was encodedNo denoise needed: every flat area really is flat
VP8XExtended container: flags declare alpha (bit 4) and animation (bit 1), then the canvas sizeKeep alpha when declared; report the frame count when animated

Canvas size is worth checking against the decoded size. A VP8X file may declare a canvas larger than the frame it contains, which is how animations place frames; the tool traces the decoded pixels and reports the canvas separately, so a file that looks cropped in another converter explains itself here.

Alpha is usually the reason to convert a WebP, not the colour

Most WebP artwork on the web is a PNG that was re-encoded for weight, and the alpha plane survived. Tracing that file is straightforward if the transparency survives the trace — a tracer that ignores alpha will happily trace the RGB values sitting under the transparent pixels, which are usually black, and you get a black rectangle behind your mark. Here the alpha plane reaches the tracer as a mask, thresholded at half opacity: a pixel is either painted or it is not, because an SVG fill has no partial coverage. That threshold is also what removes the fringe a lossy WebP leaves along an alpha edge — semi-transparent RGB values that a naive trace turns into a pale outline hugging the mark on every side.

Three modes, and the choice is not cosmetic:

A 600 by 400 WebP badge with an alpha plane shown beside the traced SVG, with the codec, alpha flag, fill, ring and node counts measured by the tool
The same artwork as a lossy WebP and as a trace: 5 fills, 11 rings, 213 nodes, 6.3 KB, with the alpha plane turned into empty space instead of a fill. · swipe to see it all

Lossy WebP noise does not look like JPEG noise

JPEG compresses 8×8 blocks with a DCT, and its signature artefact is a ripple around every hard edge. VP8 predicts each block from its neighbours and codes the residual, so the artefacts are different in kind: edges smear along their direction, small text loses its counters, and flat panels drift by a few levels across the frame instead of showing a halo. For tracing, the practical difference is that a lossy WebP usually needs a lighter denoise than a JPEG of the same visual quality, but it needs the majority filter just as much.

That is what the three presets encode. Icon assumes flat colour and few regions: 4 colours, detail 7, smoothing 8. Flat art is the default middle: 8 colours, detail 5, smoothing 6. Photo goes to 16 colours with detail 4 and smoothing 4, which keeps more gradient bands and accepts the file size that follows. The sliders stay live after a preset, so the preset is a starting point rather than a mode.

Choosing a colour count

Colour count is the lever with the largest effect on both file size and fidelity, and it is not linear. Measured on the 600×400 badge above (a 5.2 KB lossy WebP at quality 88) at the default detail and smoothing:

ColoursSVG sizeRingsNodesWhere it fits
44.5 KB11156Two-tone marks, stencils, single-colour cutting
86.3 KB11213Flat illustration, UI icons, badges
1613.7 KB29536Artwork with gradients worth keeping as bands

On the badge above, the four-colour trace comes to 4.5 KB against 5.2 KB of WebP and the eight-colour one to 6.3 KB — the same order of magnitude, which is the honest way to read it. The gain is not bytes, it is behaviour: the SVG stays sharp at any size and the WebP does not. For anything photographic the SVG lands several times larger, and the advice is that a photograph does not want to be a vector at all: past sixteen colours you are storing a mosaic, not a drawing.

Animated WebP: frame one, and why

If the VP8X flags declare animation, the tool says so and traces the first frame. A frame picker was left out deliberately: an animation is a sequence of near-identical images, and what people actually want from an animated WebP is one still — a logo, a badge, a favicon. If you need a later frame, export it as a still WebP from your editor and drop that in; you get an exact trace of the frame you meant instead of a guess.

After the trace

The output is a plain SVG with no embedded bitmap, so the usual next steps apply: flatten the palette to the single colour a cutter wants with SVG Color Changer, trim the margin with SVG Crop, Flip & Rotate, shrink the path data with SVG Compressor, and confirm the export kept its viewBox with SVG Validator. If the source is a GIF with its own colour table, GIF to SVG keeps those exact colours instead of guessing a palette; if it is an icon container, ICO to SVG lets you choose which embedded size to trace.

Frequently asked questions

Does a WebP keep its transparency when it becomes an SVG?

Yes, if Alpha stays on Keep. A WebP stores transparency as an alpha plane in a VP8X chunk or an ALPH chunk before the lossy bitstream; the canvas hands that mask to the tracer, which skips transparent pixels instead of tracing them. The output has holes rather than a white rectangle behind the artwork.

Is lossy WebP cleaner than a JPEG for tracing?

Somewhat. VP8 predicts in 4×4 and 16×16 blocks instead of an 8×8 DCT, so it rings less at the same visual quality, but it still smears colour and still blurs small detail. At quality 75, flat artwork in either format needs a 1 px denoise before the contour pass.

What happens to an animated WebP?

The tool reports how many frames the container declares and traces the first frame. There is no frame picker by design: what people want from an animation is one still. Export the frame you want from your editor as a still WebP and trace that instead.

How many colours should I use?

Four for a two-tone mark, six to eight for flat illustration, sixteen when gradients matter. Above sixteen the file grows faster than the fidelity does, because extra colours mostly re-cut regions that already exist.

Is the WebP uploaded to a server?

No. The bytes are read with FileReader, the RIFF chunks are parsed in the tab and the pixels are painted onto a canvas there. There is no upload endpoint and no external script; disconnect the network and it keeps working.

Related SVG workflows

More free SVG tools