How to Create
Dotted or Dashed Lines in After Effects
Three complete methods for building dotted or dashed lines in After Effects — Shape Layer Dashes, Round Cap dots, and animated Trim Paths — with every setting explained so you know exactly what to adjust and why.
To create dotted or dashed lines in After Effects, draw a path with the Pen Tool, set the Fill to 0%, 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%.
- Draw the path — Pen Tool (
G) with no layer selected - Hide the fill —
Contents → Shape 1 → Fill 1→ Opacity 0% - 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%, thenF9to 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. Infographic connectors that draw themselves between data points, usually layered over ready-made vector icons and infographic elements. All of them come down to the same three controls hidden inside After Effects' Shape Layer stroke settings: Dash, Gap, and Line Cap.
After Effects does not advertise this feature particularly well — there is no "Dashed Line" button in the toolbar. You have to know where to look. This guide shows you exactly where, walks through every setting that matters, and covers how to animate the result with Trim Paths so the line draws itself on screen.
What You'll Need
This tutorial works in After Effects CC 2022 and all later versions, including the current 2026 release. The Shape Layer dash controls have been available since CS6, though the interface was improved in later CC releases.
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 are built entirely from Shape Layer stroke settings — no plugins required.
Create a Dashed Line via Shape Layer Stroke
This is the foundational method. Everything else in this tutorial builds on these steps. The key insight: 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.
Go to Composition → New Composition. Set your resolution (1920×1080 is standard), frame rate (24fps or 30fps), and duration. Click OK. Delivering into an existing edit? Match the comp to your sequence first — the same aspect ratio rules apply across every NLE.
Press G to activate the Pen Tool. Make sure no layer is selected in the timeline — if a layer is selected, the pen tool will draw a mask instead of a shape. Click to set a start point, then click again to set the end point. After Effects creates a new Shape Layer automatically.
In the timeline, expand the Shape Layer: Contents → Shape 1 → Fill 1. Set Opacity to 0%. This makes the fill invisible, leaving only the stroke visible. You can also double-click the Fill color swatch in the toolbar and set it to None.
Navigate to Contents → Shape 1 → Stroke 1. Click the color swatch to set your line color. Adjust Stroke Width to control the thickness — 4–8px works well for most compositions.
Inside Stroke 1, scroll down to find the Dashes section with a + and − button. Click + once. This adds a Dash property — After Effects defaults to a dash of 10px with a 10px gap. Adobe documents Dashes as one of the stroke properties in its reference on shape attributes and paint operations.
Click + a second time to add an explicit Gap value. Now adjust both: Dash controls the length of each dash. Gap controls the space between them. Try Dash: 20, Gap: 12 as a starting point — then tweak to taste. You can keep clicking + to add alternating dash and gap values for complex patterns.
The Offset value shifts the entire dash pattern along the stroke. Animating Offset over time creates a marching ants / moving dashes effect — useful for conveying motion along a path without using Trim Paths.
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.
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.
Set up your Shape Layer, remove the fill, open Stroke 1, and click + to add the first Dash property as described above.
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. It is the same alternating dash-array logic used to stroke SVG paths, so the values behave predictably.
Inside Stroke 1, find Line Cap and change it from Butt Cap to Round Cap. This is what transforms the zero-length dash into a visible circle.
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.
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.
If you'd rather start from a finished project file than build from scratch, both marketplaces we compare in Envato Elements vs Motion Array carry deep libraries of animated line and route templates.
Make sure you have a Shape Layer with a Stroke, Fill at 0%, and your Dash/Gap values set from Method 1 or Method 2.
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.
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.
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. Adobe's guide to keyframe interpolation explains what Easy Ease changes under the hood.
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.
End keyframe (0→100%): The line draws itself on — the front of the line moves forward. Start keyframe (0→100%): The back of the line catches up to the front — the line disappears. Combining both: Keyframe Start to lag behind End by 20–30 frames to create a snake-like animated line that draws on and simultaneously erases its tail.
Dashed Lines on a Curved Path
Everything above applies equally to curved paths — the Pen Tool can draw Bezier curves as well as straight lines, and After Effects' dashes follow the path geometry automatically. Here's how to extend the technique to curves:
Using the Pen Tool for Bezier Curves
Instead of clicking to set a point, click and drag with the Pen Tool. Dragging pulls out control handles that define the curve direction and intensity. Set your first curve point, then click-drag to set a second — After Effects draws a smooth Bezier between them. All the same Stroke Dashes settings apply: the dashes conform to the curve automatically.
Using a Shape (Rectangle or Ellipse) as the Path
Draw a rectangle or ellipse using the Shape Tools while no layer is selected. Then go to Contents → Rectangle 1 (or Ellipse 1) → Stroke 1 → Dashes and click + to add dashes. This is perfect for animated dotted borders around elements — combine with Offset animation for a marching-ants selection effect.
For animated map routes, draw your path with the Pen Tool, add dashes, then use Trim Paths to animate the line drawing from city A to city B. Use Alpha Matte technique for the disappearing tail: duplicate the path layer, remove dashes from the duplicate, and set the dashed layer's Track Matte to Alpha. The undashed layer becomes the matte, revealing the dashed line cleanly as it animates off. This prevents the whole stroke from sliding off which is the most common map-route animation problem. For the map or terrain plate underneath, a subscription library like the one covered in our Artgrid review saves building the background from scratch.
Animated dashed map routes are one of the most common use cases — the technique combines curved paths, stroke dashes, and Trim Paths into a single Shape Layer setup.
Which Method Should You Use?
All three ways of making dotted or dashed lines in After Effects share the same underlying setup — the choice comes down to what visual result you're going for and whether you need animation.
| 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 > 0, 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 |
| Marching ants / moving dashes | Offset anim. | Keyframe Offset over time | Selection indicators, energy/power effects |
| Dashed ellipse border | Shape Tool | Draw ellipse, add Dashes to Stroke | Animated borders, highlight rings, call-outs |
Troubleshooting Dotted or Dashed Lines in After Effects
I clicked + but no dashes appear
Check that Fill Opacity is 0%. If the fill is covering the stroke, dashes may appear present in the properties but invisible because the filled shape is on top. Also check that Stroke Width is set to a visible value (at least 1–2px).
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.
Trim Paths animates the line drawing on but it slides off strangely
This is a well-known After Effects behaviour. When you animate both Start and End to remove the line from screen, the entire stroke moves off as a unit rather than disappearing from the tail. The fix is the Alpha Matte technique: duplicate the dashed path layer, remove all dashes from the duplicate, animate Trim Paths on the duplicate (not the dashed layer), and set the dashed layer's Track Matte to Alpha Matte from the duplicate. The undashed layer acts as the reveal matte, keeping the dashes stationary while the matte controls what's visible.
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. Also enable Continuously Rasterize (the star icon on vector shape layers) to ensure crisp rendering at any scale.
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, or the Topaz Video AI review 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 go to Layer → Create Shapes from Vector Layer (if it's a vector layer) or 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.
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.
"A dashed or dotted line is one of the simplest things in After Effects once you find the + button next to Dashes. Most animators never knew it was there — it's just not where you'd expect it."
Dotted or Dashed Lines in After Effects — Strengths & Limitations
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.
Related Tutorials
Building a full motion graphics kit? Start with our Envato Elements review for templates, fonts, and stock in a single subscription.

Hi there! I’m Titto, the creative mind behind FreemiumVisuals. As a designer come digital artist with 10 years of experience, I’ve always been obsessed with creating high-quality visuals.
This blog is my passion project to help creators like you master tools, hacks, and resources that blend affordability with professional results. Whether you’re a hobbyist or a freelance editor, you can utilize this website as your one-stop destination for the latest AI design tool reviews and software tutorials.
Let’s Connect!
📧 Email: [contact@freemiumvisuals.com]
Got a question or idea? Drop a comment on my latest post!
