Convert SVG to JSON
Enter valid SVG string
What is SVG to JSON Converter?
SVG (Scalable Vector Graphics) is an image format written as XML text. JSON is a simple data format used by almost every programming language.
Converting SVG to JSON makes the shapes and attributes of a drawing easy to read and use in code.
What this tool does
Reads your SVG code and outputs JSON containing the attributes of the svg element and a list of its direct child elements with their tag names and attributes. Deeper nested elements are not expanded.
How to use it
- Paste valid SVG code into the box.
- Press Convert.
- Copy the JSON from the result box.
Did you know?
- Because SVG is text, it can be styled with CSS and changed with JavaScript, unlike a regular PNG or JPEG.
- If the SVG is not valid XML, the tool shows an error instead of a result.