Introduction to the Heartbeat Line Effect
A heartbeat line animation is a popular visual often used in medical videos, motion graphics, and music visualizers. It creates a pulsing line that mimics an electrocardiogram (ECG) effect. In this tutorial, you’ll learn how to draw and animate a glowing blue heartbeat line using only built-in tools in After Effects — no plugins required.
Step 1: Create a New Composition
Go to Composition > New Composition, set your desired resolution and duration, then click OK. This will be your main workspace for creating and animating the heartbeat line.

Step 2: Draw the Heartbeat Line
Select the Pen Tool (G) and draw the shape of a heartbeat line on your composition — you can use an ECG image from the internet as a visual reference. Set Fill to None, Stroke to Blue, and adjust the Stroke Width to around 11 px. This will create a clean, visible line for your animation.
Get 10% off when you subscribe to our newsletter

Step 3: Adjust Line Properties
Expand your shape layer by clicking the arrow next to its name. Under Contents > Shape > Stroke, set Line Join to Round Join for smooth curves. You can also adjust Start Length to control the line’s appearance if needed.
Step 4: Animate with Trim Paths
Next to the Contents section, click the Add button and choose Trim Paths. Move the CTI (Current Time Indicator) to the start of your composition and click the stopwatch icons next to both Start and End to create keyframes. Set Start and End to 0% at the beginning. Then, move the CTI forward a few seconds and change End to 100%. Finally, move the CTI near the end of the composition and set Start to 100%. This will create a smooth animation where the heartbeat line draws itself across the screen and fades away, mimicking a real ECG pulse.

Step 5: Add a Glow Effect
From the Effects & Presets panel, search for Glow and apply it to the shape layer.
In the Effect Controls panel, increase the Glow Radius to around 57 to create a soft, glowing light effect that enhances the heartbeat line.
Step 6: Preview and Refine
Press Spacebar to preview your animation. Adjust the Trim Paths timing or Glow settings if needed to make the heartbeat movement smoother and more dynamic.
Conclusion
Creating a heartbeat line in After Effects is a simple but effective way to add energy and visual interest to your project. By combining the Pen Tool, Trim Paths, and Glow, you can make a professional, glowing ECG-style animation that fits perfectly in motion graphics, health videos, or music visuals.
