Paste any recursive JavaScript function and watch it run as a live call tree. You can step forward and back through every call, see arguments go down and return values come back up, and watch the call stack grow and shrink. Memoisation and variables are tracked as you go. Your code runs in a sandbox in your browser, and infinite loops are caught safely. Share a link to any trace or export it as an animation. Free, no sign-up
Hey Product Hunt,
I built Code Visualiser because recursion is where most people learning to code get stuck, and I was one of them.
You can read fib(n-1) + fib(n-2) a hundred times and still not see what happens. Most of us end up drawing call trees on paper, losing track by the third level, and starting over. Debuggers don't help much either: they show one stack frame at a time, not the shape of the whole computation.
So Code Visualiser draws that shape for you:
- Live call tree: every call becomes a node, and return values travel back up to their parent.
- Step through time: play, pause, scrub, or step backwards. You can also set breakpoints on a specific call.
- Call stack and variables: see exactly what each frame holds at every moment.
- Memo view: watch a cache fill up and see which branches it cuts off.
- Narration: a plain-English explanation of each step, which helps if you're teaching or revising.
- Share and export: send a link to a trace, or export it as an animation for slides and blog posts.
There's also an Algorithms section with ready-made examples (sorting, backtracking, DP) if you'd rather explore than write code.
Who it's for: students learning recursion, people preparing for coding interviews, and teachers who are tired of drawing trees on whiteboards.
I'd love to hear from you: what's the recursive function that confused you most when you were learning? Paste it in and tell me whether the visualiser helped. I'll be here answering questions and reading feedback.