Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

How can I convert SVG image to something raster? Are there any native [command-line] tools on OS X that can do that? I am able to open them in Safari or Firefox, but doing "Save as..." only proposes original (.svg) or web-archive formats. No rasterized image format.

share|improve this question

5 Answers 5

up vote 4 down vote accepted

You can do this with Inkscape:

/Applications/Inkscape.app/Contents/Resources/script --without-gui --export-png=raster-image.png  source-image.svg

To change output resolution you can set the DPI value:

/Applications/Inkscape.app/Contents/Resources/script --without-gui --export-png=raster-image.png --export-dpi=200  source-image.svg

Here are more command line options.

share|improve this answer

One (wonky) option would be to render it in Safari and take a screenshot of the result, although that's obviously not a good solution.

Sadly there's little SVG support in OS X so far apart from Safari, Preview.app (the obvious choice for image format conversion) can't render it and I'm not aware of any bundled command line tools that can either.

As for third party command line tools, Homebrew makes Cairo's svg2png as well as the ImageMagick bundle easily available.

share|improve this answer

Try Gapplin. It works for me and creates PNG and JPG files from SVG. Simple and effective.

If you have a lot of SVG files to convert, ImageMagick is probably your best bet.

share|improve this answer

https://cloudconvert.org/svg-to-png - was fastest way for me.
it's not my site.

share|improve this answer
It's not native though... –  patrix Sep 5 '14 at 14:00
Absolutely native. Works in any browser and solves the problem. Sure this answer will be useful for somebody. –  OZ_ Sep 5 '14 at 18:53

Being useful doesn't make it native though. It's a web-tool, not a native-Mac converter application/utility/command-line-tool/script.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.