CSS Glitch Text Effect Generator
Generate a CSS glitch text effect with keyframes, two colour layers and adjustable speed and intensity. Copy the code; no upload.
What the CSS glitch effect generator builds
The effect is three copies of the same text: the element itself and two pseudo-elements that read their content from data-text, so the attribute is set once and both copies follow. Each pseudo-element is offset by a few pixels, coloured from the two colour controls and clipped to a horizontal band with clip-path: inset(), while one shared keyframe jitters all three. Intensity sets the offset in pixels and speed sets the animation duration. This is a starting point rather than a finished effect: the copies repeat attr(data-text), so the markup must carry a data-text attribute that matches the visible text, and the band positions are fixed percentages that a much longer word may need adjusted by hand.
How to use it
Set the intensity in pixels and the speed in seconds, choose the two glitch colours, then press Run. The rule expects markup that repeats the visible text in a data-text attribute, which is what the two pseudo-element layers copy.
Worked example
Input:
intensity: 4px, speed: 2s, colour A: #00f0ff, colour B: #ff00a0
Output:
@keyframes glitch-shift {
0%, 100% {
transform: translate(0, 0);
}
20% {
transform: translate(-4px, 2px);
}
40% {
transform: translate(4px, -2px);
}
60% {
transform: translate(-2px, -4px);
}
80% {
transform: translate(2px, 4px);
}
}
.glitch {
position: relative;
display: inline-block;
animation: glitch-shift 2s steps(2, end) infinite;
}
.glitch::before {
content: attr(data-text);
position: absolute;
inset: 0;
color: #00f0ff;
clip-path: inset(12% 0 58% 0);
transform: translate(-4px, 0);
animation: glitch-shift 2s steps(2, end) infinite alternate-reverse;
}
.glitch::after {
content: attr(data-text);
position: absolute;
inset: 0;
color: #ff00a0;
clip-path: inset(58% 0 12% 0);
transform: translate(4px, 0);
animation: glitch-shift 2s steps(2, end) infinite alternate;
}
Why it runs in your browser
The result is produced on this page with JavaScript, so it works offline after the page loads and nothing you enter is sent anywhere.
The effect is three copies of the same text: the element itself and two pseudo-elements that read their content from data-text, so the attribute is set once and both copies follow. Each pseudo-element is offset by a few pixels, coloured from the two colour controls and clipped to a horizontal band with clip-path: inset(), while one shared keyframe jitters all three. Intensity sets the offset in pixels and speed sets the animation duration. This is a starting point rather than a finished effect: the copies repeat attr(data-text), so the markup must carry a data-text attribute that matches the visible text, and the band positions are fixed percentages that a much longer word may need adjusted by hand.
Generate a CSS glitch text effect with keyframes, two colour layers and adjustable speed and intensity. Copy the code; no upload.
How to use it
Set the intensity in pixels and the speed in seconds, choose the two glitch colours, then press Run. The rule expects markup that repeats the visible text in a data-text attribute, which is what the two pseudo-element layers copy.
Why it runs in your browser
The result is produced on this page with JavaScript, so it works offline after the page loads and nothing you enter is sent anywhere.
What to Expect
What this tool keeps
- The result is produced on this page with JavaScript, so it works offline after the page loads and nothing you enter is sent anywhere.
Sample input
intensity: 4px, speed: 2s, colour A: #00f0ff, colour B: #ff00a0
Sample output
@keyframes glitch-shift { 0%, 100% { transform: translate(0, 0); } 20% { transform: translate(-4px, 2px); } 40% { transform: translate(4px, -2px); } 60% { transform: translate(-2px, -4px); } 80% { transform: translate(2px, 4px); } } .glitch { position: relative; display: inline-block; animation: glitch-shift 2s steps(2, end) infinite; } .glitch::before { content: attr(data-text); position: absolute; inset: 0; color: #00f0ff; clip-path: inset(12% 0 58% 0); transform: translate(-4px, 0); animation: glitch-shift 2s steps(2, end) infinite alternate-reverse; } .glitch::after { content: attr(data-text); position: absolute; inset: 0; color: #ff00a0; clip-path: inset(58% 0 12% 0); transform: translate(4px, 0); animation: glitch-shift 2s steps(2, end) infinite alternate; }
Frequently asked questions
How do I use the css glitch text effect generator?
Set the intensity in pixels and the speed in seconds, choose the two glitch colours, then press Run. The rule expects markup that repeats the visible text in a data-text attribute, which is what the two pseudo-element layers copy.
Is my input uploaded?
Nothing is uploaded. The result is produced on this page.
Is there a size limit?
No: nothing is pasted, so there is no input size to exceed.
Build custom tools for your store
Join the SDK program to create useful ecommerce utilities for your store.