File types · Explainer

The Lottie file (.json, .lottie)

A Lottie file is a vector animation stored as JSON: shapes, layers and keyframes exported from Adobe After Effects or another tool, played back by a small player on websites and in apps. This guide explains what's inside a Lottie JSON file and a .lottie (dotLottie) package, how players render them, and what to watch for with performance and security.

At a glance

Full name
Lottie animation; .lottie files are dotLottie packages
Extensions
.json (most Lottie files); .lot (registered with IANA in 2025); .lottie for dotLottie
MIME type
video/lottie+json (IANA, 2025); usually served as application/json; dotLottie: application/zip+dotlottie, per its specification
Kind
Plain-text JSON describing vector animation; dotLottie is a ZIP archive of Lottie JSON, images and settings
Standard
Lottie Specification 1.0 (September 2024), by the Lottie Animation Community, a Linux Foundation project; dotLottie is specified by LottieFiles
First released
2015 as Bodymovin's export format, by Hernan Torrisi; named Lottie by Airbnb in 2017
Made with
Adobe After Effects with the Bodymovin or LottieFiles plug-in; other animation tools export it too
Plays with
lottie-web, Airbnb's Lottie libraries for Android, iOS and React Native, and the dotLottie players for web, mobile and desktop
Magic number
None for JSON (it starts with {); dotLottie starts 50 4B 03 04 (PK), like any ZIP

The basics

What is a Lottie file?

A Lottie file describes an animation the way a design tool does: shapes, colours, layers and how each property changes over time. A player reads the description and draws every frame live, as vector graphics. The result is sharp at any size, usually small, and can be controlled from code: played, paused, looped, slowed down or jumped to a frame.

The format began in 2015 with Bodymovin, an After Effects extension by Hernan Torrisi that exported animations to JSON along with a JavaScript player for the web. In 2017 Airbnb engineers Brandon Withrow, Gabriel Peal and Leland Richardson, with motion designer Salih Abdul-Karim, built libraries to play those files natively on iOS and Android, and later React Native, and named the project Lottie. It became a common way to ship interface animations: loading spinners, success ticks, onboarding illustrations, animated icons.

For years the format was defined only by what Bodymovin wrote and what the players read. In 2023 the Lottie Animation Community formed under the Joint Development Foundation, a Linux Foundation project, to turn it into a standard. It published the Lottie Specification 1.0 on 17 September 2024, and in February 2025 IANA registered the media type video/lottie+json, with .lot as an optional extension. Most files still end in .json.

Three things a Lottie file is not:

  • Not a video. There are no frames inside, only instructions. Nothing plays it without a Lottie player.
  • Not just any JSON file. A .json file is a Lottie animation only if it has this structure. Check for "v", "fr", "layers" near the top.
  • Not a complete copy of After Effects. Players support a large part of what After Effects can do, but effects, some layer types and expressions are supported unevenly. Test an animation in the player you'll use.

Anatomy

What's inside a Lottie file

A Lottie file is one JSON object: a few numbers that describe the canvas and the timeline, then a list of layers, each with a transform and its shapes. Property names are short, usually one or two letters, to keep files small. Here is a complete, minimal animation written for this page: a blue dot that glides from left to right in 2 seconds.

dot.json (Lottie, 2 seconds at 30 fps)
{
  "v": "5.12.2",
  "fr": 30, "ip": 0, "op": 60,
  "w": 200, "h": 200,
  "nm": "99helpers example: moving dot",
  "ddd": 0,
  "assets": [],
  "layers": [
    {
      "ty": 4, "nm": "Dot", "ind": 1,
      "ip": 0, "op": 60, "st": 0,
      "ks": {
        "o": { "a": 0, "k": 100 },
        "r": { "a": 0, "k": 0 },
        "s": { "a": 0, "k": [100, 100] },
        "a": { "a": 0, "k": [0, 0] },
        "p": {
          "a": 1,
          "k": [
            { "t": 0, "s": [50, 100],
              "o": { "x": [0.4], "y": [0] }, "i": { "x": [0.6], "y": [1] } },
            { "t": 60, "s": [150, 100] }
          ]
        }
      },
      "shapes": [
        { "ty": "el", "p": { "a": 0, "k": [0, 0] }, "s": { "a": 0, "k": [40, 40] } },
        { "ty": "fl", "c": { "a": 0, "k": [0.12, 0.43, 1] }, "o": { "a": 0, "k": 100 } }
      ]
    }
  ]
}
  1. 1"v": "5.12.2"

    Version

    The version of Bodymovin (or another exporter) that wrote the file. It's required, and it tells a player which generation of the format to expect.

  2. 2"fr": 30, "ip": 0, "op": 60

    The timeline

    Frame rate (30 frames per second), in point (frame 0) and out point (frame 60). The animation plays from ip up to op: 60 frames, 2 seconds. Times inside the file are counted in frames, not seconds.

  3. 3"w": 200, "h": 200

    The canvas

    The composition's width and height. Lottie is vector, so a player can draw it at any size; these numbers set the coordinate system and the aspect ratio.

  4. 4"assets": []

    Assets

    Reusable items: precompositions (groups of layers used like one layer) and images. Images can be separate files or embedded as base64 data, which makes the JSON much larger.

  5. 5"ty": 4, "nm": "Dot", "ind": 1

    A layer

    Layer type 4 is a shape layer. Other types include 0 (precomposition), 1 (solid colour), 2 (image), 3 (null, an invisible parent for other layers) and 5 (text). ind is the layer's number, used to link parents and mattes.

  6. 6"ks": { "o" … "r" … "s" … "a" … "p" … }

    The transform

    Opacity, rotation, scale (in percent), anchor point and position. Each property is an object with a (animated: 0 or 1) and k (the value, or a list of keyframes).

  7. 7{ "t": 0, "s": [50, 100], "o": …, "i": … }

    Keyframes

    Position is animated: at frame 0 (t) the value (s) is [50, 100], at frame 60 it's [150, 100]. o and i are the Bézier handles of the easing curve, the same easing editor After Effects shows. Here the dot speeds up and slows down gently.

  8. 8"ty": "el" … "ty": "fl"

    Shapes

    An ellipse (el) 40 × 40 units, filled (fl) with a colour given as red, green and blue from 0 to 1, not 0 to 255. Other shapes include paths (sh), rectangles (rc), strokes (st), gradients and groups (gr).

Variants

dotLottie: what a .lottie file is

A .lottie file is a dotLottie package, a format created and specified by LottieFiles: a ZIP archive, compressed with Deflate, that holds one or more Lottie JSON animations together with their images, fonts, themes and interactivity. It's not JSON, so a text editor shows binary; rename a copy to .zip to look inside.

button.lottie (dotLottie 2, structure)
manifest.json      required: version "2", the animations, themes
                   and state machines it contains
a/                 required: the Lottie JSON animations, at least one
i/                 images used by the animations
f/                 fonts
t/                 themes: alternative colours, e.g. light and dark
s/                 state machines: what happens on click, hover…
  • Smaller downloads. The JSON is compressed and images are stored as files instead of base64 text. LottieFiles says dotLottie files are often up to 80% smaller than the equivalent JSON; how much you save depends on the animation.
  • Several animations in one file, sharing images and fonts, with one marked as the one to start with.
  • Themes and state machines: a dotLottie 2 file can switch colours at runtime and react to clicks, hovers and scrolling without extra code.
  • Versions: dotLottie 1 used folders named animations/ and images/; version 2 uses the short names above. Check which versions your player reads.

Not every player reads .lottie files: Airbnb's lottie-web plays only JSON. LottieFiles' dotLottie players (for the web, React, Vue, Svelte, React Native, Flutter, Android and iOS) play both.

How to

How to play a Lottie animation on a website or in an app

With lottie-web, Airbnb's JavaScript player, a few lines play an animation from a URL:

index.html
<div id="anim" style="width: 200px; height: 200px"></div>
<script src="lottie.min.js"></script>
<script>
  lottie.loadAnimation({
    container: document.getElementById("anim"),
    renderer: "svg",      // or "canvas", "html"
    loop: true,
    autoplay: true,
    path: "dot.json"      // or animationData: a parsed object
  });
</script>
  • Renderers: lottie-web draws with SVG, canvas or HTML elements. Which is fastest depends on the animation, so try more than one if playback stutters.
  • Loading from another site needs that site to allow it with CORS headers, because the player fetches the JSON with JavaScript. Keeping the page and the animation on the same site avoids the problem.
  • For .lottie files, use a dotLottie player instead, such as @lottiefiles/dotlottie-web or its web component.
  • In apps: Airbnb's Lottie libraries for Android, iOS and React Native, or the dotLottie players, which also cover Flutter.

To preview a file without writing code, drop it on the free LottieFiles previewer, which takes JSON and dotLottie files up to 20 MB, or use the LottieFiles extension for VS Code, which refreshes the preview as you edit the JSON. To edit it, go back to the source in After Effects, or use an editor that imports Lottie; editing the JSON by hand works for small changes such as colours or speed.

Comparison

Lottie vs GIF, animated SVG and video

LottieGIFSVG + CSSMP4 / WebM
GraphicsVector, drawn livePixels, 256 coloursVector, drawn livePixels
Sharp at any sizeYesNoYesNo
TransparencyYesOn/off per pixelYesWebM yes, MP4 usually not
Control from codePlay, pause, seek, speed, segmentsNoneThrough CSS and JavaScriptPlay, pause, seek
Needs a playerYes, a JavaScript or native libraryNoNoNo
Good forInterface animations, icons, illustrationsSimple loops anywhere, including emailSimple hand-made animationsFootage, complex or textured animation

Lottie's strength is designer-made vector animation that stays small and crisp and can be driven by the interface. For photographic or very detailed motion, a WebM or MP4 video is smaller and cheaper to play. For a loop that must work without JavaScript, such as in email, a GIF is still the safe choice.

Quirks

Performance and common problems

  • A small file can be slow. The player redraws every frame. Many layers, masks and mattes (which lottie-web's documentation calls out as costly), blur-like effects and long paths use a lot of CPU, especially on phones. Simplify in After Effects, or try the canvas renderer.
  • The file is huge. Usually embedded images: raster pictures stored as base64 text inside the JSON. Export images as separate files, compress them, or use dotLottie, which stores them as files in the ZIP.
  • It looks different from After Effects. The player doesn't support something in it: some effects, layer styles, expressions, or text features. lottie-web, for example, doesn't play image sequences, video or audio layers. Check the exporter's warnings, and test in the target player.
  • Text renders in the wrong font. Text layers need their fonts to be available to the player, or the text converted to shapes before export.
  • Nothing appears. Check the browser console: a CORS error, a 404 for the JSON, or a container element with no height are the usual causes.

Motion and accessibility

Animations that move for more than five seconds need a way to pause, stop or hide them (WCAG success criterion 2.2.2), and nothing should flash more than three times a second. Lottie players make this easy: respect the prefers-reduced-motion setting by showing a still frame, and stop looping animations after a few cycles.

Security

Is a Lottie file safe?

Plain Lottie JSON is data, as safe as any JSON file. IANA's registration says its security considerations are like those of JSON, with two additions worth knowing:

  • Expressions can run code. After Effects expressions are JavaScript snippets, and an optional Lottie extension carries them in the file. IANA notes that this can enable code execution, depending on the player. lottie-web's full build evaluates expressions with JavaScript's eval, which also means it needs unsafe-eval under a strict Content Security Policy; the lottie_light builds in the same package contain no eval at all. Expressions are not part of the Lottie Specification 1.0.
  • External assets. An animation can reference images by URL, so playing it makes the browser request them. Treat animations from untrusted sources like any third-party content.
  • Resource exhaustion. A crafted file with huge dimensions, thousands of layers or extreme frame counts can freeze a page or app. Don't autoplay user-uploaded animations without limits.
  • dotLottie is a ZIP, so a server that unpacks uploaded .lottie files inherits ZIP risks such as archive bombs and file names with ../ in them. Check sizes and paths.

Sample files

There are no sample Lottie files on this page yet. The anatomy above is a complete, working animation: save it as dot.json and play it with lottie-web. To make your own, export a composition from After Effects with the Bodymovin or LottieFiles plug-in.

Put it online

Have a Lottie file? Give it a link.

Drop a Lottie animation on 99helpers and it gets its own web address. A Lottie .json file opens as text in the browser, and a .lottie file, being a ZIP archive, downloads; either one can be played by a Lottie player on a page hosted on the same 99helpers site.

Questions

Lottie files, frequently asked

What is a Lottie file?

A vector animation stored as JSON, usually exported from Adobe After Effects with the Bodymovin plug-in, and played on websites and in apps by a Lottie player.

What's the difference between .json and .lottie?

A .json Lottie file is one animation as plain text. A .lottie file (dotLottie) is a ZIP archive that can hold several animations with their images, fonts, themes and interactivity, compressed. lottie-web plays only JSON; the dotLottie players play both.

How do I open a Lottie file?

To watch it, drop it on an online previewer such as LottieFiles' or play it with lottie-web in a web page. To read its contents, open a .json file in any text editor; rename a .lottie file to .zip to see what's inside.

How do I make a Lottie animation?

Animate in Adobe After Effects using shape layers, then export with the Bodymovin extension or the LottieFiles plug-in. Other animation tools can export Lottie too. Avoid effects and features the target player doesn't support.

Is Lottie better than GIF?

For vector interface animations, usually: it's sharper, supports full transparency and can be controlled from code. GIF needs no player, so it still wins where JavaScript isn't available, such as in email.

Can I convert a Lottie animation to GIF or MP4?

Yes. Online converters and command-line tools such as python-lottie (lottie_convert.py animation.json animation.gif) render it frame by frame. The result is pixels: it's no longer scalable or controllable from code.

Is Lottie an open standard?

Yes, since the Lottie Animation Community, a Linux Foundation project, published the Lottie Specification 1.0 in September 2024. IANA registered the media type video/lottie+json in 2025.

Related formats

Other file types explained

Keep going

Related

Sources

Last reviewed 27 October 2026.