What is the SVG to JSON Converter?
SVG is XML, and XML is awkward to work with in code. A JSON tree is easy to loop over, search and change. Paste your SVG and get every element, attribute and child in JSON.
Choose a full tree with name, attributes and children, or a short form. You can turn attribute names into camelCase, numbers into real numbers, and inline styles into objects.
How to use it
- Paste your SVG code, or open an .svg file.
- Pick the JSON shape and the options.
- Copy the JSON and use it in your code.
Why people like this tool
Full tree
Elements, attributes and children.
Short form
A smaller tag, attrs, children shape.
Real values
Numbers and style objects, if you like.
Cleans up
Drops metadata and editor tags.