CSS Text Glitch Effect Generator
Create a glitch text effect with two coloured slices that shift and flicker, in pure CSS that respects reduced motion.
How to make a CSS glitch text effect
Type your text
Short words work best.
Choose the slice colours
Two colours split off the main text.
Set the speed
The preview runs on a dark background.
Copy the code
Copy the HTML and CSS blocks into your page.
Worked example
This is what CSS Text Glitch Effect Generator gives for its own sample values. Open the tool above and change anything to try your own.
- Text
- GLITCH
- First slice colour
- #ff2d95
- Second slice colour
- #00e5ff
- One cycle takes (seconds)
- 2
HTML
<h1 class="glitch" data-text="GLITCH">GLITCH</h1>
CSS
.glitch { position: relative; font-size: 3rem; font-weight: 800; margin: 0; }
.glitch::before, .glitch::after {
content: attr(data-text);
position: absolute; inset: 0;
overflow: hidden;
}
.glitch::before { color: #ff2d95; transform: translate(-2px, 0); clip-path: inset(0 0 60% 0); animation: glitch-a 2s infinite steps(2, end); }
.glitch::after { color: #00e5ff; transform: translate(2px, 0); clip-path: inset(55% 0 0 0); animation: glitch-b 2s infinite steps(2, end); }
@keyframes glitch-a { 0%, 100% { transform: translate(-2px, 0); } 25% { transform: translate(2px, -1px); } 50% { transform: translate(-3px, 1px); } 75% { transform: translate(1px, 0); } }
@keyframes glitch-b { 0%, 100% {
...About CSS Text Glitch Effect Generator
Make text that looks like a broken screen. Two copies of the text, clipped to different bands and shifted in different colours, flicker over the original. The effect stops when the device asks for reduced motion.
FAQs
Is the text still readable by screen readers?
Yes. The extra copies are generated by CSS, so assistive technology reads the text once.
Can I use a different font?
Yes. Set font-family on .glitch and the copies follow.
Is it safe to use on a busy page?
Use it on one heading at most. Constant flicker is hard to read and can bother some people.