Make the Matrix digital rain effect online. Adjust fall speed, glyph set, colour and trail length, then export a video, a PNG, or a self-contained HTML file with the source. Free and runs in your browser.
Knobs patch the running animation live. A few (marked in the code as baked-in values like particle counts) restart the preview.
Falling glyph columns — the classic translucent-wipe trail trick.
Your code runs in a sandboxed frame with no access to this page, and it is never sent to a server. three.js demos load the library from jsDelivr; the rest need nothing but the browser.
The falling-glyph effect from The Matrix is one of the most copied animations on the web, and it is far simpler than it looks. There is no simulation and no particle system — just one falling character per column, and a trick with how the canvas is cleared.
Almost every beginner attempt clears the canvas with clearRect each frame, which produces a single row of jittering characters with no trail. The real effect never clears at all. Instead it paints a nearly-transparent black rectangle over the whole canvas every frame:
ctx.fillStyle = 'rgba(3, 8, 5, 0.08)';
ctx.fillRect(0, 0, width, height);
Every previously drawn glyph gets 8% darker per frame, so the characters behind the leading edge fade out over roughly a second. That single line is the trail. The trail length control here is that alpha value: lower means longer.
Read the JS panel to see the whole implementation; it is about 40 lines. Everything runs in your browser and nothing is uploaded.
The generated effect is roughly forty lines of canvas code with no dependencies, which makes it practical as a real website background rather than just a demo. A few things matter if you ship it.
Put the canvas in a fixed-position container behind your content and take it out of the accessibility tree:
<canvas id="matrix" aria-hidden="true"></canvas>
#matrix { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
pointer-events: none matters — without it the canvas will swallow clicks meant for your page.
Full-screen continuous motion is a real accessibility problem for people with vestibular disorders. Check the preference and do not start the loop if the visitor has asked for less motion:
if (matchMedia("(prefers-reduced-motion: reduce)").matches) return;
Browsers throttle requestAnimationFrame in background tabs, but the loop still costs something and can keep a laptop awake. Pause explicitly:
document.addEventListener("visibilitychange", () => {
if (document.hidden) cancelAnimationFrame(handle);
else handle = requestAnimationFrame(frame);
});
The whole canvas is repainted every frame — one translucent rectangle plus two fillText calls per column. At a 16px glyph size on a 1920px display that is around 120 columns, or 240 text draws a frame, which is comfortable. Cost scales with the number of columns, so a smaller glyph size is more expensive, not less. Cap the device pixel ratio at 2: a 3x buffer costs nine times the fill rate of 1x for no visible gain on glyphs this size.
Most reimplementations of this effect look subtly wrong, and it is almost always one of these four things.
Using clearRect gives you a single row of jittering glyphs with no tail. The effect depends on never clearing: a translucent rectangle is painted over the whole canvas each frame, so previous glyphs decay instead of vanishing. The fade alpha is the trail length.
If every column advances at the same rate, the eye reads a descending grid rather than rain. Two independent sources of desynchronisation fix it: a per-column speed multiplier, and a reset that only fires with a small random probability once a column passes the bottom. The second is what keeps columns permanently out of phase rather than merely starting out that way.
In the film the leading character is near-white and the tail is saturated green. Drawing every glyph the same colour loses the sense of a droplet with a direction of travel. Here the head is drawn at high lightness and a second, dimmer glyph is drawn just behind it.
Each cell should re-randomise its character as it falls, rather than carrying one letter down the screen. The original effect flickers because the glyph at a given position keeps changing while the column advances through it.
The film used mirrored half-width katakana mixed with Latin digits and a handful of symbols — the designer reportedly scanned them from a Japanese cookbook. Because the glyphs are mirrored, no real font reproduces the originals exactly; katakana plus digits is the closest you get without a custom typeface.
The canvas is never cleared. Each frame paints a nearly-transparent black rectangle over the entire canvas, so every previously drawn glyph gets slightly darker until it disappears. That is the whole trail effect - there is no stored history of past positions. The Trail length control is that transparency value: lower means the fade takes longer and tails get longer.
Use Record to capture a WebM video and set it as an animated wallpaper, or use Download .html to get a self-contained file you can open fullscreen in a browser. The HTML file has no dependencies and works offline straight from disk.
Mirrored half-width katakana mixed with Latin digits and a few symbols - the designer reportedly scanned them from a Japanese cookbook. This generator defaults to katakana plus digits, and also offers binary, hexadecimal and source-code punctuation.
Yes. Download .html gives you the complete implementation - roughly 40 lines. Drop the canvas into your page, position it absolutely behind your content with a negative z-index, and let it run. Keep the glyph size reasonably large and consider pausing it when the tab is hidden, since it repaints the whole canvas every frame.
Each column gets its own speed multiplier, and a column that reaches the bottom only resets with a small random chance per frame. Without both of those the columns march in lockstep and the effect reads as a descending grid rather than rain.
Edit and run 20 canvas, WebGL, three.js and CSS animations live in your browser.
Explore the Mandelbrot set in your browser - zoom, pan, tune iterations, switch to Julia sets, and save a PNG.
Draw spirograph and harmonograph figures in your browser. Adjust the frequency ratio, radii and damping, then save a PNG.