Top 5 After Effects Expressions That Will Instantly Improve Your Animations
If you want your animations to look smoother, cleaner, and more professional, learning a few powerful After Effects expressions can make a huge difference. Instead of adding hundreds of keyframes, you can use simple lines of code to automate motion, add realism, and speed up your workflow.
In this guide, I will share 5 AE expressions that can instantly level up your animations. Each expression comes with a clear explanation and the exact code, so you can simply copy and paste.
Let’s begin.
1. Bounce Expression
The Bounce Expression is one of the most popular ways to make animations feel natural. Instead of stopping suddenly, your object adds a small bounce at the end, which creates more life in the motion.
When to use: Scale animations, position moves, icon pops, text reveals.
Example:
n = 0;
if (numKeys > 0){
n = nearestKey(time).index;
if (key(n).time > time){
n--;
}
}
if (n == 0){
t = 0;
}else{
t = time - key(n).time;
}
if (n > 0 && t < 1){
v = velocityAtTime(key(n).time - thisComp.frameDuration/10);
amp = .06;
freq = 3;
decay = 5.0;
value + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);
}else{
value;
}
How to use:
Animate your property (for example, scale from 100% to 120%) and paste the bounce expression into the property’s Expression panel.
This expression automatically adds a reactive bounce without extra keyframes or plugins.
Result:
Before bounce: stiff movement
After bounce: smooth, realistic motion
2. Wiggle Expression
The Wiggle Expression adds natural randomness to your animation. It is especially useful for handheld camera movement, shaking objects, or adding atmospheric motion.
Example:
wiggle(1,50);
Here, the first number controls speed, and the second number controls intensity.
Where to use:
Camera position, lights, UI elements, floating icons, text motion.
A subtle wiggle adds natural movement, while a strong wiggle creates heavy chaos.
3. Squash and Stretch
If you want your objects to feel more elastic or cartoony, this expression is perfect. It recreates the classic animation principle of squash and stretch, giving your objects more personality.
Example:
maxDev = 13; // max deviation in pixels
spd = 30; //speed of oscillation
decay = 1.0; //how fast it slows down
t = time - inPoint;
x = scale[0] + maxDev*Math.sin(spd*t)/Math.exp(decay*t);
y = scale[0]*scale[1]/x;
[x,y]
Where to apply:
Scale property of any shape or object.
You can adjust values like maxDev, speed, or decay to control how much your object stretches or squishes. Higher values create more dramatic movements.
Result:
Before: basic bounce
After: animated character-like movement
4. Motion Tail Expression
This expression creates a smooth motion trail behind any moving object. It is perfect for speed lines, dynamic transitions, and fast-moving elements.
Example:
First animate the position of an object. Then apply bellow’s expression to the position:
delay = 5; //number of frames to delay
d = delay*thisComp.frameDuration*(index - 1);
thisComp.layer(1).position.valueAtTime(time - d)
And this code to the opacity:
opacityFactor = .75;
Math.pow(opacityFactor,index - 1)*100
How to use:
- Animate your main object.
- Add one expression to Position and another to Opacity.
- Duplicate the layer multiple times.
The duplicates follow the original object with slight delay, creating a clean motion trail effect without plugins.
Result:
A smooth ghost-like trail following your main animation.
5. Timer Up / Timer Down Expression
This expression turns a text layer into a functional timer. It automatically counts up or down and displays hours, minutes, seconds, and even milliseconds.
Example:
//Define time values
var hour = Math.floor((time/60)/60);
var min = Math.floor(time/60);
var sec = Math.floor(time);
var mili = Math.floor(time*60);
// Cleaning up the values
if (mili > 59){ mili = mili - sec*60; }
if (mili < 10){ mili = "0" + mili; } if (sec > 59){ sec = sec - min*60; }
if (sec < 10){ sec = "0" + sec; } if (min >= 59){ min = min - hour*60; }
if (min < 10){ min = "0" + min; }
// no hour cleanup
if (hour < 10){ hour = "0" + hour; }
//Output
hour + ' : ' + min + ' : ' + sec + ' : ' + mili;
Where to use:
HUD elements, speed edits, digital clocks, progress bars.
How it works:
Create a text layer, paste the expression on Source Text, and the timer will start running immediately. You can customize it to count upward or downward.
Final Thoughts
These five expressions are some of the most powerful tools inside After Effects. They help you work faster, keep your timelines clean, and make your animations look professional.
All expression codes are available below the video or inside your project files, so you can copy and paste them instantly.
If you found this tutorial helpful, feel free to explore more advanced presets, overlays, and editing tools at KirtanFX.com.
Thanks for reading, and see you in the next tutorial.



