Skip to guide

Original files · November 20, 2026

Lottie JSON example: download and read a working animation

A Lottie JSON file describes artwork and its animation timeline. Start with this small rotating bar: download the complete file, inspect its fields, and check it in a player. Then compare it with JSON made from a video of the same animation.

A complete 550-byte JSON example

coral-bar.json contains one rounded rectangle, a coral fill, and rotation keyframes. It plays a full turn in two seconds. It has no external resources or account requirement. These are original Lottie Studio examples for inspecting and testing an animation handoff.

Download example JSON

To see it move, open Lottie Preview and choose Try the JSON animation, or load the downloaded file into your destination player.

The coral rounded bar is horizontal at frame zero.
Frame 0 · 0.0 s
Static frame export
The coral rounded bar has made a quarter turn at frame fifteen.
Frame 15 · 0.5 s
Static frame export

The complete animation JSON

This is the entire downloadable document, expanded with whitespace for reading. Save it as coral-bar.json to test your player. The formatted copy has more bytes than the compact download; its animation data is the same. There are no omitted shapes or placeholder image strings in this first example.

{
  "v": "5.12.2",
  "nm": "Coral bar",
  "w": 200,
  "h": 200,
  "fr": 30,
  "ip": 0,
  "op": 60,
  "assets": [],
  "layers": [
    {
      "ty": 4,
      "ind": 1,
      "nm": "Coral bar",
      "ip": 0,
      "op": 60,
      "st": 0,
      "sr": 1,
      "ks": {
        "o": {
          "a": 0,
          "k": 100
        },
        "r": {
          "a": 1,
          "k": [
            {
              "t": 0,
              "s": [
                0
              ],
              "e": [
                360
              ],
              "o": {
                "x": [
                  0.33
                ],
                "y": [
                  0.33
                ]
              },
              "i": {
                "x": [
                  0.67
                ],
                "y": [
                  0.67
                ]
              }
            },
            {
              "t": 60,
              "s": [
                360
              ]
            }
          ]
        },
        "p": {
          "a": 0,
          "k": [
            100,
            100,
            0
          ]
        },
        "a": {
          "a": 0,
          "k": [
            0,
            0,
            0
          ]
        },
        "s": {
          "a": 0,
          "k": [
            100,
            100,
            100
          ]
        }
      },
      "shapes": [
        {
          "ty": "rc",
          "d": 1,
          "p": {
            "a": 0,
            "k": [
              0,
              0
            ]
          },
          "s": {
            "a": 0,
            "k": [
              110,
              35
            ]
          },
          "r": {
            "a": 0,
            "k": 12
          }
        },
        {
          "ty": "fl",
          "c": {
            "a": 0,
            "k": [
              0.95,
              0.4,
              0.3,
              1
            ]
          },
          "o": {
            "a": 0,
            "k": 100
          },
          "r": 1
        }
      ]
    }
  ]
}

Read the timeline and the artwork separately

Fields in the downloadable coral bar JSON
FieldIn this fileWhat it describes
w, h200, 200The composition is 200 × 200 units.
fr30Its timeline uses 30 frames per second.
ip, op0, 60Playback starts at frame 0 and ends before frame 60.
layersOne layerThe coral bar is a shape layer: ty is 4.
assets[]This example needs no separate image or font files.
ks.rTwo keyframesRotation runs from 0 to 360 degrees over the timeline.

Duration is (op − ip) / fr: here, (60 − 0) / 30 = 2seconds. Frame 60 is the end boundary. The layer's shapes describe the rectangle and its fill; ks describes its transform. In the rotation property, a: 1 means the value is animated, and the k array contains the keyframes. The fill and shape dimensions use static values.

To make one visible edit, find the fill's c.k array and replace [0.95, 0.4, 0.3, 1] with [0.2, 0.6, 0.9, 1]. Save a new file and reopen it: the bar becomes blue while the timeline stays two seconds. Keep valid JSON syntax, including commas and square brackets.

JSON from an MP4 contains different artwork

We rendered this vector bar to a 720 × 720 H.264 MP4, then converted that video back to Lottie JSON. The result still describes a two-second animation, but it contains 30 embedded WebP images and 30 image layers. It does not recover the rectangle or its editable fill from the original vector file.

Vector source

File:
550 bytes · 200 × 200
Timeline:
30 fps · frames 0–60 · 2 s
Artwork:
one shape layer, zero image assets
Download vector JSON

Video-derived output

File:
143,065 bytes · 720 × 720
Timeline:
15 fps · frames 0–30 · 2 s
Artwork:
30 image layers, 30 embedded WebP assets
Download image-backed JSON

In the second file, inspect assets for the encoded images and layers[].refId for their references. These image layers use ty: 2. Their visibility intervals place each image on the timeline. Changing a vector fill cannot recolor pixels inside an embedded image.

These file sizes describe this example, with different resolutions and sampling rates; they are not a general compression comparison. The intermediate MP4 is 117,520 bytes, so the resulting JSON is larger than that video too. Keep the original vector animation when you have it. If your input is only video, the MP4-to-Lottie worked example gives the source video and exact conversion settings.

Use the example to check your own file

  1. Load the small vector JSON in your player first. Confirm that the bar appears and turns; a blank player may have a loading or integration problem.
  2. Open your file as text. Valid JSON alone is not enough: a transcript, API response or video metadata document is not a Lottie animation. Renaming an MP4 to .json does not convert it.
  3. Check its duration and artwork. Image-based files may depend on external resources; changing a filename does not bundle those resources. A browser preview is not a guarantee of rendering in every mobile player.

Have a .lottie archive instead? Use dotLottie to JSON to select an animation and extract its resources. For the files above, use the existing JSON viewer to inspect playback before handing them off.