Skip to content
Tutorials Center
My learning

Topics

Lesson 30 of 36 ยท Export and Workflows

Export for Screens, SVG and PNG from Illustrator

Export Illustrator artwork for the web and apps: Export for Screens, Save As SVG options, PNG scales, JPEG and PDF, with runnable Python stand-ins that read and build SVG.

Illustrator's native format is .ai, but the world uses other formats. Choosing the right one and the right settings decides whether your artwork looks sharp and loads fast. This lesson covers screen formats: SVG, PNG, JPEG, WebP and PDF.

Illustrator does not run on this site. The Python code is a stand-in that builds and inspects SVG, the text format Illustrator writes.

Which format?

Format Type Best for
SVG Vector (XML text) Logos, icons, illustrations on the web; scales perfectly
PNG Raster, lossless, transparency Screenshots, UI images, logos where SVG is not allowed
JPEG Raster, lossy Photographs, gradients without transparency
WebP Raster, lossy or lossless Smaller web images (available via Export for Screens in recent versions)
PDF Vector or mixed Documents and print handoff

Rule of thumb: vector artwork goes out as SVG, anything with photographic detail as JPEG or WebP.

Export for Screens

Choose File > Export > Export for Screens (Alt/Option+Ctrl/Cmd+E). The dialog has two tabs:

  • Artboards: pick all or a range, set the destination folder, add a prefix, and choose the format. Set one or more scales such as 1x, 2x, 3x (each adds a suffix, like @2x) so you can produce mobile densities in one click.
  • Assets: exports individual objects you added to the Asset Export panel (see asset export and naming).

Choose Export Artboard or Export Selected Assets, and tick Open Location after Export. Formats include PNG, JPEG, SVG, PDF, and WebP, with a gear icon for per-format settings.

Save As SVG

You can also use File > Save As, choose SVG (svg). The SVG Options dialog:

  • SVG Profiles: use SVG 1.1 for the widest support.
  • Fonts: Type: SVG embeds glyph outlines as fonts; Convert to outline turns text into paths and avoids missing fonts (best for logos).
  • Images: Embed (data URI) or Link.
  • Object IDs: Layer Names or Minimal; with layer names, your layer names become IDs, so name layers well.
  • Decimal Places: 1 to 7; 2 or 3 is a good size/quality trade-off.
  • Minify and Responsive: Minify strips whitespace; Responsive omits fixed width and height so the SVG scales with CSS.
  • CSS Properties: Presentation Attributes (fill="...") is the safest; Style Attributes inlines CSS.

Use File > Export > Export As for the same dialog with additional options such as Use Artboards.

Make the artboard match the artwork exactly (Object > Artboards > Fit to Artwork Bounds) before exporting an SVG icon. The viewBox of the SVG comes from the artboard, so extra margin becomes extra empty space around the icon on the page.

Stand-in: build and inspect an SVG

This builds the kind of document Illustrator writes, then reads it back with the standard XML parser to check the viewBox, as a build script might.

Python Stand-in: SVG structure and viewBox check

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The id attributes come from Illustrator's Object IDs option, and viewBox from the artboard.

PNG scales

For raster export, every extra scale multiplies the pixel dimensions. Design at 1x (for example 24 x 24 px), and export 2x and 3x for high density screens.

Python Stand-in: export sizes for each scale

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

PNG, JPEG and quality

  • PNG-8 has 256 colors and a smaller file; PNG-24 is full color; both support transparency.
  • JPEG quality 70 to 85 is usually enough for photos; there is no transparency, so choose a background color.
  • Turn on Anti-aliasing: Art Optimized for crisp shapes and Type Optimized for text.
  • For print resolutions use 300 ppi; for screen use 72 ppi or 1x/2x scales.

Check before exporting

  1. Outline text or make sure the fonts are available.
  2. Delete hidden layers and unused swatches.
  3. Remove stray points (Select > Object > Stray Points).
  4. Preview in a browser: open the SVG by dragging it into a window.
  5. Optimize with a tool such as SVGO if file size matters (outside Illustrator).

For print files, continue with CMYK and bleed.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Which format should you pick for a logo on a website that must scale without loss?

    SVG is vector and scales perfectly.
  2. 2. What does the 2x scale in Export for Screens do?

    Scales multiply the pixel size and add a suffix to the filename.
  3. 3. In SVG Options, which Fonts setting avoids missing-font problems?

    Outlined text no longer depends on installed fonts.
  4. 4. Where does the SVG viewBox come from?

    The artboard defines the visible area of the SVG.

Summary

  • Use SVG for vector art, PNG for transparent raster, JPEG or WebP for photographs, PDF for documents.
  • Export for Screens (Alt/Option+Ctrl/Cmd+E) produces many sizes and formats at once.
  • Fit the artboard to the artwork and name layers to get clean SVG IDs.
  • The Python snippets are stand-ins that build and inspect SVG.

Next: CMYK, Print Color and Bleed