How-to

How to copy a Lottie animation from a website (and when you should not)

Copy a Lottie animation from a website: spot the player, find the .json or .lottie file in the Network tab, read frame data, preview it and check the licence.

20 November 2026 · 7 min read

You land on a page with a little illustrated character waving, or an icon that draws itself in, and it is crisp at every size. Nine times out of ten that is a Lottie animation: a vector animation exported as JSON and played by a JavaScript library.

This guide shows how to confirm an animation is Lottie, find the file behind it, read what is inside, and preview it locally. It also covers the part people skip: whether you are allowed to use it. If you want the background on what Lottie is and how it compares to CSS, read CSS animation vs Lottie first.

Step 1: confirm it is Lottie

Open DevTools on the animation and run through these checks.

  1. Look for a player element. In the Elements panel, select the animation. Web component players show up by name: <lottie-player> or <dotlottie-player>, often with a src attribute that points straight at the file.
  2. Look for a redrawn SVG or canvas. When a site uses lottie-web directly there is no special tag, just a <div> containing an <svg> or <canvas>. Play the animation and watch the Elements panel. If attributes inside the SVG (paths, transforms, opacity) flash on every frame, a script is redrawing it. Lottie's SVG renderer also tends to leave IDs like __lottie_element_ on its clip paths and masks.
  3. Check the console. If lottie-web is loaded as a global, lottie.getRegisteredAnimations() returns the animations on the page. A reference error does not rule Lottie out; the library may be bundled.
  4. Check what the Animations panel shows. Lottie draws from JavaScript, so the Chrome Animations panel usually stays empty. If it lists CSS animations for the element instead, it is probably not Lottie, and the general guide to copying an animation is the better fit.

Step 2: find the file

A Lottie animation is almost always loaded as a separate file. The Network tab is the quickest way to find it.

  1. Open the Network tab and reload the page with it open, so you catch requests made on load.
  2. Filter the list. Type json in the filter box, then try lottie. You are looking for a .json or .lottie file. Some sites serve the JSON from an API or a CDN with no extension, so also try the Fetch/XHR filter.
  3. Check the response. Click a candidate and open the Preview tab. A Lottie file is an object with short top-level keys: v, fr, ip, op, w, h and layers. If you see those, you have found it.
  4. Trigger lazy animations. Animations further down the page may load only when you scroll to them, or on hover. Clear the log, scroll or hover, and watch for new requests.
  5. Save it. Right-click the request and open it in a new tab, or copy the response, and save it as a .json file.

If nothing shows up in the Network tab, the data may be bundled into the site's JavaScript. Search all sources with Cmd+Option+F (or Ctrl+Shift+F) for "layers" or "fr":. The page source can also hold the URL: search it for .json, .lottie, lottie-player or animationData.

When lottie is a global, you can read the loaded data from the console:

const [anim] = lottie.getRegisteredAnimations();
console.log(anim.totalFrames, anim.frameRate);

// DevTools' copy() puts the string on your clipboard
copy(JSON.stringify(anim.animationData));

Treat this as a fallback. The player may add its own properties to the data after loading, so the original file from the Network tab is the cleaner copy.

Step 3: read the JSON

You do not need After Effects to understand the basics. The top of a Lottie file looks like this:

{
  "v": "5.7.4",
  "fr": 30,
  "ip": 0,
  "op": 90,
  "w": 512,
  "h": 512,
  "nm": "Waving hand",
  "assets": [],
  "layers": [ ... ]
}
KeyMeaning
vVersion of the exporter that wrote the file
frFrame rate, in frames per second
ip / opIn point and out point: the first frame and the frame where it ends
w / hWidth and height of the composition, in pixels
nmName, often the After Effects composition name
assetsImages and precompositions the layers refer to
layersThe shapes, images and groups, each with its own keyframes

The duration in seconds is (op - ip) / fr. In the example, that is 90 frames at 30 fps: three seconds. Inside each layer, ks holds the transform (position, scale, rotation, opacity) and its keyframes, and t on each keyframe is the frame it sits on. Divide by fr to get the time in seconds, which is handy when you want to rebuild the timing in CSS.

A .lottie file is different on the outside: it is a zip archive holding one or more of these JSON files plus a manifest. Copy it, change the extension to .zip, and unzip it to get at the JSON.

Step 4: preview it locally

Before doing anything else with the file, play it on its own to check you have the right one and that it is complete. Install lottie-web in a folder next to your JSON:

npm install lottie-web

Then create an index.html in the same folder:

<!doctype html>
<html>
<body style="margin:0; display:grid; place-items:center; min-height:100vh; background:#111">
  <div id="anim" style="width:400px; height:400px"></div>
  <script src="node_modules/lottie-web/build/player/lottie.min.js"></script>
  <script>
    const anim = lottie.loadAnimation({
      container: document.getElementById('anim'),
      renderer: 'svg',
      loop: true,
      autoplay: true,
      path: 'animation.json'
    });

    anim.addEventListener('DOMLoaded', () => {
      console.log('Duration (s):', anim.getDuration());
      console.log('Frames:', anim.totalFrames);
    });

    // Slow it down to study the motion
    anim.setSpeed(0.25);
  </script>
</body>
</html>

Loading by path uses a network request, which browsers block on file:// pages. Serve the folder instead, for example with python3 -m http.server, and open the address it prints. To step through the animation frame by frame, call anim.goToAndStop(30, true) in the console, where the second argument means the number is a frame rather than milliseconds.

If the preview shows missing images, the animation refers to separate image files listed in assets. They load from paths relative to the JSON, and you will see those requests fail in the Network tab.

Licensing: this part matters

A Lottie file is not code you found lying around. It is an illustration and animation that a designer made, and someone owns it: the site, an agency, or an illustrator who licensed it to them. Being able to download the file does not mean you can use it.

Before you use a Lottie file you found on a site: check where it came from and whether it carries a licence that allows your use. If there is no licence, ask the owner. If you cannot get permission, use the file only to study how the motion works.

In practice, the most useful thing to take from someone else's Lottie is not the artwork but the motion: the timing, the easing, the way parts overlap and settle. Recreate that with your own illustrations and you get the feel without the legal question. Studying the file locally, as above, is a good way to learn those numbers.

The faster way: record it while it plays

The manual route works, but it takes a while, and bundled or inline data can make the file hard to find. Capture Motion is a free Chrome extension that records an animation while it plays and reads the keyframes, durations, delays and easing of every animated property. It works with Lottie as well as CSS transitions and keyframes, the Web Animations API and GSAP, so you do not need to know where the file lives.

  1. Install the extension and open the page with the animation.
  2. Pick the element and start a capture.
  3. Play the animation. Reload, scroll or hover to trigger it. Hover is captured with a real :hover state set through the Chrome DevTools Protocol, attached only during the capture.
  4. Preview the result. Capture and preview need no account.
  5. Export. When the source is Lottie, you can export Lottie. You also get CSS, React and GSAP code, a self-contained HTML and CSS file, and JSON. HTML and React downloads need a free account.

The JSON pastes into the Capture Motion Figma plugin and becomes a Figma Motion timeline, which is a good way to rebuild the motion around your own artwork. The website animation to Figma page covers that route. The licence advice above still applies: exporting a capture does not change who owns the illustration.

When to rebuild in CSS instead

Once you have the timing, ask whether you need Lottie at all. A loader, a checkmark or an icon that scales and fades can often be rebuilt with a few CSS keyframes, with no player library to load and colours that follow your theme. Keep Lottie for real illustration work: shape morphs, masks and many layers moving together. The comparison post has a simple rule for choosing.

Questions

How do I know if an animation on a website is Lottie?

Look for a lottie-player or dotlottie-player element, or an SVG or canvas whose contents change on every frame. Then check the Network tab for a .json or .lottie file whose JSON has keys like v, fr, ip, op and layers.

Can I use a Lottie file I found on someone else's website?

Not by default. The file is artwork that someone made and owns. Check whether it comes with a licence that allows your use, ask the owner, or use it only to study how the motion works.

How do I play a .lottie file?

A .lottie file is a zip archive that holds one or more Lottie JSON files and a manifest. Play it with a dotLottie player, or unzip it and load the JSON inside with lottie-web.

Can Capture Motion copy Lottie animations?

Yes. Capture Motion records a Lottie animation while it plays and exports Lottie when the source is Lottie, along with CSS, React and GSAP code and JSON you can paste into its Figma plugin.