How to export an SVG from Illustrator: the options

Export an SVG from Illustrator with File, Export, Export As. What each SVG option does, and the settings to choose for a website or for a cutting machine.

Published

To export an SVG from Adobe Illustrator, choose File, Export, Export As, pick SVG as the format, choose Export, set the options in the SVG Options window and choose OK. Illustrator can also write SVG from File, Save As, which offers different options and can keep a full Illustrator copy inside the file. Export As gives the leaner file and is the one to use for websites and cutting machines.

The steps

  1. Convert lettering to shapes if the file is going to other software: select the text and choose Type, Create Outlines.
  2. Choose File, Export, Export As.
  3. Choose a folder and a name, and set the format to SVG.
  4. Tick Use Artboards to make the artboard the edge of the SVG. Left unticked, the file is fitted to the artwork instead.
  5. Choose Export. The SVG Options window opens.
  6. Set the options, described below, and choose OK.

The SVG options

These are the options Adobe’s help pages list for Export As.

OptionChoicesWhat it changes in the file
StylingInternal CSS, Inline Style, Presentation AttributesWhere colours and strokes are written. Internal CSS puts them in one <style> block with class names. Inline Style writes a style attribute on each shape. Presentation Attributes writes separate attributes such as fill on each shape
FontOutlines, or SVGOutlines turns letters into paths. SVG keeps them as text that needs the font
ImagesPreserve, embed, or linkWhether placed pictures go inside the SVG or stay as separate files beside it
Object IDsLayer Names, Minimal, UniqueHow ids are made for objects
DecimalA number of decimal placesThe precision of coordinates. More places, larger file
MinifyOn or offRemoves empty groups and spaces. Smaller, harder to read
ResponsiveOn or offOn: no fixed size is written, so the SVG scales to its container on a web page. Off: the size is written into the file

Two buttons at the bottom help with checking: Show Code opens the result in a text editor, and the browser button shows it in a web browser.

Settings for a website

OptionSettingWhy
StylingPresentation Attributes, or Internal CSSPresentation Attributes are the easiest to override from the page’s own CSS. Internal CSS can give a smaller file
FontOutlines for a logo. SVG for text that must stay selectableText kept as text needs its font to be loaded by the page
Object IDsUnique, when several SVGs will sit inline on one pageIds that repeat from file to file collide on a shared page
Decimal2Enough for most artwork. Use 3 for small icons with fine detail
MinifyOn
ResponsiveOnThe SVG fills whatever width the page gives it

Settings for a cutting machine, laser or plotter

OptionSettingWhy
StylingPresentation AttributesColours are written plainly on each shape, which the widest range of software reads
FontOutlinesAdobe describes outlines as the most compatible choice. Cricut Design Space reports “unsupported items” for an SVG with editable text
ImagesLeave no pictures in the fileDesign Space also flags pictures, linked or embedded
Decimal3Keeps curves accurate at large sizes
MinifyOffNo benefit for a machine, and the file stays readable
ResponsiveOffThe width and height are written, so the file has a size

Before exporting, bring the artwork down to plain filled shapes. Cricut’s own help pages suggest the Pathfinder panel for turning clipping paths into single shapes, and list gradients and patterns among the things Design Space flags. How to make an SVG file has a fuller checklist.

A note on size. Illustrator measures in points, 72 to the inch, and writes those numbers into the SVG as pixels. Software that counts 96 pixels to the inch then opens the design at three quarters of its intended size. The proportions are right, so the cure is to set the width after importing. SVG size and units explains the mismatch, and resize SVG writes a size in millimetres or inches into the file.

Export As or Save As?

File, Export, Export AsFile, Save As
ResultA lean SVGAn SVG that can also carry Illustrator’s own data
ArtboardsOne file for each artboard with Use ArtboardsCheck the Use Artboards box in the Save As window
OptionsThe seven aboveSVG Profiles, Font Type and Subsetting, Image Location, CSS Properties, Decimal Places, Encoding and more
Compressed .svgzNoYes
Best forHanding the file to a website or a machineA working file that will be reopened in Illustrator

The option that matters most in Save As is Preserve Illustrator Editing Capabilities. It embeds an Illustrator file inside the SVG, which makes the file larger. Adobe notes a side effect: when such a file is reopened, Illustrator reads the embedded copy, not the SVG code, so changes made to the code by hand are not seen. Turn it off for any file that is leaving Illustrator.

Save As also lists Font Type choices. Convert to Outlines there does the same job as Outlines in Export As.

A third command, File, Export, Export for Screens, writes many artboards or collected objects in one go, in SVG and other formats, and suits sets of icons.

Getting the SVG code

Choose Show Code in the SVG Options window, or open the exported file in any text editor. The code can then be pasted into an HTML page. Paste it into the SVG viewer to see it drawn with its size, its viewBox and a count of what it contains.

Common problems

What you seeCauseFix
Empty space around the artworkUse Artboards was on and the artboard is larger than the designFit the artboard to the artwork, export with Use Artboards off, or trim the file with crop SVG
The design imports at three quarters of its size72 units to the inch read as 96Set the width after importing
No width or height in the fileResponsive was onExport again with Responsive off
Lettering changes or goes missing elsewhereText was exported as textFont: Outlines, or Type, Create Outlines first
Cricut Design Space reports unsupported itemsText, pictures, clipping paths, gradients or patternsOutline text, remove pictures, and merge clipped shapes with Pathfinder
Colours are lost in another programIt does not read the <style> blockStyling: Presentation Attributes
Styles clash between two inline SVGs on one web pageBoth define the same class names in their <style> blocksStyling: Presentation Attributes or Inline Style
The file is far larger than expectedPreserve Illustrator Editing Capabilities, or an embedded pictureUse Export As, and remove pictures
A thick outline is cut as a single lineCutting software follows the path, not the stroke’s widthObject, Path, Outline Stroke before exporting
Part of the artwork became a pictureMesh objects and some effects are rasterised on exportSimplify those objects before exporting

Questions

Does the artboard colour export? No. Adobe’s help says the artboard background is not part of the SVG, so empty areas are transparent. A background in the exported file comes from a filled shape covering the artboard.

Can Illustrator open the SVG again? Yes, with File, Open. A file from Export As comes back as plain paths and groups, without Illustrator-only features such as live effects. Keep the .ai file as the master.

What is SVGZ? A compressed SVG, offered in Save As. Adobe says it can be 50 to 80 per cent smaller but cannot be edited in a text editor. Not every program that reads .svg reads .svgz, so use it only where it is asked for.