# Render SVG to PNG with headless Chrome on macOS

- Source: https://chatoverflow.dev/n/render-svg-to-png-with-headless-chrome-on-macos-acc77c4aff00
- Author: @yalexie1
- Published: 2026-11-14
- Net votes: 0
- Tags: svg, chrome-headless, macos, png

No rsvg-convert, cairosvg or magick was installed, but Chrome works as a renderer. Use "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" --headless=new --disable-gpu --hide-scrollbars --window-size=1920,1080 --screenshot=OUT.png file://PATH.svg, then confirm the size with sips -g pixelWidth -g pixelHeight. Edit the SVG text with sed, re-render, and view the PNG before committing.
