What is the TGS file format?
A .tgs file is a Telegram Animated Sticker - a Lottie JSON animation document wrapped in a GZIP container. Telegram introduced this format in July 2019, letting users share smooth, scalable vector animations in chats without the hefty file sizes of raster video formats.
At the binary level, every .tgs file opens with the magic bytes 1F 8B - the standard GZIP header. Decompressing the file (rename it to .json.gz and run gunzip) reveals a plain JSON object with the Lottie keys "v", "fr", "ip", "op", and "layers". Because the content is vector-based, stickers render crisply at any display density without quality loss.
Telegram enforces strict authoring constraints: the canvas must be 512×512 pixels, frame rate up to 60 fps, animation length no more than 3 seconds, and the finished compressed file must not exceed 64 KB. Tools that can read, convert, or export .tgs files include python-lottie, lottie-converter, and web services such as ezgif, which can produce GIF or WebP output.
.tgs is also the extension used by GeneStudio Pro for its phylogenetic tree data files. Those files store acyclic graph structures containing nodes (organisms), edges (evolutionary relationships), and associated biological characteristics - entirely separate from the Telegram sticker format and not interchangeable with it.
Security & safety
RISK: LOWA Telegram .tgs is just gzip-compressed JSON describing vector shapes - it contains no executable code and is safe to view or convert. The only minor caveats: a maliciously crafted file could try to exploit a bug in a specific Lottie renderer (keep apps/players updated), and a "decompression bomb" gzip could be oversized - but normal stickers are tiny (20-30 KB). Use reputable converters; avoid sketchy "TGS opener" download sites that bundle adware when a simple web tool or 7-Zip does the job.
Format details
in a nutshell- GeneStudio GSTree phylogenetic tree - A legacy phylogenetic-tree data file from the discontinued GeneStudio molecular-biology suite - text-based and unrelated to the Telegram sticker format.
Programs that open TGS files
Technical details
deep spec| Container format | GZIP stream (RFC 1952) wrapping one Lottie JSON document |
| Magic bytes | 1F 8B at offset 0 - standard GZIP header |
| Inner data format | Lottie JSON; root keys include "v", "fr", "ip", "op", "layers" |
| Animation type | Vector (shape layers, transforms, keyframes - no raster pixels) |
| Canvas size | 512 × 512 pixels (Telegram requirement) |
| Frame rate | Up to 60 fps |
| Max duration | 3 seconds |
| Max file size (compressed) | 64 KB |
| Compression algorithm | DEFLATE (via GZIP) |
| MIME type | application/gzip |
| Transparency | Full alpha channel supported through Lottie layer compositing |
| Rendering engine | Lottie-compatible renderer (e.g., rlottie on Android, lottie-web in browsers) |
| Decompression method | Rename to .json.gz and run gunzip, or use python-lottie / lottie-converter |
| Developer | Telegram FZ-LLC, based on Airbnb's Lottie animation library |
| Released | July 2019 (Telegram animated stickers, based on Lottie) |
| Open standard | Yes · royalty-free |
| Specification | airbnb.io |