Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In Illustrator, when I save a file as an SVG, the code includes everything on the artboard, even layers that are not visible. How do I save SVGs which ONLY include visible layers?

share|improve this question

Not sure if you found the solution yet, but here's what worked for me.

  1. Set the layer to exclude from SVG to a template layer, then hide it.
  2. Save As -> Select SVG
  3. When the dialog comes up, hit the button for show svg code, or hit save.
share|improve this answer
Seems hacky, but did the trick. Thanks! – Adam Youngers Oct 23 '14 at 4:05

I found a good script to export layer to svg,eps,fxg,png,pdf file. It can export to multiple files by layer or only the selected layer.

share|improve this answer

If you're exporting lots of artboards, put all the artwork onto one layer. This will stop there being empty layers for each SVG.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .