FreeVector

Guide · Icons & logos

Icon Design Basics: Grids, Strokes and Exporting Icon Sets

Icon design is the practice of drawing small, simple symbols that communicate an action or object at a glance, usually as vector shapes on a fixed grid. Good icons share one grid, one stroke weight, one corner style and one level of detail, so a set looks like it came from a single hand. This guide explains how to set up the grid, decide between outline and filled styles, control strokes and joins in SVG, test legibility at small sizes, and export a clean, consistent icon set for web and apps.

Designer sketching interface icons on a graphics tablet at a desk

Key takeaways

  • Draw every icon in the same square artboard on the same grid, and keep the shapes inside a shared live area.
  • Pick one stroke weight, one cap style and one join style for the whole set before drawing the second icon.
  • Remove detail as the icon gets smaller, since legibility at the smallest size decides the design.
  • Convert strokes to outlines only when a destination requires it, because live strokes are easier to edit and restyle.
  • Export optimized SVG with a viewBox and no hardcoded size, then test the set on light and dark backgrounds.

What makes an icon work?

An icon works when a viewer recognizes its meaning faster than they could read a label. That depends on a familiar metaphor, a simple silhouette and enough contrast with its surroundings.

Wikipedia's overview of icon design describes the workflow as choosing a visual metaphor, drawing the illustration, adapting it for different sizes, and sometimes packaging it in a format such as ICO or ICNS. It also notes that vector icons in apps and websites are usually SVG files (Wikipedia, Icon design).

Icon sets share a color palette, perspective and style. Consistency across the set matters as much as the quality of any single icon, because users learn the visual language once and apply it everywhere.

If you only need ready-made icons, start with icon libraries and read free vector icons for licensing.

Start every project by listing where the icons will appear: toolbars, navigation, buttons, empty states or marketing pages. That list sets the sizes, the styles and the amount of detail you need.

How do you set up a grid for icons?

Set up one square artboard and use it for every icon in the set. The artboard size is your base unit, and every other measurement is expressed against it.

Google's Material Symbols are a useful reference point. Their artwork is designed from 24 px artwork, and only the 20 px and 24 px versions are aligned to the pixel grid (Google Material Design Icons repository). That shows a common practice: choose a small base size, and verify at the sizes people will actually see.

Inside the artboard, mark a live area with a margin around it. Keep the main shapes in the live area and let only large circles or deliberate bleeds touch the margin.

Add keyshapes to the grid: a square, a circle, a vertical rectangle and a horizontal rectangle, each sized so they look equal in visual weight. Use them as templates so a circular clock and a square folder feel the same size.

  1. Create a square artboard at one base size, and use that size for every icon.
  2. Mark a live area and a padding zone inside it.
  3. Draw keyshapes for circle, square, and the two rectangles, and check they look equally large.
  4. Snap anchor points to whole units, or half units for strokes with odd widths.
  5. Save the grid as a locked template layer and reuse it for every icon.

Outline, filled or duotone: which style should a set use?

Choose the style from where the icons appear, then apply it to every icon. Outline icons look light and work well in dense toolbars, while filled icons carry more weight and work well for selected states and small sizes.

Material Symbols show how far a single design can flex. They ship as Outlined, Rounded and Sharp styles, with a Fill axis that produces filled variants of each, and weight values from 100 to 700 (Google Material Design Icons repository).

Do not mix styles in one view without a reason. A common, defensible pattern is outline for the default state and filled for the active state, applied to every icon in the same toolbar.

Duotone and multicolor icons need extra rules, since each color needs a role. Decide in advance which color is the accent and which is the base, and keep the roles identical across the set.

Test the two states side by side. If the filled version of an icon looks much heavier than its outline version, adjust the inner shapes until both read as the same object.

How do you choose stroke weight, caps and joins?

Choose one stroke weight for the whole set and never change it by eye. A set where one icon is slightly heavier reads as a mistake even when viewers cannot say why.

SVG gives you precise controls. The stroke-linecap attribute sets the shape at the end of open paths, with the values butt, round or square, and butt is the default (MDN Web Docs, stroke-linecap). Round caps give a friendlier look, butt caps a more technical one.

The stroke-linejoin attribute controls corners. Its values are arcs, bevel, miter, miter-clip and round, with miter as the default, and a miter falls back to a bevel if the miter limit is exceeded on a sharp angle (MDN Web Docs, stroke-linejoin). Round joins soften corners, while miter keeps them crisp.

Pair the two choices into a style rule. Round caps with round joins make a soft set, while butt caps with miter joins make a sharp one. Write the rule in the set's documentation so contributors follow it.

  • Stroke weight: one value for every icon, and any exception documented.
  • Line cap: round or butt, never mixed in the same set.
  • Line join: round or miter, matched to the cap choice.
  • Corner radius: one radius for rounded rectangles, and a smaller one for inner corners.
  • Gaps: one minimum distance between parallel lines or between shapes.

How much detail should a small icon have?

Only as much as survives at the smallest size you support. Details that disappear into blur at small sizes should not be in the icon at all.

Wikipedia notes that at small sizes designers often remove or reduce unnecessary details and exaggerate important ones. It also notes that lower-density displays often need hinting, where shapes are aligned to pixel boundaries for visual clarity (Wikipedia, Icon design).

Test by viewing the icon at its real size on a real screen, not zoomed in the editor. If two icons look alike at that size, one of them needs a more distinct silhouette.

Keep a larger size of the same icon only if you need it, such as a marketing illustration. A larger version can hold more detail, but it should be a deliberate variant, not the default.

A quick check is to blur the icon or view it from a distance. If the shape still reads as the right object, the detail level is correct.

How do you keep strokes consistent when icons scale?

In SVG, strokes scale with the drawing by default, so a 2 unit stroke in a 24 unit viewBox grows when the icon is displayed larger. That is usually the behavior you want, because the whole icon keeps its proportions.

The viewBox attribute defines the position and size of the drawing in user space, and the browser scales it to fit the viewport. The value is four numbers: min-x, min-y, width and height (MDN Web Docs, viewBox). Setting a viewBox and leaving width and height to CSS is what makes one SVG usable at many sizes.

When you want a hairline that stays the same on screen, use vector-effect with the value non-scaling-stroke. MDN describes it as keeping stroke width independent of the element's transformations and of zoom level (MDN Web Docs, vector-effect). Use it sparingly, because it breaks the proportions that make an icon look designed.

If you plan to scale one design across sizes, test the stroke at the smallest and largest sizes before you commit to the weight.

Mixed strokes also cause trouble when icons sit beside text. Match the stroke weight of the icon to the weight of the adjacent type, so the pair looks like one system.

How do you build a consistent icon set?

Draw a pilot batch of five to ten icons that cover different shapes, then review them side by side before drawing the rest. Choose items that stress the rules: a circle, a rectangle, a diagonal, something with text-like lines, and something with a small detail.

Review the batch as a grid, at actual size, in light and dark mode. Fix the rules, not just the icons, whenever one icon breaks them.

Name files by function, not by look: use search, not magnifier-blue. Function names survive a redesign.

Write a one-page spec: grid size, live area, stroke weight, cap, join, radius, and the rule for filled states. A spec turns a style into something other designers can follow.

Version the set. When you add or change an icon, record it in a short changelog so teams know what moved and can update their products.

  • Pilot set of icons that stress the rules.
  • Side-by-side review at real size and in both themes.
  • Spec page with every numeric rule.
  • Naming convention based on function.
  • Review checklist for every new icon before it joins the set.

How do you export icons as clean SVG?

Export SVG with a viewBox, no fixed width and height, and no unused groups, masks or editor metadata. Clean SVG is smaller, easier to style and safer to inline.

Material Design Icons offers a model for what a distribution contains: web fonts, SVG files optimized with SVGO, PNG, and Android and iOS asset folders (Google Material Design Icons repository). Offering several formats from one source is common for sets used by many teams.

Use currentColor for fills and strokes when the icon should follow the surrounding text color. That lets one SVG work in any theme, and it removes the need for a separate dark-mode file for monochrome icons.

For editing details, see how to edit SVG files and the SVG editors category. For file-format choices, read SVG vs EPS vs AI vs PDF.

Keep the source file, with live strokes and named layers, in version control or shared storage, separate from the exported files.

  • Convert text to outlines, since fonts will not travel with the file.
  • Merge or simplify paths that are redundant.
  • Keep strokes live if the set will be restyled, and expand them only when a destination requires it.
  • Run the files through an SVG optimizer and check that the result looks the same.
  • Open the exported file in a browser and in a design tool before publishing.

Can AI help with icon design?

AI can help with ideas and first drafts, but it rarely keeps a strict grid or a fixed stroke weight across a set. Treat generated icons as sketches and redraw or clean them on your grid.

Check the result for the rules in this guide: consistent stroke, correct viewBox, aligned anchor points and a sensible number of nodes. Generated vectors often arrive with extra points and uneven curves.

Compare options in AI icon generators, and confirm the license for commercial use before you ship generated icons. If the output is a raster image, how to convert an image to vector explains the cleanup.

What should you check before shipping an icon set?

Run a final review against the spec, not against taste. Open the set in a grid at the real sizes and ask whether anything stands out for the wrong reason.

Check accessibility too. Decorative icons next to text can be hidden from assistive technology, while icons that stand alone need an accessible name, such as a label on the button that holds them.

Check licensing for any third-party shapes or fonts you used in the process, and keep a note of where each piece came from. If your icons include brand logos, use only official brand or press kit assets under the owner's guidelines.

Finish by exporting a preview sheet that shows every icon at three sizes on light and dark backgrounds. The sheet is the fastest way to spot outliers, and it doubles as documentation for new contributors.

Frequently asked questions

What size should icons be designed at?

Pick one square base size and use it for the whole set. Google's Material Symbols are designed from 24 px artwork, and only their 20 px and 24 px versions are aligned to the pixel grid. Because SVG scales, you can display the same icon larger, but check legibility at the smallest size you support.

What is the difference between outline and filled icons?

Outline icons draw shapes with strokes and look light, while filled icons use solid shapes and look heavier. Many interfaces use outline for the default state and filled for the active or selected state. Whatever you choose, apply it to every icon in the same context.

Should I convert strokes to outlines before exporting SVG?

Only if the destination requires it. Live strokes are smaller and easier to restyle, and they let you change weight or color later. Expand strokes when a tool does not render them consistently or when a client needs shapes only.

Keep a master file with live strokes.

Why do my icons look uneven in a set?

Usually the cause is inconsistent stroke weight, different corner styles, or shapes that fill the artboard differently. Use keyshapes for a circle, a square and two rectangles so each looks equally large. Then fix the spec, so every new icon follows the same stroke, cap, join and radius.

What is the viewBox in an SVG icon?

The viewBox is a list of four numbers, min-x, min-y, width and height, that defines the drawing area in user units. The browser scales that area to fit the displayed size. With a viewBox and no fixed width or height, one file can be shown at any size.

Can I use AI to design icons?

Yes, as a starting point. AI tools can propose metaphors and drafts, but they seldom match a strict grid or stroke across a set. Redraw or clean the results on your own grid, check the vector quality, and read the license terms before using generated icons commercially.

Sources and further reading