A powerful local web application for viewing, inspecting, analyzing, and fixing Lottie animation files (.json). This tool helps developers and designers ensure their Lottie files are performant and compatible across different platforms (iOS, Android, Web).
- Playback Controls: Play, Pause, Scrub through frames.
- Speed Control: Test animation at 0.5x, 1x, 1.5x, 2x speeds.
- Backgrounds: Toggle between Black, White, or Transparent (Checkerboard) backgrounds to check asset boundaries.
- Drag & Drop: Drag
.jsonfiles directly onto the viewer to load them instantly.
- Local Access: Automatically lists all
.jsonfiles located in thejson/directory. - One-click Loading: Switch between animations quickly using the sidebar.
- Real-time Refresh: Update the file list without reloading the page.
- Layer List: See all layers (Shapes, Text, Images, Precomps, Nulls) with type icons.
- Visibility Toggle: Hide/Show specific layers to debug complex compositions.
- Color Tinting:
- Smart Detection: Automatically detects the current color of Shapes, Solids, Text, and Precomps.
- Real-time Editing: Change colors on the fly using the native color picker.
- Deep Tinting: recursively tints elements inside Groups and Precomps.
- Analyze Button: Scans the animation for common issues that break mobile rendering:
- Expressions (unsupported on some mobile players).
- Merge Paths (performance killer on Android).
- Unsupported Effects (Fill, Stroke effects outside of shapes).
- Raster Images (which increase file size).
- 3D Layers / Layer Styles.
- Auto-Fix:
- Removes unsupported expressions (
.x). - Removes "Merge Paths".
- Converts basic "Fill" effects to native shape fills where possible.
- Removes unsupported expressions (
- Save Changes: Export the modified/fixed/tinted animation as a new JSON file to your downloads folder.
- Node.js (Installed on your machine).
- Clone or download this repository.
- Open the folder in your terminal.
- Ensure your Lottie files are in the
json/folder.
The app requires a local server to handle file operations and ES Modules.
node server.jsThen open your browser to: http://localhost:8000
The project uses modern, modular vanilla JavaScript (ES Modules).
| Directory / File | Description |
|---|---|
js/ |
Application Logic (Modules) |
├── main.js |
Entry point. Wires up event listeners. |
├── player.js |
Manages lottie-web instance, playback, and scrubbing. |
├── layers_render.js |
Renders the layer list and handles visibility toggling. |
├── layers_color.js |
Handles color detection and tinting logic. |
├── analyze.js |
Logic for scanning JSON for compatibility issues. |
├── fix.js |
Logic for auto-fixing animations. |
├── api.js |
Communicates with server.js to fetch files. |
├── file_io.js |
Handles Drag-and-Drop and File Inputs. |
├── state.js |
Shares global state (current animation, player instance). |
└── utils.js |
Helper functions (Color conversion). |
json/ |
Asset Folder. Place your Lottie files here. |
server.js |
Local Server. Node.js script to serve files and list API. |
index.html |
Main UI structure. |
style.css |
Application styling (Glassmorphism design). |
- Lottie-Web: Loaded via CDN (
cdnjs.cloudflare.com). Nonpm installrequired for client-side libraries.
- CORS Errors?: Make sure you are using
node server.jsand accessing vialocalhost. You cannot openindex.htmldirectly from the file system. - Changes not showing?: If you edited code, hard refresh (Cmd+Shift+R) to clear the module cache.