Make a GIF loop

Set an animated GIF to repeat forever, a number of times or play once. It is rewritten on this device and never uploaded.

Make a GIF loop forever, play a set number of times or play once, in your browser. It is free, needs no account and adds no watermark, and your files are not uploaded: everything runs in your browser on your device. No watermark. The limit is your device’s memory (phones hold less): a long or very large GIF may need a computer.

Drop GIFs to loopor click to choose files. Batches welcome.
    Details

    Every frame’s time is multiplied by the speed and rounded to a hundredth of a second. Browsers show anything under 0.02 s as about 0.1 s, so a GIF that is already very fast cannot be made faster: its frames stop at 0.02 s.

    The loop setting is a small block in the GIF’s header. Forever writes a count of 0, a number writes how many times to play, and once leaves the block out. Some viewers and chat apps ignore it and always loop. Forward then back adds the frames in reverse after the originals, so the file is about twice the size.

    Backwards plays the frames last to first, each with its own time, and the loop setting is kept.

    Working…

    Done

    Free, no ads. Support StayPut

    Your files are processed on this device and never sent to a server. Reload the page to clear everything from memory.

    A GIF that plays once and stops, or that you want to stop after a few turns, carries its answer in a small header block: the loop count. Drop the GIF, choose Loop forever, a number of times from 1 to 100, or Play once, and press Set loop. The frames and their timing are written to a new GIF with the count you chose.

    For a clip that plays forward and then backward, tick Play forward, then back: the frames are added again in reverse, so the file is about twice the size. If you are starting from pictures or a video rather than a GIF, GIF maker has its own loop option, and Reverse GIF plays an existing GIF backwards.

    Each frame is first drawn as the whole picture, the way a browser plays it, then written again with the same delay, so the GIF keeps its size and frame count. Colours are re-matched to a fresh palette of up to 256 colours. To change the pace in the same run, pick a speed, or use Change GIF speed on its own.

    How it works

    1. Drop one or more animated GIFs.
    2. Choose Loop forever, Play a set number of times or Play once.
    3. Press Set loop and save the new GIFs.

    In your browser, not on a server

    gifuct-js (MIT) reads the GIF byte by byte in your tab and every frame is composited the way browsers play it, so partial frames and disposal rules are resolved into whole pictures. The frames are put in the new order, each frame’s delay is multiplied by the speed and rounded to whole hundredths of a second, and gifenc’s (MIT) colour quantizer and LZW coder write them back with the loop setting. The new GIF is assembled in memory.

    Compared with upload-based tools: Here the GIF is re-timed in this tab: the file is not uploaded, the limit is your device’s memory (phones hold less), and no watermark is added.

    Verify it yourself. Give the page a short while after one visit to save itself for offline use, then turn off Wi-Fi or switch to airplane mode and run the tool again. Or open your browser's developer tools (F12, or Cmd-Option-I on a Mac), pick the Network tab, and watch it while you convert. The panel above does the same count for you.

    Questions

    Why does my GIF still not loop in some apps?

    The loop count is a small block in the GIF’s header, and some viewers, chat apps and social networks ignore it: a few always repeat, a few always play once. If the GIF loops forever here and not there, the other app is overriding the file. Open the saved GIF in a browser tab to check what the file itself says.

    How many times does “play 3 times” play?

    Three plays in total. The GIF format stores how many times to repeat after the first play, so the file is written with a count of 2. Play once leaves the loop block out, which every player shows as one play.

    What does forward and back do to the file size?

    It about doubles it, because the frames are stored a second time in reverse order. The first and last frames are not repeated, so the turn-around has no stutter.

    Can I make a GIF from pictures that loops?

    Yes. GIF maker builds a GIF from a set of pictures and has a loop option of its own.

    Are the frames and timing changed?

    No. The frame count, size and every frame’s delay stay as they were unless you also pick a speed or tick forward and back.

    Is the file uploaded anywhere?

    No. There is no server in this process. The page is a static file and the work is done by code running inside your browser tab. Give the page a short while after one visit to save itself for offline use; then you can turn off Wi-Fi and it still works.

    More image tools

    Other conversions