Converter

Before you convert your SVG, please check the following things

  • width and height are required attributes on the <svg /> element.
  • The SVG is assumed to have a viewBox origin of 0 0 and uses the given width and height as the viewBox maximum values.
  • Only <path /> elements will be converted to JSON.
  • id and d attributes are required on all path elements and the id must be unique for each path.
  • A title attribute on a path element will be used as the layers name field. If no title is present, the id will be capitalized and used.

If your file doesn't meet these requirements then the output may be unexpected or incorrect 😉

Example SVG

<svg width="100" height="100">
  <path id="region-1" title="Awesome Region" d="..." />
  <path id="region-2" title="Some Other Area" d="..." />
  <path id="region-3" title="Another Location" d="..." />
</svg>

Add your SVG file