0

I have an SVG file called gear.svg with the following contents:

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 56 56"><defs/><path d="M25.45 14.84a.67.67 0 01.49.14.69.69 0 01.24.45.66.66 0 01-.48.71 13.09 13.09 0 00-9.36 9.38.77.77 0 01-.94.54.76.76 0 01-.55-.83 12.19 12.19 0 0110.6-10.39zm-5.54 10a8.36 8.36 0 019.62-5.38 8.3 8.3 0 014.29 13.91l-.08.07a.68.68 0 01-.92-1 6.84 6.84 0 00.26-8.81 6.64 6.64 0 00-11.44 1.83 6.59 6.59 0 000 4.59 6.79 6.79 0 007.58 4.3.76.76 0 01.32 1.48 8.32 8.32 0 01-9.67-11zM28.8 8.68h-2v.13l-.21 1.11-.22 1.12a1.85 1.85 0 01-1.49 1.49 16.66 16.66 0 00-2.07.56 15.39 15.39 0 00-2 .85c-.32.16-.63.33-.94.52l-.45.28-.23.15a2 2 0 01-.46.23 1.73 1.73 0 01-1.1 0 2 2 0 01-.51-.23l-.24-.16-1-.62-.83-.55L13.61 15l.07.1.63 1 .63 1a1.91 1.91 0 010 2.1 14.24 14.24 0 00-1.07 1.8 13.9 13.9 0 00-.8 2c-.11.3-.21.65-.3 1l-.08.5-.06.26a1.82 1.82 0 01-.16.5 1.91 1.91 0 01-.77.82 1.76 1.76 0 01-.54.2l-.28.06-1.11.23-1 .19v2l.15.05L10 29l1.12.23a1.91 1.91 0 011.47 1.5A16.23 16.23 0 0014 34.81c.16.32.33.63.52.94l.25.46.23.22a2.28 2.28 0 01.23.47 1.87 1.87 0 010 1.1 2.38 2.38 0 01-.24.51l-.16.24-.63 1-.55.82 1.41 1.5.11-.07 1-.62.95-.63a1.83 1.83 0 012.05 0 17.21 17.21 0 001.89 1 17.42 17.42 0 002 .81c.3.11.65.21 1 .3l.52.12.27.06a1.6 1.6 0 01.48.16 1.78 1.78 0 01.78.73 2.23 2.23 0 01.19.51l.06.29.3 1.08.19 1a.1.1 0 00.09.06h2v-.14l.21-1.15.23-1.12a1.78 1.78 0 011.42-1.39 14.94 14.94 0 002.09-.55 14.59 14.59 0 002-.84 7.8 7.8 0 001-.52l.46-.28.22-.15a1.81 1.81 0 01.44-.22 1.7 1.7 0 011 0 1.49 1.49 0 01.48.22l.23.15 1 .63.83.53a.17.17 0 00.17 0l1.45-1.45a.17.17 0 000-.1l-.07-.11-1.24-2a1.69 1.69 0 010-1.9 15.69 15.69 0 001.93-3.89c.11-.3.21-.65.3-1l.13-.53.06-.26a1.41 1.41 0 01.14-.44 1.59 1.59 0 01.67-.71 2.07 2.07 0 01.47-.18h.28l1.16-.25 1-.2a.29.29 0 00.13-.3H47v-2.06a.1.1 0 000-.05h-.15l-1.11-.22-1.12-.22a1.77 1.77 0 01-1.36-1.39 14.5 14.5 0 00-.64-2.16 14.13 14.13 0 00-.85-2c-.16-.32-.34-.64-.53-.95l-.28-.45-.17-.22a1.57 1.57 0 01-.23-1.44 1.45 1.45 0 01.22-.49l.15-.24.63-.95.55-.84a.15.15 0 000-.13l-1.44-1.42h-.09l-.11.07-1 .64-.94.63a1.86 1.86 0 01-2 0 16 16 0 00-3.87-1.88c-.3-.11-.65-.2-1-.29l-.52-.12-.27-.06a1.92 1.92 0 01-.48-.15 1.88 1.88 0 01-.79-.74 1.93 1.93 0 01-.2-.52v-.28l-.4-1.1-.2-1zm.13-1.8a1.82 1.82 0 011.7 1.18 1.12 1.12 0 01.08.26v.15l.06.28.1.61.22 1.11.06.28h.06l.22.19.58.14c.39.1.78.21 1.16.33a18.28 18.28 0 012.21.9 16.39 16.39 0 012.07 1.2h.12l1-.62 1-.63.14-.09.23-.12a1.82 1.82 0 01.52-.14 1.75 1.75 0 011 .21 2.07 2.07 0 01.42.31l.2.2.4.41.8.81a1.79 1.79 0 01.36 2 1.71 1.71 0 01-.13.23l-.08.13-.16.23-.32.48-.63.94-.16.23v.14l.16.25.31.51a7.3 7.3 0 01.58 1 17 17 0 01.92 2.2 16.58 16.58 0 01.61 2.3c0 .15.06.15.12.15l1.12.23 1.11.23h.16l.24.07a2 2 0 01.45.26 1.72 1.72 0 01.57.85 1.84 1.84 0 01-.07.47v2.07h-.04a1.63 1.63 0 01-1 1.51l-.23.07H47l-.28.06-.55.12-1.12.23-.27.06h-.07a.31.31 0 00-.09.11.17.17 0 000 .1l-.06.29-.13.58c-.09.39-.2.77-.32 1.15a17.33 17.33 0 01-2 4.27.21.21 0 000 .24l.64.94.52 1 .09.14a.94.94 0 01.12.22 1.78 1.78 0 01.14.5 1.75 1.75 0 01-.19 1 2.1 2.1 0 01-.31.41l-.2.2-.4.41-.79.81a1.73 1.73 0 01-1.94.36 1.71 1.71 0 01-.23-.13l-.13-.08-.24-.16-.47-.31-1-.62-.24-.16h-.14l-.25.17-.51.31a10.54 10.54 0 01-1 .59 17.68 17.68 0 01-2.2.93 18.18 18.18 0 01-2.3.63c-.12 0-.12.09-.12.09l-.22 1.12-.15 1.02v.16a2.58 2.58 0 01-.08.26 2.13 2.13 0 01-.27.46 1.77 1.77 0 01-.88.59 1.82 1.82 0 01-.52.08h-2a1.77 1.77 0 01-1.67-1.16.79.79 0 01-.08-.26V47l-.09-.25-.11-.56-.23-1.11-.06-.28h-.06l-.3-.06-.58-.14c-.39-.09-.77-.2-1.15-.32a17.31 17.31 0 01-4.3-2.08h-.09l-.95.63-1 .63-.13.09-.24.13a2 2 0 01-.54.14 1.89 1.89 0 01-1.07-.2 1.76 1.76 0 01-.43-.33l-.2-.2-.41-.4-.8-.8a1.84 1.84 0 01-.35-2.06c0-.08.13-.16.13-.24l.08-.13.16-.24.31-.47.63-1 .13-.35-.51-.8a8.51 8.51 0 01-.59-1 17.74 17.74 0 01-.94-2.2 19 19 0 01-.63-2.32l-1.12-.26-1.11-.22h-.16a1.22 1.22 0 01-.27-.09A1.81 1.81 0 017 29.3a1.75 1.75 0 01-.08-.55v-2A1.89 1.89 0 018.13 25l.28-.08h.15l.27-.05.56-.12 1.12-.25.26-.05.23-1c.1-.39.21-.77.34-1.16a17.32 17.32 0 012.1-4.3l-.62-1-.63-.95-.09-.04c0-.08-.13-.17-.13-.25a1.9 1.9 0 01.03-1.63 1.41 1.41 0 01.33-.44l.2-.2.4-.4.81-.81a1.84 1.84 0 012.19-.4 2 2 0 01.25.14l.13.08.23.16.48.32.94.63.24.15.25-.16.51-.32 1-.58a19.48 19.48 0 012.21-.93 16.85 16.85 0 012.32-.61h.07l.18-1.17.37-1.11v-.16a1.38 1.38 0 01.11-.31 1.47 1.47 0 01.27-.47A1.72 1.72 0 0126.4 7a1.89 1.89 0 01.53-.08z"/></svg>

When I try opening this in Illustrator, I get the following blank artboard:

enter image description here

Why isn't the SVG being imported as expected?

You can view the SVG here to verify that it does display properly in a browser.

2
  • Too big? Maybe it does not fit illudtrators max size.
    – joojaa
    Mar 20 at 5:58
  • I doubt it since the contents of the file isn’t large at all (see above) and I’ve definitely used much larger svgs in the past Mar 20 at 11:24
0

I'm not sure what the root issue was, but one workaround was to import the file to https://vecta.io/ (must create a free account first) and then to export an SVG from there.

The exported SVG was:

<svg xmlns="http://www.w3.org/2000/svg" width="1056" height="816"  stroke="#000" stroke-linecap="round" stroke-linejoin="round" fill="#fff" fill-rule="evenodd"><path d="M409.1344 349.2054a1.795 1.795 0 0 1 1.3125.375 1.848 1.848 0 0 1 .6429 1.2054 1.768 1.768 0 0 1-1.2858 1.9017c-12.292 3.214-21.8837 12.8262-25.0714 25.125-.3002 1.0914-1.4238 1.7369-2.5178 1.4465-.9757-.2714-1.6035-1.2189-1.4733-2.2232 2.0747-14.6337 13.7206-26.0489 28.3929-27.8304zm-14.8393 26.7857c3.7582-10.5874 14.7798-16.7512 25.7679-14.4107 7.9537 1.6311 14.3857 7.4683 16.7785 15.2268s.3658 16.2045-5.2875 22.0321l-.2142.1875c-.7455.6307-1.8557.5613-2.5169-.1573s-.6379-1.8308.0526-2.5212c5.9446-6.6482 6.2387-16.6111.6964-23.5983-3.9934-5.0475-10.4022-7.5437-16.7575-6.527a17.786 17.786 0 0 0-13.8854 11.4288c-1.4733 3.9658-1.4733 8.3289 0 12.2947 3.0864 8.2489 11.6398 13.101 20.3036 11.5178a2.036 2.036 0 0 1 .8572 3.9643c-7.9842 1.8407-16.3344-.8483-21.7442-7.0021s-7.0063-14.7797-4.1576-22.4622zm23.8125-43.2857h-5.3571v.3482l-.5625 2.9732-.5893 3c-.3687 2.0321-1.959 3.6224-3.9911 3.9911-1.8784.3804-3.7305.8815-5.5446 1.5-1.8371.6318-3.6273 1.3926-5.3571 2.2768-.8572.4286-1.6875.8839-2.5179 1.3928l-1.2054.75-.6161.4018c-.3824.2576-.7966.4646-1.2321.6161-.956.3206-1.9904.3206-2.9464 0a5.353 5.353 0 0 1-1.3661-.6161l-.6429-.4285-2.6785-1.6608-2.2232-1.4732-3.8572 3.8572.1875.2678 3.375 5.3572a5.116 5.116 0 0 1 0 5.625c-1.0724 1.5346-2.0303 3.1461-2.8661 4.8214a37.251 37.251 0 0 0-2.1428 5.3571c-.2947.8036-.5625 1.7411-.8036 2.6786l-.2142 1.3393-.1608.6964c-.0774.4648-.2217.916-.4286 1.3393a5.115 5.115 0 0 1-2.0625 2.1964 4.715 4.715 0 0 1-1.4464.5358l-.75.1607-2.9732.616-2.6785.509v5.3571l.4017.1339 2.8929.509 3 .616c1.9971.4328 3.5452 2.0125 3.9375 4.0179a43.47 43.47 0 0 0 3.7768 10.9286c.4286.8571.8839 1.6875 1.3928 2.5178l.6697 1.2322.6161.5893c.2529.3946.4597.817.616 1.2589a5.007 5.007 0 0 1 0 2.9464 6.37 6.37 0 0 1-.6429 1.3661l-.4285.6428-1.6875 2.6786-1.4732 2.1964 3.7767 4.0179.2947-.1875 2.6786-1.6607 2.5446-1.6875a4.902 4.902 0 0 1 5.4911 0 46.104 46.104 0 0 0 5.0625 2.6786 46.659 46.659 0 0 0 5.3571 2.1696c.8036.2946 1.7411.5625 2.6786.8036l1.3928.3214.7233.1607c.4486.0738.8825.2185 1.2857.4286a4.768 4.768 0 0 1 2.0893 1.9553c.2247.433.3957.8917.5089 1.3661l.1607.7768.8036 2.8929.5089 2.6785c.0419.0962.1362.159.2411.1607h5.3571v-.375l.5625-3.0803.6161-3a4.768 4.768 0 0 1 3.8036-3.7232 40.035 40.035 0 0 0 5.5982-1.4732c1.839-.616 3.6297-1.3682 5.3571-2.25.9253-.3991 1.8205-.8646 2.6786-1.3929l1.2322-.75.5892-.4018c.3643-.2491.7607-.4474 1.1786-.5893.8727-.2685 1.8059-.2685 2.6786 0 .4602.1184.8956.318 1.2857.5893l.616.4018 2.6786 1.6875 2.2233 1.4196a.455.455 0 0 0 .4553 0l3.8839-3.8839a.456.456 0 0 0 0-.2678l-.1875-.2947-3.3214-5.3571c-1.0438-1.5359-1.0438-3.5535 0-5.0893 2.1979-3.2168 3.9377-6.7236 5.1697-10.4197.2946-.8035.5625-1.741.8035-2.6785l.3482-1.4197.1608-.6964c.0593-.4108.186-.8089.375-1.1786.384-.8064 1.0118-1.4717 1.7946-1.9018a5.545 5.545 0 0 1 1.2589-.4821h.75l3.1071-.6696 2.6786-.5358a.777.777 0 0 0 .3483-.8035h-.3483v-5.5179c.0113-.0439.0113-.09 0-.1339h-.4017l-2.9733-.5893-3-.5893a4.741 4.741 0 0 1-3.6428-3.7232c-.4206-1.9701-.9937-3.9045-1.7143-5.7857a37.847 37.847 0 0 0-2.2768-5.3572c-.4286-.8571-.9107-1.7142-1.4197-2.5446l-.75-1.2054-.4553-.5892c-.8262-1.1066-1.0565-2.5483-.6161-3.8572.113-.4704.3129-.9155.5893-1.3125l.4018-.6428 1.6875-2.5447 1.4732-2.25a.402.402 0 0 0 0-.3482l-3.8571-3.8036h-.2411l-.2947.1875-2.6785 1.7143-2.5179 1.6875a4.982 4.982 0 0 1-5.3571 0 42.858 42.858 0 0 0-10.3661-5.0357c-.8035-.2946-1.741-.5357-2.6785-.7768l-1.3929-.3214-.7232-.1607c-.4444-.077-.8766-.2121-1.2858-.4018a5.036 5.036 0 0 1-2.116-1.9822 5.167 5.167 0 0 1-.5357-1.3928v-.75l-1.0714-2.9464-.5358-2.6786zm.3483-4.8214c2.0274.0042 3.8405 1.2628 4.5535 3.1607a3.003 3.003 0 0 1 .2143.6964v.4018l.1607.75.2679 1.6339.5892 2.9732.1608.75h.1607l.5893.509 1.5536.375c1.0446.2678 2.0892.5625 3.1071.8839a48.973 48.973 0 0 1 5.9196 2.4107c1.9241.935 3.7772 2.0092 5.5447 3.2143h.3214l2.6786-1.6607 2.6786-1.6875.375-.2411.616-.3214a4.873 4.873 0 0 1 1.3929-.375 4.688 4.688 0 0 1 2.6786.5625c.4085.2282.7865.5072 1.125.8303l.5356.5358 1.0715 1.0982 2.1429 2.1696a4.795 4.795 0 0 1 .9642 5.3572c-.1.214-.2164.42-.3482.616l-.2143.3482-.4286.6161-.8571 1.2857-1.6875 2.5179-.4285.6161v.375l.4285.6696.8304 1.3661c.5879.8503 1.1073 1.746 1.5536 2.6785a45.556 45.556 0 0 1 2.4642 5.8929c.6915 2.0118 1.2375 4.0707 1.6339 6.1607 0 .4018.1608.4018.3215.4018l3 .6161 2.9732.616h.4286l.6428.1875a5.359 5.359 0 0 1 1.2054.6965c.7282.5864 1.2607 1.3805 1.5268 2.2768-.0078.426-.0708.8491-.1875 1.2589v5.5446h-.1072a4.366 4.366 0 0 1-2.6786 4.0447l-.616.1875h-.4554l-.75.1607-1.4732.3214-3 .6161-.7232.1607h-.1875a.832.832 0 0 0-.2411.2946.455.455 0 0 0 0 .2679l-.1607.7768-.3482 1.5536c-.2411 1.0446-.5357 2.0625-.8572 3.0803a46.413 46.413 0 0 1-5.3571 11.4375c-.1345.1932-.1345.4497 0 .6429l1.7143 2.5178 1.3928 2.6786.2411.375a2.514 2.514 0 0 1 .3214.5893 4.765 4.765 0 0 1 .375 1.3393c.0996.9235-.0776 1.8558-.5089 2.6785a5.624 5.624 0 0 1-.8303 1.0983l-.5358.5357-3.1875 3.2678a4.634 4.634 0 0 1-5.1964.9643 4.588 4.588 0 0 1-.6161-.3482l-.3481-.2143-.6429-.4286-1.259-.8303-2.6785-1.6607-.6429-.4286h-.375l-.6696.4554-1.3661.8303c-.8631.5756-1.7574 1.1032-2.6785 1.5804a47.353 47.353 0 0 1-5.8929 2.491 48.681 48.681 0 0 1-6.1607 1.6875c-.3214 0-.3214.2411-.3214.2411l-.5894 3-.4017 2.7322v.4285a6.87 6.87 0 0 1-.2143.6964 5.71 5.71 0 0 1-.7232 1.2322c-.606.7551-1.4285 1.3066-2.3572 1.5804a4.872 4.872 0 0 1-1.3928.2142h-5.3572a4.741 4.741 0 0 1-4.4732-3.1071c-.1112-.218-.1837-.4536-.2143-.6964v-.3482l-.2411-.6697-.2946-1.5-.616-2.9732-.1608-.75h-.1607l-.8035-.1607-1.5536-.375c-1.0447-.2411-2.0625-.5357-3.0804-.8572a46.366 46.366 0 0 1-11.5179-5.5714h-.241l-2.5446 1.6875-2.6786 1.6875-.3483.2411-.6428.3482a5.355 5.355 0 0 1-1.4464.375 5.062 5.062 0 0 1-2.8661-.5357 4.715 4.715 0 0 1-1.1518-.8839l-.5357-.5358-1.0982-1.0714-2.1429-2.1428a4.929 4.929 0 0 1-.9375-5.5179c0-.2143.3483-.4286.3483-.6429l.2142-.3482.4286-.6428.8303-1.259 1.6875-2.6785.3483-.9375-1.3661-2.1429c-.5872-.8558-1.1151-1.7508-1.5803-2.6786a47.504 47.504 0 0 1-2.5179-5.8928 50.882 50.882 0 0 1-1.6875-6.2143l-3-.6964-2.9732-.5893h-.4286c-.2497-.0519-.4923-.1328-.7232-.2411-1.4524-.5428-2.5575-1.7474-2.9732-3.2411a4.689 4.689 0 0 1-.2143-1.4732v-5.3571c.0148-2.08 1.3003-3.9392 3.241-4.6875l.75-.2143h.4019l.7231-.1339 1.5-.3215 3-.6696.6965-.1339.616-2.6786c.2679-1.0446.5625-2.0625.9108-3.1071 1.333-4.0811 3.226-7.9573 5.625-11.5179l-1.6608-2.6786-1.6875-2.5446-.241-.1072c0-.2142-.3482-.4553-.3482-.6696-.6306-1.3935-.6012-2.9968.0803-4.3661.2145-.4471.5148-.8475.8839-1.1785l3.7769-3.7768a4.929 4.929 0 0 1 5.866-1.0715 5.367 5.367 0 0 1 .6696.375l.3483.2143.6161.4286 1.2856.8571 2.5179 1.6875.6429.4018.6696-.4285 1.3661-.8572 2.6785-1.5536c1.9203-.9511 3.8972-1.783 5.9197-2.491 2.03-.6916 4.1067-1.2376 6.2143-1.634h.1875l.4821-3.1339.9911-2.9732v-.4286c.0648-.2875.1637-.5663.2947-.8303.1608-.4609.4061-.8878.7231-1.259.6442-.7163 1.4966-1.2129 2.4375-1.4196.4607-.1385.9387-.2106 1.4197-.2143z" stroke="none" fill="#000" fill-rule="nonzero"/></svg>

And this opened up nicely in Adobe Illustrator.

5
  • File comparison shows the XML was completely rewritten. Are you affiliated with vecta.io?
    – Scott
    Mar 19 at 18:51
  • I'm not at all affiliated... just found this blog post and decided to give it a shot. Worked, but I don't know if there is a simpler way to get Illustrator to open the original SVG file Mar 19 at 20:01
  • Original file crashes AI here.
    – Scott
    Mar 19 at 20:19
  • 1
    Not sure what's wrong with Illustrator not opening it. The first example opens in Inskcape just fine, although the cog is a bit wonky at some parts. I'd simply recreate it. Not worth fixing.
    – Billy Kerr
    Mar 19 at 21:57
  • @Scott Even if the original file crashes AI, it works just fine in the browser, which is why I'm confused. Mar 22 at 13:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.