Lottie Max

Integration · Web

How to add Lottie to an HTML page

For a plain website, the lottie-player web component is the simplest route — one tag and one script. Lottie Max can even hand you a self-contained snippet.

Design and animate in the Lottie Max studio, export .json or .lottie, then drop it into your app
Design and animate in the Lottie Max studio, export .json or .lottie, then drop it into your app

Add the animation

  1. 1 In Lottie Max, either Download Lottie .json or Copy embed snippet.
  2. 2 Add the lottie-player <script> once, near the end of your page.
  3. 3 Drop a <lottie-player> tag with the file path (or paste the copied snippet).
  4. 4 Set autoplay, loop, and size with the style attribute.
index.html
<lottie-player src="/animation.json" autoplay loop
  style="width: 320px; height: 320px"></lottie-player>

<script src="https://unpkg.com/@lottiefiles/lottie-player@latest/dist/lottie-player.js"></script>

Tips

Need an animation first?

Design and export one in the studio — free, in your browser.

Open the studio

FAQ

Is Lottie Max free to use with plain HTML?
Yes. Lottie Max is free and runs in your browser — make the animation, export it, and drop it into your project.
What file should I export for plain HTML?
A Lottie .json works everywhere. For a smaller file, export .lottie (dotLottie, ~3× smaller) where the player supports it.
Where do I get the animation file?
Create it in the Lottie Max studio, then use Export to download .json / .lottie or copy a ready-to-paste embed snippet.

Using a different stack?