Dotted or Dashed Lines in After Effects: 3 Methods
Motion Graphics Tutorial · After Effects

How to Create
Dotted or Dashed Lines in After Effects

Three easy methods for creating dotted or dashed lines in After Effects — Shape Layer Dashes, Round Cap dots, and animated Trim Paths — with every setting explained in straightforward workflows.

Skill level: Beginner to Intermediate Time: 5–15 minutes AE version: CC 2022 and later Read time: 9 min
Dashed
Dotted (Round Cap)
Mixed Dash-Dot
Quick Answer

To create dotted or dashed lines in After Effects, draw a path with the Pen Tool (with the fill set to none), then open Contents → Shape 1 → Stroke 1 and click + next to Dashes. For rectangular dashes, set Dash and Gap above 0. For true circular dots, set Dash to 0 and Line Cap to Round Cap — a zero-length dash with a round cap renders as a perfect circle. To make the line draw itself on screen, add Trim Paths and keyframe End from 0% to 100%.

The 60-Second Workflow
  • Set the fill to None in the toolbar before you draw
  • Draw the path — Pen Tool (G) with no layer selected
  • Open the stroke — Contents → Shape 1 → Stroke 1, set colour and width
  • Add dashes — click + beside Dashes, then + again to add a Gap
  • Dashed: Dash 20 · Gap 12 · Butt Cap  |  Dotted: Dash 0 · Gap 16 · Round Cap
  • Animate — Add → Trim Paths, keyframe End 0% → 100%, then F9 to ease

Dotted or dashed lines in After Effects sound like a small detail — but in motion graphics they show up everywhere. Animated travel routes on a map. Dotted outlines drawing on around a product in an ad. Rhythm lines pulsing through a music visualizer. All of them come down to the same three controls hidden inside After Effects' Shape Layer stroke settings: Dash, Gap, and Line Cap.

Like many After Effects users, I think the program hides this feature. There is no "Dashed Line" button in the toolbar, so you have to know where to look. This guide shows you where, walks through every setting that matters, and covers how to animate the result with Trim Paths so the line draws itself on screen.

Prerequisites

What You'll Need

I used After Effects CC 2025 (v25.6) for this tutorial, but the workflow works in CC 2022 and all later versions. The Shape Layer dash controls have been available since CS6, though the interface was improved in later CC releases.

📋 Requirements

After Effects CC 2022 or later · A new or existing composition · No third-party plugins required — everything covered here uses only built-in After Effects tools. If you'd rather reverse-engineer a finished project file, Motion Array's After Effects template library ships hundreds of animated line and map-route comps.

Dotted or Dashed Lines in After Effects

Dotted or dashed lines in After Effects are built entirely from Shape Layer stroke settings — no plugins required.

Method 1 of 3

Create a Dashed Line via Shape Layer Stroke

This is the foundational method. Everything else in this tutorial builds on these steps. One important thing to note that: dashes are a property of a Shape Layer's Stroke, not a separate layer or effect. Once you know where to find the Dashes panel, the rest takes less than two minutes.

1
Create a new composition

Go to Composition → New Composition. Set your resolution (1920×1080 is standard), frame rate (24 or 30 fps) and duration, then click OK.

2
Set the fill to none before you draw

With nothing selected in the timeline, click the Fill swatch in the toolbar and choose the None option. A straight two-point line has no area to fill, so a fill won't show on it. It does matter on curves and closed shapes, where it can cover your stroke.

3
Draw the path with the Pen Tool

Press G, then click a start point and an end point. Hold Shift while clicking to lock the line to horizontal, vertical or 45°. Make sure no layer is selected in the timeline. If one is, After Effects draws a mask instead of a shape, and masks can't take dashes.

4
Open the stroke and set color and width

Expand the new shape layer to Contents → Shape 1 → Stroke 1. Click the color swatch to pick your color, and set Stroke Width to 4–8 px to start.

5
Click + next to Dashes

Inside Stroke 1, find Dashes and click the + beside it. A Dash value appears, and the line now shows dashes.

6
Add a Gap and tune both values

Click + a second time to add a Gap. Dash is the length of each dash and Gap is the space between them. Start with Dash 20 and Gap 12, then adjust by eye. Each extra click on + adds another Dash and Gap pair, and the pattern repeats in order, so a long dash, a gap, a short dash, a gap gives you a dash-dot line. Leave Line Cap on Butt Cap for clean rectangular dashes.

7
Use Offset to move the dashes along the path

Offset slides the whole dash pattern along the stroke. To keep it moving, Alt-click (Option-click on Mac) the Offset stopwatch and type time*60. The dashes travel 60 units per second, and a negative number reverses the direction. This gives you the marching-ants look without using Trim Paths.

After Effects timeline with Stroke 1 expanded and Dashes set to Dash 20 and Gap 12
Stroke 1 with a Dash and a Gap added.
💡 Pro Tip — Line Cap matters

The Line Cap option inside Stroke 1 controls how dash ends are rendered. Butt Cap gives you sharp rectangular dashes. Round Cap rounds the ends and is used to make true dotted circles (covered in Method 2) — the same behaviour the SVG spec defines, where a round cap on a zero-length path renders as a full circle. Projecting Cap extends the dash length slightly beyond each end — useful for stylised hand-drawn looks.

Method 2 of 3

Create a Dotted Line with Round Cap

A true dotted line — with perfect circles rather than rectangles — requires one additional change from the dashed line setup: set Dash to 0 and Line Cap to Round Cap. When the dash length is 0 and the cap is round, After Effects renders each dash as a perfect circle with a diameter equal to the Stroke Width.

1
Follow Steps 1–5 from Method 1

Set up your Shape Layer with the fill set to none, open Stroke 1, and click + to add the first Dash property as described above.

2
Set Dash value to exactly 0

This is the key difference. In the Dashes section, set Dash = 0. With a zero-length dash, After Effects collapses each dash into a point — which, when combined with Round Cap, becomes a perfect circle.

3
Set Line Cap to Round Cap

Inside Stroke 1, find Line Cap and change it from Butt Cap to Round Cap. Do this before you judge the result. A zero-length dash with a Butt Cap draws nothing, so the line looks like it disappeared.

4
Add a Gap and adjust the spacing

Click + to add a Gap value. This controls the distance between dots. Smaller Gap = dots closer together. Increase stroke width to make larger dots — the dot diameter always equals the stroke width.

Create a Dotted Line with Round Cap
Set Dash to 0 and Line Cap to Round Cap.
💡 Spacing rule of thumb: the dots touch when Gap equals Stroke Width. For a clean dot-sized space between them, use a Gap of about twice the Stroke Width. A Stroke Width of 8 and a Gap of 16 is a good starting point. To make dots bigger, raise the Stroke Width and raise the Gap with it.
Method 3 of 3

Animate Your Dashed Lines with Trim Paths

A static dashed line is useful. An animated dashed line that draws itself onto the screen — used for map routes, infographic connectors, hand-drawn reveals — is what makes motion graphics genuinely come alive.

Trim Paths is the After Effects tool that controls which portion of a path is visible at any moment. Keyframing the End value from 0% to 100% makes the line appear to draw itself from left to right. Adobe files it alongside the other path operations for shape layers, which is why it lives under the Add menu rather than the Effects panel.

1
Complete your dashed or dotted line setup first

Make sure you have a Shape Layer with a Stroke, no Fill, and your Dash/Gap values set from Method 1 or Method 2.

2
Add Trim Paths to the Shape Layer

Select the Shape Layer. In the timeline, expand Contents. Click the Add button (the arrow/plus icon to the right of Contents) and choose Trim Paths from the dropdown.

3
Keyframe the End value

Expand Contents → Trim Paths 1. At frame 0, click the stopwatch next to End and set it to 0%. Move to your end frame (e.g., frame 60) and set End to 100%. The line now draws itself from start to end over that duration.

4
Easy Ease the keyframes for smooth motion

Select both keyframes, right-click, and choose Keyframe Assistant → Easy Ease. This adds acceleration and deceleration, making the animation feel natural rather than robotic. Press F9 as a shortcut.

5
Adjust timing in the Graph Editor (optional)

Press Shift + F3 to open the Graph Editor. Pull the handles for a custom easing curve — a slow start followed by a faster reveal often looks best for map route animations.

✅ Start vs End Keyframes — the difference

Animate End for a draw-on. Animating Start as well erases the tail, but it moves the trimmed start point, and the dash pattern can crawl along the line. If that happens, use the Track Matte fix in the troubleshooting section.

Animate Dashed Lines with Trim Paths
Animate Dashed Lines with Trim Paths.
▶ Watch: Trim Paths deep dive — animating line reveals in After Effects
Quick Reference

Which Method Should You Use?

All three methods share the same stroke setup. Pick the one that matches the look you want and whether the line needs to animate.

Comparison of three methods for creating dotted or dashed lines in After Effects
Goal Method Key settings Best for
Rectangular dashes Method 1 Dash > 0, Gap > 0, Butt Cap Motion paths, infographic connectors, borders
Perfect circle dots Method 2 Dash = 0, Gap ≥ Stroke Width, Round Cap Stylised map routes, decorative dots, timelines
Animated draw-on Method 3 + Trim Paths, keyframe End 0→100% Reveals, map routes, animated arrows, connectors
Common Issues

Troubleshooting Dotted or Dashed Lines in After Effects

?

I clicked + but no dashes appear

Check that no fill is covering the stroke. This mostly affects curves and closed shapes, where a filled shape on top can hide the dashes.

If you drew your line with a layer already selected, you may have created a mask instead of a Shape Layer. Check the timeline — a mask will show under the layer's Masks section, not Contents. Delete it and redraw with no layer selected.

?

The dashes crawl or jump while the line animates

This usually shows up when you animate Trim Paths Start, because the dash pattern is laid out from the trimmed start point and appears to crawl along the line. Animate only End where you can.

To erase the tail without the crawl, duplicate the shape layer, remove the dashes from the duplicate, place it directly above the dashed layer, and animate Trim Paths on the duplicate. Then set the dashed layer's Track Matte to Alpha Matte using the duplicate. The dashed layer itself stays untrimmed.

?

My dotted line looks blurry or jagged on export

Usually caused by one of two issues: (1) Composition resolution is too low — render at 1920×1080 minimum for clean strokes. (2) The shape layer has been scaled up from a smaller original — never scale a shape layer with dashes; instead, redraw at the size you need.

If the footage underneath your dashed overlay is also soft, that's a separate problem — scaling inside After Effects won't fix it. See our comparison of upscaling footage vs scaling in After Effects, if you need a dedicated upscaler in the pipeline.

?

I want dashes but I'm working with a mask path, not a shape layer

Mask paths do not support stroke dashes directly. You need to convert the mask to a Shape Layer path first. Select the layer with the mask, then copy the mask path and paste it into a Shape Layer's Path property. Once on a Shape Layer, all the Stroke Dash controls become available. Adobe covers the differences between the two path types in its guide to managing and animating shape paths and masks.

⚡ Quick Keyboard Shortcuts Recap

G — Pen Tool  ·  V — Selection Tool  ·  U — Reveal keyframed properties  ·  F9 — Easy Ease selected keyframes  ·  Shift + F3 — Open Graph Editor  ·  Spacebar — Preview playback

Adobe publishes the full After Effects shortcut reference if you want the printable version.

Summary

Dotted or Dashed Lines in After Effects — Final Recap

What Works Well

  • No plugins required — fully native to After Effects
  • Dashes follow any path shape automatically — straight, curved, or complex
  • Fully animatable — every Dash, Gap, Offset value can be keyframed
  • Round Cap gives perfect circles with Dash = 0
  • Works with Trim Paths for clean draw-on animations
  • Offset animation creates marching-ants effect with zero extra effort
  • Can be combined with Layer Styles for glow, neon, and shadow effects

Limitations to Know

  • Mask paths cannot use Stroke Dashes — must convert to Shape Layer
  • Trim Paths animate-off requires Alpha Matte workaround to look right
  • Complex dash patterns (dash-dot-dash) require multiple + clicks to set up
  • No live preview in the Dashes panel — must watch comp to see changes
  • Scaling shape layers can cause rendering artefacts — redraw at target size instead

Once the animation is timed, the last thing a line reveal usually needs is sound — a rising swell or a soft tick as each dash lands. Our breakdown of Epidemic Sound vs Artlist covers which library licenses best for commercial motion graphics work.

Tested in Adobe After Effects CC 2025 (v25.6). Menu labels may differ slightly in other versions.