# Converting from SVG Use the SVG functions when another tool has already produced the vector image. VlConvert converts it to PNG, JPEG, or PDF without running Vega. The SVG must declare its size through `width` and `height` attributes or a `viewBox`. Fonts and images it references must be available to the rendering process. See {doc}`fonts` and {doc}`security` when the SVG is not self-contained. Save this SVG document: :::{dropdown} chart.svg :open: ```{literalinclude} /_examples/svg-demo.svg :language: xml ``` ::: Send JSON with the markup in an `svg` string to `/svg/png`, `/svg/jpeg`, or `/svg/pdf`. Save this complete request as `request.json`: :::{dropdown} request.json :open: ```{literalinclude} /_generated/requests/svg-png.json :language: json ``` ::: ```console $ curl http://127.0.0.1:3000/svg/png \ > -H 'Content-Type: application/json' \ > --data-binary @request.json \ > --output chart.png ``` The PNG conversion preserves the shapes and colors in the SVG document: ```{vl-chart} /_examples/svg-demo.svg :input-kind: svg :format: png :scale: 2 :alt: A blue circle, orange triangle, and green square on a pale background ``` See {doc}`image-quality` for the `scale`, `ppi`, and `quality` options.