CSS Text Glitch Generator

Create an animated CSS glitch text effect. Type your text, choose the two offset colors, set the intensity, speed and size, and decide whether it glitches all the time or only on hover. The output is self-contained HTML and CSS with no JavaScript, and it switches off for visitors who've asked for reduced motion. It's free, runs in your browser, and nothing is uploaded.

Classic glitch color pairs

LookLayer 1Layer 2
RGB split#ff00c1#00fff9
Red/cyan anaglyph#ff0000#00ffff
Synthwave#f72585#4cc9f0
Terminal#00ff41#008f11

When to use it

  1. Make a cyberpunk or gaming-style hero title.
  2. Add a glitch hover effect to a portfolio name.
  3. Style an error page or 404 heading.
  4. Create a title card for a music or event page.

How to Use

  1. Type your text and set a class name.
  2. Choose text, background and the two layer colors.
  3. Adjust intensity, duration and size.
  4. Copy the HTML and CSS.

Features

  1. Pure CSS, no JavaScript
  2. Two offset color layers
  3. Intensity and speed controls
  4. Hover-only option
  5. Turns off for reduced motion
  6. 100% client-side

FAQs

How does the CSS glitch effect work?

Two copies of the text, created with ::before and ::after from a data-text attribute, are offset, tinted and sliced by an animated clip-path.

Why does the background color matter?

The glitch layers are painted with it to hide parts of the text. If it doesn't match the page, you'll see colored boxes.

Is it safe for everyone?

Flickering animation can trigger migraines and seizures. This CSS turns the effect off for anyone with reduced motion enabled; consider the hover-only option too.

Does it work with any font?

Yes. It uses the element's own font; bold display fonts look best.

Is anything uploaded?

No. The code is generated in your browser.

Technical Details

The glitch effect duplicates the text into two pseudo-element layers using content: attr(data-text), so the layers always show the same words as the element without repeating them in the markup. Each layer is offset a couple of pixels in opposite directions and given a colored text-shadow — classically magenta and cyan — then sliced with an animated clip-path: inset() that shows a different horizontal band on each keyframe while nudging the layer sideways. Two keyframe sets running at slightly different durations keep the slices from lining up, which is what makes it look random. The layers are painted with the background color so the slices hide the real text beneath them, which is why the background must match the page. A hover-only variant starts the animation on :hover. Under prefers-reduced-motion the layers are removed entirely, since rapid flicker can trigger migraines and, in rare cases, seizures.

Web & CSS Tools

Web & CSS Tools

  • React Native Shadow Generator
  • CSS Specificity Calculator
  • CSS Color & Property Extractor
  • Responsive Breakpoint Cheatsheet
  • Google Fonts Pair Finder
  • CSS Clamp Generator
  • Fluid Type Scale Generator
  • CSS Flexbox Generator