I know that Inkscape does not have the ability to export selected objects as svg, but is there a workaround that people have found that works?

  • 1
    Just shooting from the hip but wouldn't Copy, new Document, Paste, Save work? – Scott May 19 '13 at 3:59
  • 1
    I was almost sure one could do that with the command-line option. There is indeed an export-plain-svg option, but it does not respect the export-id :'( – Drasill May 20 '13 at 20:59
  • 2
    I don't have enough rep here to answer, but I wrote a script to batch export Inkscape layers into separate SVG - you could put each of your objects on a different layer. The script is here: github.com/splitbrain/material-icons – Andreas Gohr Jul 22 '15 at 18:46
  • Alas, the link 404s :-( – Mawg says reinstate Monica Feb 27 '17 at 10:28

A straight-forward method is the following:

  1. Select the object(s) to export.
  2. "Resize page to drawing or selection" (File → Document Properties) or Ctrl+Shift+R.
  3. "Invert selection" (Edit → Invert selection) or !, and Del all other objects.
  4. "Save As" with Ctrl+Shift+S.
  5. Select Optimized SVG as the format if you want to use it on the web.

Not as quick as I would like but quicker than creating a new document for each graphic that you want to export.

| improve this answer | |
  • 13
    Your method also saves the rest of the document, just outside the viewport, thus increasing filesize (at least in my tests). – benebun Oct 29 '13 at 13:42
  • 1
    Adding the Save as Copy shortcut: Ctrl+Shift+S – Kai Noack Jul 2 '14 at 7:46
  • @benebun Have you found a way to fix that without creating a new document each time? – Matt Dec 30 '15 at 6:48
  • 5
    To avoid saving the whole document, you can just "Invert selection" (!) and Delete between steps 1 and 2. After you've saved a copy, you can Undo as needed to return to the original document and go on to the next item. Would be great if there was a shortcut for all this though. – jcaron Nov 23 '16 at 0:55
  • 4
    You can skip step 2 by just using the hotkey Ctrl+Shift+R for "Resize page to drawing or selection". – rugk Aug 19 '17 at 18:29

I keep another instance of Inkscape running on the side and just copy-paste the object I want to save into the scratch document, then save.

Another option if you just want the path data is to select the object, Shift+Ctrl+X to open the XML editor, grab the pieces you want (usually the d attribute), then paste to wherever.

| improve this answer | |

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