Text Glitch Generator

Apply digital glitch effects to your text.

CYBERPUNK

80px
2s
5px
#ff003c
#00eaff

<h1 class="glitch" data-text="CYBERPUNK">CYBERPUNK</h1>

/* Place this in your CSS */
.glitch {
  position: relative;
  font-size: 80px;
  font-weight: bold;
  color: #fff;
  letter-spacing: 0.1em;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000; /* Matches background color to hide main text behind slices */
}

.glitch::before {
  left: 5px;
  text-shadow: -2.5px 0 #ff003c;
  animation: glitch-anim-1 2s infinite linear alternate-reverse;
}

.glitch::after {
  left: -5px;
  text-shadow: -2.5px 0 #00eaff;
  animation: glitch-anim-2 1.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
  0% { clip-path: inset(20% 0 80% 0); }
  20% { clip-path: inset(60% 0 10% 0); }
  40% { clip-path: inset(40% 0 50% 0); }
  60% { clip-path: inset(80% 0 5% 0); }
  80% { clip-path: inset(10% 0 70% 0); }
  100% { clip-path: inset(30% 0 20% 0); }
}

@keyframes glitch-anim-2 {
  0% { clip-path: inset(10% 0 60% 0); }
  20% { clip-path: inset(30% 0 20% 0); }
  40% { clip-path: inset(70% 0 10% 0); }
  60% { clip-path: inset(20% 0 50% 0); }
  80% { clip-path: inset(60% 0 20% 0); }
  100% { clip-path: inset(5% 0 80% 0); }
}