Batch-convert SVG logos to PNG
How to bulk-convert SVG logo files to PNG: choosing a renderer, setting size and transparency, handling fonts and embedded images, and checking the output.
Contents
- The short answer
- What an SVG contains, and why it matters for conversion
- Choosing a converter
- How to batch-convert SVG logos to PNG
- What you need before starting
- Step 1: Preflight the source files
- Step 2: Run the batch conversion
- Step 3: Export several sizes in one pass (optional)
- Settings that affect the result
- Step 4: Inspect the output
- Rights and usage
- Gaps in this guidance
The short answer
To convert many SVG logos to PNG at once, use a command-line SVG renderer such as Inkscape, rsvg-convert (from the librsvg project) or ImageMagick, and run it in a loop over a folder of files. Each SVG is rendered to a raster image at a pixel size you specify. Because SVG is resolution-independent, set the output width or height for your intended use instead of relying on the file's default dimensions.
Conversion goes one way. A PNG is a fixed grid of pixels: it keeps the logo's appearance at the chosen size, but it holds no editable paths, live text or scalable geometry. Keep the original SVGs as the source artwork and treat the PNGs as derived delivery files.
What an SVG contains, and why it matters for conversion
An SVG file can hold several kinds of content, and each one converts differently. The .svg extension alone does not tell you which kinds are present, so check the file before you assume it is clean vector artwork.
| Content in the SVG | What happens when rendered to PNG |
| Vector paths and shapes | Rendered sharply at any output size you choose |
| Live text elements | Rendered with whatever font the converting machine has; a missing font is replaced by a substitute, which changes the logo's appearance |
| Embedded raster images (image elements with inline data) | Resampled to the output size; they gain no detail, so they can look soft or pixelated at large sizes |
| Linked external images | Rendered only if the referenced file can be found from the conversion environment; otherwise they may be missing |
| Filters, masks, blend effects | Support varies by renderer, so results may differ between tools |
Some files sold or shared as SVG logos are mostly a single embedded bitmap with a thin SVG wrapper. Converting such a file to PNG cannot improve its quality beyond that of the bitmap inside it.
Choosing a converter
All three tools below are free and documented to accept SVG input and write PNG output from the command line. The notes on strengths are editorial judgments rather than measured comparisons; no benchmark or test data was available for this article.
| Tool | Documented capability | Editorial note |
| Inkscape (command line) | Exports SVG to PNG with options for width, height, DPI, background color and opacity, and export area (page or drawing) | A good choice when logos were made in Inkscape or use features other renderers handle inconsistently; slower to start up per file |
| rsvg-convert | Renders SVG to PNG with options for width, height, zoom and background color | Lightweight and well suited to simple, scripted batch jobs |
| ImageMagick (magick / mogrify) | Converts many formats in bulk, including SVG to PNG, with density and background options | Convenient for mixed-format folders, but SVG rendering depends on which delegate library it is built with, so check output closely |
How to batch-convert SVG logos to PNG
What you need before starting
- A folder holding only the SVG files you want to convert, with a copy of the originals kept separately
- One installed converter (Inkscape, rsvg-convert or ImageMagick)
- The target pixel dimensions for each use, such as a website header, social profile image or presentation slide
- A decision on background: transparent or a solid color
- Any brand fonts the logos use as live text, installed on the converting machine, or a version of the artwork with text converted to outlines
- Confirmation that you are permitted to make these derivative files (see the rights section below)
Step 1: Preflight the source files
Find files that contain live text or embedded images, because these are the most common cause of disappointing output. On macOS or Linux, a quick text search lists them:
# Files with live text (fonts must be available, or outline the text first)
grep -l "<text" *.svg
# Files containing raster images (embedded or linked)
grep -l "<image" *.svg
For files with live text, either install the exact fonts or open the artwork in a vector editor and convert the text to outlines, saving that as a separate file. For files with embedded images, make sure your output size does not go well beyond the resolution of the image inside, or ask for a fully vector version of the logo.
Step 2: Run the batch conversion
The examples below write PNGs into a separate folder and keep each original file name. The width of 1024 pixels is a placeholder; replace it with the size you need. Height scales in proportion when only width is given.
# rsvg-convert: transparent background is kept by default
mkdir -p png
for f in *.svg; do
rsvg-convert -w 1024 -o "png/${f%.svg}.png" "$f"
done
# Inkscape 1.x: --export-area-drawing crops to the artwork instead of the page
mkdir -p png
for f in *.svg; do
inkscape "$f" --export-type=png --export-width=1024 \
--export-area-drawing --export-filename="png/${f%.svg}.png"
done
# ImageMagick: convert every SVG in the folder, keeping transparency
mkdir -p png
magick mogrify -path png -background none -density 300 -format png *.svg
With ImageMagick, the density value sets the resolution at which the SVG is rasterized, so it affects both sharpness and final pixel size. Add a resize option if you need exact dimensions. The density shown is an example, not a recommendation.
Step 3: Export several sizes in one pass (optional)
If you deliver a logo set at more than one size, nest a second loop. Exporting each size directly from the SVG gives sharper results than scaling down a large PNG.
for size in 256 512 1024; do
mkdir -p "png/$size"
for f in *.svg; do
rsvg-convert -w "$size" -o "png/$size/${f%.svg}.png" "$f"
done
done
Settings that affect the result
- Size: set pixel width or height explicitly. An SVG's own width and height attributes may be small or absent, so default output can be tiny or unexpected.
- Background: PNG supports transparency. Keep it for logos placed over varied backgrounds; add a solid color (for example, rsvg-convert -b white, or Inkscape --export-background with --export-background-opacity=1) when the destination does not handle transparency well.
- Export area: a page-sized export keeps any padding drawn into the artboard; a drawing-sized export crops tightly to the artwork. Choose based on whether the logo's built-in clear space should be preserved.
- Color: SVG colors are defined for screen display, and PNG output is suitable for digital use. PNG is not a substitute for print-ready files that need specific color profiles or spot colors.
- File names: keep a consistent pattern, such as including the size or background variant, so recipients can tell files apart.
Step 4: Inspect the output
- Open a sample of PNGs at full size and compare them with the SVG originals in a browser or vector editor.
- Check that lettering matches the brand typeface; unexpected letterforms usually mean a font was substituted.
- Look for missing elements, which can mean a linked image was not found or a filter was not supported.
- Place transparent PNGs on both light and dark backgrounds to catch stray white boxes or rough edges.
- Confirm pixel dimensions match the target for each use.
- Check that the number of output files matches the number of inputs, and look for files that failed silently or came out as blank images.
Rights and usage
Converting a file does not change what you are allowed to do with it. Permission to download a logo, for example from a press kit, does not by itself grant permission to modify it, use its fonts outside the license, or use the trademark in any context. If you are producing PNGs of logos you do not own, check the brand's usage guidelines and the licenses for any fonts involved.
Gaps in this guidance
No subject-specific evidence was supplied for this article, so it includes no tool version numbers, speed comparisons, rendering-accuracy tests or recommended output sizes for particular platforms. Command options reflect each tool's documented interface in general terms; check them against the help output of the version you have installed, since options have changed between major releases, notably in Inkscape.