
ClipTidy is a Unity editor utility that removes redundant keyframes from Animation Clips while preserving the visual output and clip duration. Perfect for cleaning up complex animations with dozens of properties where unnecessary keyframes accumulate during iteration.
ClipTidy → Tidy Selected Clips - Clean clips immediatelyClipTidy → Tidy Selected Clips (Simulate) - Preview changes without actually cleaningAlternatively, you can use Assets → ClipTidy → Tidy Selected Clips from the top toolbar menu

Enable detailed logging via top toolbar menu:
JustSleightly → ClipTidy → Enable Debug LogsWhen enabled, you’ll see:
ClipTidy analyzes each property curve in an AnimationClip and removes keyframes that:
The tool operates in two modes:
ClipTidy considers a keyframe redundant if it meets all applicable conditions below:
- The first keyframe (time = 0) is NEVER removed
- Reason: Defines the animation’s starting state
- The last keyframe is protected if it’s the only curve defining clip duration
- Example: A 2-second clip with one curve ending at 2.0s keeps its final keyframe
- Exception: If multiple curves end at the same time, redundant last keyframes can be removed
For standard animation curves (floats), a keyframe at index
iis redundant if:Middle Keyframes (not first or last):
keyframe[i].value == keyframe[i-1].value(exact equality)keyframe[i].value == keyframe[i+1].value(exact equality)- Tangents between all three keyframes are “flat” (see Tangent Rules below)
Last Keyframes:
keyframe[i].value == keyframe[i-1].value(exact equality)- Tangents between the two keyframes are “flat”
- At least one other curve maintains the clip duration
Why Exact Equality?
- No tolerance is applied to value comparison (conservative approach)
- Prevents accidental removal of visually important micro-variations
- Only tangent checking uses a tiny tolerance (0.0001) for floating-point precision
A tangent is considered “flat” if it meets any of these conditions:
Zero Tangent (
tangent == 0.0)
- Linear interpolation with no slope
- Example: Linear mode keyframes with identical values
Infinity Tangent (
float.IsInfinity(tangent))
- Constant/Stepped interpolation mode
- Creates a hard step between keyframes
- Example: GameObject activation toggles
NaN Tangent (
float.IsNaN(tangent))
- Edge case for auto-calculated tangents
- Rare but handled for robustness
Near-Zero Tangent (
Mathf.Abs(tangent) < 0.0001)
- Handles floating-point precision issues
- Extremely small tangents that are effectively flat
Both tangents must be flat:
outTangentof previous keyframeinTangentof current keyframe
For object reference curves (sprites, materials, etc.):
Middle Keyframes:
keyframe[i].value == keyframe[i-1].value(same object reference)keyframe[i].value == keyframe[i+1].value(same object reference)Last Keyframes:
keyframe[i].value == keyframe[i-1].value(same object reference)- At least one other curve maintains the clip duration
Note: Object references have no tangents, so only value equality matters
No. ClipTidy uses conservative detection rules and only removes keyframes that provably don’t affect visual output. Use Simulate mode first if concerned.
Yes. All changes are registered with Unity’s undo system (Ctrl+Z / Cmd+Z).
Likely due to non-flat tangents. Even with identical values, custom tangent curves can create visual motion.
Currently hardcoded to
0.0001f.
Special thanks to jellejurre for writing the core of ClipTidy
dev.sleightly.cliptidy
Undefined
1.0.0
Undefined
No dependencies
No legacy packages
Undefined