Please bookmark this page to avoid losing your image tool!

Glitch Video Editor

(Free & Supports Bulk Upload)

Drag & drop your images here or

The result will appear here...
You can edit the below JavaScript code to customize the image tool.
function processImage(originalImg, intensity = "20", fps = "15") {
    const canvas = document.createElement('canvas');
    const ctx = canvas.getContext('2d');
    canvas.width = originalImg.width;
    canvas.height = originalImg.height;
    
    // Parse parameters
    const intensityNum = parseFloat(intensity) || 20;
    const fpsNum = parseFloat(fps) || 15;
    const intervalMs = 1000 / fpsNum;

    let framesNotConnected = 0;

    function renderGlitch() {
        // Prevent memory leaks if the canvas is removed from the DOM
        if (!canvas.isConnected) {
            framesNotConnected++;
            // Stop animating if unbound for more than roughly 5 seconds
            if (framesNotConnected > (fpsNum * 5)) return; 
        } else {
            framesNotConnected = 0;
        }

        ctx.globalAlpha = 1.0;
        ctx.globalCompositeOperation = 'source-over';
        ctx.clearRect(0, 0, canvas.width, canvas.height);
        
        // Draw the base original image
        ctx.drawImage(originalImg, 0, 0, canvas.width, canvas.height);

        // Randomly skip processing a frame to show normal un-glitched image occasionally
        if (Math.random() < 0.15) {
            setTimeout(renderGlitch, intervalMs);
            return;
        }

        // Effect 1: Global Chromatic Aberration / Color Flash Effect
        if (Math.random() > 0.8) {
            const shiftX = (Math.random() - 0.5) * intensityNum * 3;
            const shiftY = (Math.random() - 0.5) * Math.min(10, intensityNum);
            
            ctx.globalAlpha = 0.7;
            ctx.globalCompositeOperation = 'screen';
            ctx.drawImage(originalImg, shiftX, shiftY, canvas.width, canvas.height);
            
            ctx.globalCompositeOperation = 'overlay';
            const flashColors = ['rgba(255, 0, 0, 0.5)', 'rgba(0, 255, 255, 0.5)', 'rgba(0, 255, 0, 0.5)'];
            ctx.fillStyle = flashColors[Math.floor(Math.random() * flashColors.length)];
            ctx.fillRect(0, 0, canvas.width, canvas.height);
            
            ctx.globalAlpha = 1.0;
            ctx.globalCompositeOperation = 'source-over';
        }

        // Effect 2: Horizontal Glitch Slices 
        const maxSlices = Math.floor((Math.random() * 20 * intensityNum) / 20) + 1;
        const totalSlices = Math.floor(Math.random() * maxSlices);

        for (let i = 0; i < totalSlices; i++) {
            const sliceY = Math.random() * canvas.height;
            const sliceH = Math.random() * (canvas.height / 6);
            
            const isMajorGlitch = Math.random() > 0.85;
            const offsetX = (Math.random() - 0.5) * intensityNum * (isMajorGlitch ? 4 : 1.5);
            
            // Randomly colorize a slice for VHS channel-shift effect
            if (Math.random() > 0.65) {
                ctx.save();
                ctx.beginPath();
                ctx.rect(0, sliceY, canvas.width, sliceH);
                ctx.clip();

                ctx.drawImage(originalImg, offsetX, 0, canvas.width, canvas.height);
                
                const sliceColors = [
                    'rgba(255, 0, 0, 0.4)', 
                    'rgba(0, 255, 255, 0.4)', 
                    'rgba(0, 255, 0, 0.4)', 
                    'rgba(255, 0, 255, 0.4)'
                ];
                ctx.fillStyle = sliceColors[Math.floor(Math.random() * sliceColors.length)];
                ctx.globalCompositeOperation = 'source-over';
                ctx.fillRect(0, sliceY, canvas.width, sliceH);
                
                ctx.restore();
            } else {
                // Direct positional shift for slice
                ctx.drawImage(
                    originalImg,
                    0, sliceY, canvas.width, sliceH, // Source parameters
                    offsetX, sliceY, canvas.width, sliceH // Destination parameters
                );
            }
        }

        // Effect 3: CRT TV Analog Scanlines overlay
        if (Math.random() > 0.4) {
            ctx.fillStyle = `rgba(0, 0, 0, 0.15)`;
            const scanlineHeight = Math.max(1, Math.floor(canvas.height / 250));
            const step = scanlineHeight * 2;
            for (let y = 0; y < canvas.height; y += step) {
                ctx.fillRect(0, y, canvas.width, scanlineHeight);
            }
        }

        // Effect 4: V-sync stutter (slight vertical mis-alignment frame)
        if (Math.random() > 0.96) {
            const shiftY = (Math.random() - 0.5) * (canvas.height * 0.1);
            ctx.save();
            ctx.globalAlpha = 0.6;
            ctx.drawImage(originalImg, 0, shiftY, canvas.width, canvas.height);
            ctx.restore();
        }

        // Schedule next glitch frame
        setTimeout(renderGlitch, intervalMs);
    }

    // Start playing the glitch animation loop
    renderGlitch();
    
    return canvas;
}

Free Image Tool Creator

Can't find the image tool you're looking for?
Create one based on your own needs now!

Description

The Glitch Video Editor is an online tool that applies dynamic, animated glitch effects to static images. It transforms regular photos into stylized videos by simulating visual artifacts such as chromatic aberration, horizontal slice shifts, color flashes, and CRT scanline overlays. Users can adjust the intensity of the distortions and the frame rate of the animation. This tool is ideal for creators looking to add a retro, VHS, or cyberpunk aesthetic to their digital content for social media, motion graphics, or artistic projects.

Leave a Reply

Your email address will not be published. Required fields are marked *

Other Image Tools:

Glitch Video Load Editor

Octoblock Major Image Effect Generator

Text Extraction From Pixar Animation Credits Image

Sohone Major Image Effect Generator

Glim Major Image Effect Generator

Mune Major Image Effect Generator

Image Color To Grey Filter Viewer

Website To Image Screenshot Capture Tool

Mina-Girl Major Image Effect Generator

Vita-Boy Major Image Effect Generator

Cringle Major Image Effect Generator

Batch Chroma Key Background Remover and Green Spill Eliminator

Photo Background and Green Particle Remover While Preserving Hair

Photorealistic California Driver License Generator

California Driver’s License Photorealistic Image Generator

California Driver License Photorealistic Image Generator

Photorealistic California Driver’s License Image Generator

California Driver’s License Security Template Generator

Blank California Driver License Security Background Template Creator

California State Driver License Image Creator

California Driver License Realism Enhancer

California State ID Card Generator Tool

California State ID Card Generator for Ronald Sanchez

Image To Mp3 Audio Player

Android Ringtone MP3 Audio Player

Android Ringtone MP3 Audio Track Recorder and Player

AI Werewolf Transformation Image Generator

Photo To Werewolf Transformer

Image To Werewolf Transformation Tool

Television Icon Image

Expired Film Effect Photo Filter

Image To Realistic iPhone Style JPEG Converter With Custom Metadata

Explosive Apocalypse Image Generator

Unknown Description Tool

Unknown Cartoon Character Identifier

Image Crazy TV Channel Mania Filter

See All →