Creating a stroke in After Effects is one of the first techniques many of you might have learned when starting with the software. Now, what if you want to turn that regular stroke into a dashed or dotted line in After Effects instead?
This time, we'll show you how to create a dashed or dotted line in After Effects, customize the look, animate it, and even try another way to create and animate a dashed or dotted line you probably like better outside AE.

Part 1. How to Create Dashed and Dotted Lines in After Effects
Creating any kind of stroke, including dashed or dotted lines, in After Effects starts with using the Pen Tool inside a Shape Layer. This is where you can draw your line, apply a stroke, and later animate it using Trim Paths.
For this tutorial, we'll be following the guide created by Ben & Jack Studio using After Effects 2020. However, the same steps also apply to other versions of After Effects, so you can follow along no matter which version you're using.
Step 1. Create a Shape Layer and Path
Select the Pen Tool (or press G) and draw your path on the preview panel. The moment you click, After Effects will automatically create a Shape Layer.

Click once to place the first point, then click again to create the second. After Effects will draw a straight line connecting them.

Tip: If you want to make a curved path, click and drag when setting your second point instead of just clicking once. It will create Bezier handles that let you shape your curve.
Step 2. Add a Dashed or Dotted Line
In the Timeline Panel, open your shape layer and navigate to Contents > Shape 1 > Fill 1.
Set the Opacity to 0% to remove the fill color. This keeps only the stroke visible, which is essential for creating a dashed or dotted line.

Next, go to Contents > Shape 1 > Stroke 1. Find the Dashes section under the Stroke settings and click the + icon to create the dash line in After Effects.

Adjust the Dash value to control how it looks. Lower values create more dashes or dots.
Use the Offset control to fine-tune the dash positioning along the path.
To create a dotted line in After Effects:
In the Dashes section, click the + icon again to add a Gap property.
Adjust the Gap value to control the spacing between the dots. Smaller values make the dots closer together, while larger values spread them apart.

Set the Line Cap option to Round Cap so the stroke ends are rounded.
Set the Dash value to 0, which turns each dash into a perfect dot.

You can also customize the dashed or dotted line further by setting the Stroke Color and adjusting the Stroke Width based on how bold you want the line to appear.
Step 3. Animate the Dashed Line with Trim Paths

To create a dashed line animation that moves along the line, add a Trim Paths animation to your shape layer.
With the Shape Layer selected, click Add > Trim Paths.

Expand the Trim Paths menu and you'll see two sliders: Start and End. They control how much of the line is visible.
Set Start to 0% and End to 0%, then click the keyframe icon next to End to create your first keyframe.

Move the playhead forward on the timeline to where you want the animation to finish, and set the End value from 0% to 100%.

Play back your composition. You'll see the dashed line smoothly draw itself along the path. You can use the same steps for creating a dotted line animation in After Effects.
Note: This tutorial focuses on making the line draw itself (from invisible to visible). If you want to create the reverse effect, where the line slowly disappears instead, just swap the keyframes. Set the End value to 100 percent at the beginning and 0 percent at the end.
Part 2. Common Issues and How to Fix Them
Did you run into problems while creating or animating your dashed line in After Effects? We've gathered some of the most common issues that usually appear when working with strokes or paths in AE, along with easy solutions you can try to fix them quickly.
1. The Dashed Line Looks Pixelated When Rendered

If the dashed or dotted line you created looks blurry or jagged after export, it's usually because the composition resolution is set too low or the line has been scaled up from a smaller shape layer.
Quick Fix:
- In the Preview panel, set the Resolution to Full before rendering.

- Avoid scaling the entire shape layer. You can increase the Stroke Width or recreate the path at the correct size instead.
- When exporting, choose a higher bitrate or a lossless format, such as QuickTime Animation, ProRes 4444, or AVI (Uncompressed), to preserve edge sharpness.
2. The Path Isn't Showing Dashes

Can't see any dash or dot pattern even after you added a stroke path in After Effects? You can check if the fill is still active, or the stroke properties weren't applied correctly.
Quick Fix:
- Open the Shape Layer settings and check if you have set the Fill Opacity to 0% so the stroke is visible.
- Go to Contents > Shape 1 > Stroke 1 and make sure the Dash and Gap values are added.
Another possible cause is that the path you're using isn't part of a Shape Layer, but instead a Mask Path. The Stroke effect applied to a mask doesn't support dash or gap properties. Dashes in After Effects only appear when the path exists inside a Shape Layer that has its own Stroke property.

Quick Fix:
- Copy the mask path and paste it into a Shape Layer instead.
- Follow the steps on how to create a dashed or dotted line in After Effects above.
3. Dashes Move Too Fast or Too Slow When Animated

If your dashed line animation feels too fast or too slow, the issue usually comes from how the keyframes are spaced or how the Offset value is set in the Stroke options.
Quick Fix:
- Open the Trim Paths settings on your Shape Layer.
- Move the keyframes closer together to make the motion faster, or spread them farther apart to slow it down.
- Use the Graph Editor to smooth out speed curves for a more natural animation.
4. Edges Look Harsh or Jagged

When the edges of your dashed or dotted line appear rough, it's usually due to low anti-aliasing or preview quality settings. Scaling the shape layer too much can also cause visible edge artifacts.
Quick Fix:
- Enable Continuously Rasterize (the small sun icon) for your Shape Layer to keep lines sharp at any size.
- In the Preview panel, set the quality to Best instead of Draft.
- Adjust the stroke width if you need a thicker line instead of scaling the shape layer directly.
- If edges still look rough, apply a Gaussian Blur effect with a small value, enough to gently smooth them out.
Part 3. Simple Way to Create and Animate Dashed Lines Without After Effects
For something easier and more beginner-friendly than After Effects, you can also try making dashed line animations directly in a video editor like Wondershare Filmora. Filmora offers you a more intuitive way to create custom paths and turn them into dynamic animations without the need for complex setups.

You're not limited to making simple dotted lines — With Pen Tool, you can easily transform the path you created into a glowing trail, a fire-style animation, or even bind an object to follow along the path with just a few clicks. It's straightforward enough for beginners, yet still flexible to create impressive results.
Why We Recommend Filmora:
- Quickly apply styles and effects like glow, fire, or blur to your dashed or dotted lines for an instant makeover.
- Easily attach any object (or use a built-in preset) to follow your line animation smoothly along the path.
- Enjoy a more intuitive interface that's beginner-friendly and far simpler to navigate than After Effects.
How to Create Dashed or Dotted Lines in Filmora








Bonus: Use Built-In Dashed Line Stickers for Instant Animation
If you want to skip drawing paths manually, Filmora offers a variety of dashed line and dotted line sticker presets that you can apply directly to your videos. These are perfect for creators who want a quick and visually appealing animation without spending time on custom path creation.
- Simply drag and drop the sticker onto your timeline.
- Customize the size, color, and animation speed to fit your project.
- Combine with effects like glow, fire, or motion blur for a more dynamic look.
- Great for social media posts, intros, or motion graphics where speed matters.
Conclusion
Now that you've learned how to create a dashed and dotted line in After Effects, the next thing to do is bring that skill into your own projects. Try using dashed lines to highlight routes on a map, emphasize motion in infographics, or add rhythm to animated transitions.
And since the ability to draw and animate custom paths is not something you can only do in After Effects, you can also create the same effect in Filmora — but with a much simpler workflow.
💬 FAQs About Dashed and Dotted Lines
-
1. How do I make dashed lines loop in After Effects?
You need to adjust the Offset setting under the Stroke options and add keyframes to it. Start by setting the first keyframe at the beginning of your timeline with an Offset value of 0. Then move the playhead to where you want the loop to end and increase the Offset value.
-
2. Can I make text appear in dashed lines in After Effects?
Yes, but you'll need to convert the text into a Shape Layer first. Select your text layer, go to Layer > Create > Create Shapes from Text, and After Effects will generate a shape version of your text. Open the shape's Stroke settings, then add Dashes and Gap values just like you would for a line.
-
3. How to apply dashed or dotted lines to shapes like circles or rectangles?
First, create a circle or rectangle by holding Shift while drawing with the Shape Tool. Then, go to Contents > [Shape Name] > Stroke 1 and click the + icon next to Dashes. Adjust the Dash and Gap values to get the look you want.

