Lottie Animations for Java & JavaFX
Parse, generate & play Lottie animations natively in JavaFX.
No WebView required.
Latest release: v1.4.0 · 2026-11-19 · Read the announcement
Lottie4J is an open-source Java library that parses Lottie animations into Java objects and plays them as native JavaFX animations — no WebView, no browser engine, no JavaScript bridge.
Quick start
Lottie4J requires Java 21 or higher and is available from Maven Central. Add the fxplayer dependency (it includes the core library):
<dependency>
<groupId>com.lottie4j</groupId>
<artifactId>fxplayer</artifactId>
<version>1.4.0</version>
</dependency>implementation("com.lottie4j:fxplayer:1.4.0")implementation "com.lottie4j:fxplayer:1.4.0"Then load a Lottie file and drop the player into your scene:
Animation animation = LottieFileLoader.load(new File("animation.json"));
stage.setScene(new Scene(new LottiePlayer(animation),
animation.width(), animation.height()));
stage.show();See the code examples for the full, runnable application and the core-only (parse/generate) usage.
Why Lottie4J
Canvas. No browser, no JS bridge. It’s just a Node.javafx.graphics. Fast startup, tiny jlink footprint, no network.Wondering how this compares to embedding a browser? Read Lottie4J vs WebView.
The sources of this project are available on github.com/lottie4j/lottie4j.
Watch: an introduction to Lottie4J — playing Lottie animations natively in JavaFX.
Learn About Lottie
New to Lottie? Check out our introduction to the Lottie format to learn about this powerful animation format, its capabilities, and available resources.
Current status
Lottie4J is released and under active development. The library can parse Lottie files into Java objects, generate Lottie files from Java objects, and play animations in JavaFX, including keyframe interpolation, animated properties, shape rendering, fills and gradients, stroke styling, trim paths, layer transforms and parenting. It already handles many complex real-world animations.
Latest updates:
Nov 19, 2026
Lottie4J 1.4.0 is out: LottieFileSaver now writes Lottie JSON and dotLottie archives, and audio layers keep their levels.
Nov 19, 2026
Lottie4J 1.3.0 is out: it reads real-world Lottie files leniently, uses exact frame rates, and adds frame snapshots and a report of unsupported features.
Oct 15, 2026
Lottie4J 1.2.8 is out, fixing a regression in 1.2.7 where animations with track mattes of different sizes showed horizontal streaks.
Oct 14, 2026
Lottie4J 1.2.7 is out, with big performance and memory improvements for animations with embedded images and track mattes.
Follow the progress in the status posts and check the release notes for the latest changes.
Related projects
Lottie4J is part of a small family of projects built on the same approach: parse a standard file format into typed Java objects and render it natively in JavaFX, without a WebView. Sheetmusic4J applies that idea to MusicXML, parsing it into Java objects and rendering it as native JavaFX music sheet views. MelodyMatrix is a Java, Kotlin and JavaFX desktop app that captures MIDI keyboard performances and shows them through synchronized visualizations — piano rolls, sheet music, charts and light effects.