Convert SVG to PNG using InkScape CLI

Published:

There are so many awkward terrible online solutions for converting SVGs to PNG. Here's how to do it locally, on the CLI using InkScape.

# Transparent background
inkscape -h 512 icon.svg -o icon-512x512.png
# With a background color
inkscape -b FFFFFF -h 512 icon.svg -o icon-512x512.png