$ run --tool
Recursion Visualizer
Watch the call stack grow and unwind step by step for Factorial, Fibonacci, Sum of Digits, Power and GCD.
Complexity —Time O(n)Space (call stack) O(n)
Features
- ✓5 classic recursive functions: Factorial, Fibonacci, Sum of Digits, Power, GCD
- ✓Visual call stack that grows on each call and unwinds on each return
- ✓Time and space complexity shown for each function
- ✓Play/Pause with adjustable speed, or step manually
How to use
- 1Pick a recursive function and enter its input(s)
- 2Click Run to generate the full call sequence
- 3Step through with Next/Prev or Play to watch the stack grow and unwind
Frequently asked questions
Why is Fibonacci limited to a small n?+
Naive recursive Fibonacci makes an exponential number of calls — keeping n small keeps the stack visualization readable instead of generating thousands of steps.
How is this different from the DSA Visualizer?+
This tool focuses specifically on how recursive calls stack up and return, rather than sorting/searching arrays or stack/queue operations.
Related tools
education
DSA Visualizer — Arrays, Stacks, Queues & Complexity
Watch sorting, searching, array operations, stack/queue operations run step by step, plus a full time-complexity reference.
education
Binary Search Tree Visualizer
Insert, search and traverse a binary search tree, watching comparisons and the tree shape update step by step.
Need a tool that isn't here yet?
ToolsForce is growing every week. Tell us what to build next.
Request a tool