Skip to main content

Lottie Optimizer

Compress Lottie JSON files — recompress embedded images, trim numeric precision, and strip metadata. 100% client-side, your file never leaves your device.

Upload Lottie

Click to upload or drag and drop

Lottie JSON or .lottie (max 30MB)

No Lottie uploaded

Upload a Lottie JSON or .lottie file to compress it

Why optimize Lottie files?

Lottie files ship inside your app bundle or load on your webpage — every kilobyte counts against startup time and page speed. Yet exports from After Effects and conversion tools are full of dead weight: 12-decimal coordinates, layer names, generator metadata, and oversized embedded images.

This optimizer removes what players never use and recompresses what they do, typically cutting 20–60% off real-world files with no visible difference.

What it does

  1. Rounds coordinates to 2–3 decimals (exports carry 10+)
  2. Strips layer names, match names, and generator metadata
  3. Deletes hidden layers that never render
  4. Re-encodes embedded PNG/JPEG images as WebP
  5. Optionally downscales oversized embedded images

Frequently asked questions

Is this Lottie optimizer free?

Yes, completely free. No subscription, no watermark, no account required.

Is my Lottie file uploaded to a server?

No. All optimization runs in your browser. Your animation never leaves your device.

Will optimization change how my animation looks?

At the recommended settings (2 decimals, 80% image quality) the result is visually identical — coordinates in Lottie are in pixel units, so 2 decimals means sub-hundredth-of-a-pixel accuracy. The preview plays the optimized file so you can verify before downloading.

How much smaller will my file get?

Vector-only animations typically shrink 20–40% from precision trimming and name stripping. Files with embedded images can shrink 50–80% when PNG frames are re-encoded as WebP and downscaled.

Does it support .lottie (dotLottie) files?

Yes — .lottie archives are unpacked, optimized, and downloaded as standard Lottie JSON compatible with every player.

Is stripping layer names safe?

Yes for playback — players ignore names entirely. The optimizer automatically keeps names if it detects expressions that reference layers by name. Uncheck the option yourself only if your own code targets layers by name at runtime (e.g. dynamic text or color replacement).

Lottie file size optimization: where the bytes hide and how to reclaim them

Why Lottie exports are bigger than they need to be

Export tools optimize for correctness, not size. Bodymovin writes every coordinate with full floating-point precision — 128.48000000000002 where 128.48 renders identically. Every layer keeps its authoring name ("Shape Layer 47 copy 3"), every group its match name, and the file carries generator metadata no player reads. On a complex animation these overheads are thousands of occurrences; trimming them routinely removes a third of the file before touching anything visual.

Embedded images: the biggest lever

Animations converted from raster sources — like the output of our GIF to Lottie and MP4 to Lottie converters, or After Effects comps with image layers — embed their frames as base64 images. Those images usually dominate the file size. Re-encoding PNG frames as WebP at 80% quality halves them with no visible change, and downscaling a 1080px-wide embedded image that displays at 400px reclaims even more. The optimizer only keeps a recompressed image if it's actually smaller, so it can never make your file bigger.

What's safe to strip — and what isn't

Lottie players ignore nm (names), mn (match names), and meta during playback, so stripping them is free — unless your code manipulates the animation by layer name at runtime (dynamic text swaps, theme color replacement). In that case, uncheck "Strip layer names." Hidden layers (hd: true) never render and are pure dead weight from the authoring file — removing them is always safe. Numeric precision at 2 decimals is sub-pixel accurate; drop to 1 decimal only for large animations where a hundredth of a pixel truly cannot matter.

Page speed, app bundles, and when size matters most

A hero animation that loads with your landing page sits directly in the critical path — Core Web Vitals feel every extra 100KB. Mobile apps pay twice: bundle download size and memory at parse time. Optimizing before shipping is the single highest-leverage step, and it composes with delivery tricks like gzip (which your server applies on top). After optimizing, verify the result in the preview, then round-trip it through our Lottie to GIF or Lottie to MP4 converters if you also need shareable preview files. Everything runs client-side — no uploads, no accounts.

Support HuPNG

These tools are free to use and always will be. If they helped you, consider buying me a coffee — it directly funds hosting and new tools.