AVIF to SVG Crop Converter

Load an AVIF image, drag the crop handles to define exactly the area you need, preview the result, then download an SVG file. Everything runs in your browser — your image never leaves your device.

🖼️

Drop an AVIF here

or Browse Files  ·  AVIF supported

What This Tool Does

This tool loads an AVIF image directly in your browser, presents an interactive crop overlay with draggable handles, and converts the selected area to an SVG file. No server upload is required. The full workflow — loading, cropping, encoding — runs entirely in client-side JavaScript using the HTML5 Canvas API. AVIF files use AV1 compression that requires full pixel decoding before the canvas can draw them; this tool uses URL.createObjectURL() combined with img.decode() to guarantee the decode is complete before drawing, preventing the silent blank-canvas problem that affects standard Image element loading with AVIF. The output SVG embeds the cropped image as a base64-encoded PNG inside an SVG <image> element, preserving transparency and producing a file that opens in every browser, vector editor, and SVG-aware application.

Who This Is For

  • Web developers who have AVIF source artwork and need a cropped region wrapped in SVG for clean HTML embedding
  • Designers preparing cropped AVIF assets for Figma, Inkscape, or Illustrator workflows that prefer SVG input
  • Anyone converting a specific region of an AVIF photo to SVG without installing a vector editor
  • Developers who need a quick crop-and-convert workflow that stays entirely in the browser

AVIF vs SVG: Format Comparison

PropertyAVIFSVG
Format typeRaster (pixels)Vector (XML-based)
ScalabilityFixed resolution — degrades when enlargedInfinite — scales without quality loss
CompressionLossy or lossless (AV1)Embeds raster data as base64
Transparency supportYes (full alpha)Yes (32-bit RGBA when embedding PNG)
Browser supportChrome 85+, Firefox 93+, Safari 16+Universal — all browsers
CSS/JS manipulationLimitedFull — style and animate SVG elements
File sizeVery smallLarger (base64 overhead ~33%)
Best forWeb delivery, high-quality photosWeb embedding, vector tools, HTML docs

Frequently Asked Questions

Why does this tool use img.decode() instead of the standard Image element?
AVIF uses AV1 video codec compression that requires asynchronous GPU-accelerated decoding. When you load an AVIF with new Image() and FileReader.readAsDataURL(), the browser fires the onload event before the AV1 pixel decoding completes. Calling ctx.drawImage() at that point silently draws a blank canvas — no error, no warning, just empty output. img.decode() is a method on the HTML Image element that returns a Promise which resolves only after the complete pixel decode is ready, so the canvas always receives real pixel data.
What does the output SVG file actually contain?
The output SVG is an XML document with an <svg> root element sized to the crop dimensions. Inside is a single <image> element referencing the cropped pixel data as a base64-encoded PNG data URI. The PNG encoding preserves transparency. The SVG can be opened in any browser or vector editor, and the image inside it scales with the SVG viewport.
How precise is the crop tool?
The crop operates at native pixel accuracy on the original AVIF dimensions. The canvas is scaled to fit your screen for display, but the actual crop coordinates are mapped back to the full-resolution image before the SVG is generated. You get an SVG at the exact pixel dimensions shown in the crop dimensions badge.
What browsers support AVIF?
AVIF is supported in Chrome 85+, Firefox 93+, Edge 121+, and Safari 16+. Older browsers do not support AVIF. If your source file does not load, verify your browser is up to date.
Is there a file size limit?
There is no server-imposed limit because no upload occurs. The practical limit is your browser's available RAM. Most modern desktops handle AVIF files comfortably. Very large files on memory-constrained mobile devices may be slower to process.
Why is the SVG output larger than the source AVIF?
The SVG embeds the cropped image data as a base64-encoded PNG. Base64 encoding adds approximately 33% overhead compared to raw binary. Additionally, PNG is a lossless format that is typically larger than AVIF for equivalent image content. The SVG wrapper itself adds minimal size. The tradeoff is universal browser support and full compatibility with SVG editors.