Lottie JSON Tweaker
Preview Lottie animations and adjust embedded colors locally in your browser
Lottie JSON
Uses a lazy-loaded lottie-web preview and a deterministic client-side parser. Only assets.colors and layer k RGB arrays are editable.
Examples
Scoped color discovery
parseLottieJson(source).colors[{ assets[0].colors[0] }, { layers[0].c.k }, { layers[0].nested.k }]Only asset colors and layer k RGB arrays surface; metadata k is excluded.
Hex swap plus round-trip
replaceLottieColor(parsed, "layers[0].c.k", hexToLottieColor("#ff0080")){ layers[0].c.k: [1, 0, 0.5…], serialized via serializeLottie }The hex converts to 0-1 channels, replaces one path, and serializes back.
About this tool
Lottie JSON Tweaker edits animations with parseLottieJson(input), replaceLottieColor(document, path, color), and serializeLottie(document): the JSON deep-clones through structuredClone, color entries collect as { path, value } triples, and layers list as { path, ty, nm } entries.
Color discovery is scoped: arrays under assets colors collect every RGB triple while layers collect only k arrays holding three 0-1 channels — so layers[0].c.k qualifies but metadata k and freeform notes arrays stay untouched.
Layers resolve ty and nm with fallbacks: missing names become Layer N and non-numeric ty becomes null, while helpers lottieColorToHex and hexToLottieColor convert six-digit hex both ways and canRenderLottie gates the browser-only preview off in SSR and jsdom.
How to use this tool
Paste Lottie JSON
Provide the animation object with assets, layers, and color arrays.
Pick a color path
Choose a discovered entry like layers[0].c.k from the color list.
Replace the color
Apply an RGB triple or six-digit hex to that path only.
Export JSON
Copy the deterministically serialized animation for playback.
Use cases
Recoloring animations
Swap brand colors across asset palettes and layer fills by path.
Auditing layer structure
List ty and nm entries to map shape versus precomp layers.
Validating uploads
Catch malformed JSON and out-of-range channels with explicit errors.
Common mistakes
Mistake:Editing metadata k and expecting a color entry.
Fix:Only assets colors and layer k arrays are color paths — other triples throw a color-path error.
Mistake:Passing channels outside 0-1.
Fix:Lottie channels are normalized floats, so divide 0-255 values by 255 first.
Mistake:Pasting shorthand or eight-digit hex.
Fix:hexToLottieColor requires six digits — expand #f08 to #ff0088 before converting.
Frequently asked questions
What does this tool do?
It parses Lottie JSON into a cloned document with discovered color paths and a ty/nm layer list, replaces one color path at a time, and serializes the animation back deterministically.
Which arrays count as colors?
Arrays under assets colors plus layer k triples with 0-1 channels qualify — metadata k and freeform triples are excluded and throw a color-path error if edited.
Is my animation uploaded or stored?
No. Parsing, color replacement, hex conversion, and serialization run entirely in your browser.
Why an invalid JSON or hex error?
Malformed or non-object JSON throws Invalid Lottie JSON, channels outside 0-1 are rejected, and hex input must be six digits like #ff0080.
Related guides
References & standards
Related tools
.env Secret Safety Linter
Validate .env syntax and spot likely leaked credentials or placeholder secrets.
.htaccess Generator
Build an Apache .htaccess — HTTPS redirects, rewrites, error pages, security headers, and basic auth
2D Fluid Dynamics & Particle Physics Sandbox
A physics playground with two engines sharing one canvas. The fluid mode runs a real Eulerian Navier-Stokes solver — semi-Lagrangian advection, explicit diffusion, Jacobi pressure projection and vorticity confinement — that you paint with dye and velocity using mouse or touch. The particle mode is a damped Verlet N-body engine with gravity wells, Coulomb attractors and repulsors, spring links, wall restitution and elastic circle collisions. Particle counts adapt to the device (100k target on WebGL2 desktop, 2k-5k on CPU fallback), and every configuration exports as runnable code: a Matter.js world, a PixiJS ticker setup, or a standalone vanilla Canvas engine.
AI Function Calling Schema Generator
Generate function calling JSON schemas from TypeScript interfaces
Algorithm Arena & Data Structure Visualizer
Interactive arena for algorithms and data structures: eight sorting algorithms racing on one seeded input, six pathfinding algorithms walking generated mazes, and BST, AVL, Red-Black, B-tree, heap and trie operations replayed step by step with rotations highlighted. Every run shows the Big-O table and the phase-highlighted reference implementation in four languages, and compared values can be played as pitch (sonification) through the shared audio engine. Everything runs client-side; inputs never leave the browser.
Ansible Playbook Generator
Build an Ansible playbook — hosts, vars, and tasks with modules — as YAML