TagLib-Wasm
TagLib compiled to WebAssembly with TypeScript bindings for universal audio metadata handling
Universal Compatibility
Works seamlessly with Deno, Node.js, Bun, web browsers, and Cloudflare Workers
TypeScript First
Complete type definitions and modern async API for excellent developer experience
All Audio Formats
Supports MP3, FLAC, MP4/M4A, OGG, WAV and many more formats via TagLib
Format Abstraction
Automatic tag mapping handles format-specific differences transparently
Zero Dependencies
Self-contained Wasm bundle with no external dependencies
Battle-Tested
Built on TagLib, the de-facto standard for audio metadata since 2002
Quick Example
import { readTags, updateTags } from "taglib-wasm/simple";
// Read tags - just one function call!
const tags = await readTags("song.mp3");
console.log(tags.title, tags.artist, tags.album);
// Update tags in-place - even simpler!
await updateTags("song.mp3", {
title: "New Title",
artist: "New Artist",
album: "New Album",
});
Installation
::: code-tabs @tab Deno
import { TagLib } from "npm:taglib-wasm";
@tab Node.js
npm install taglib-wasm
@tab Bun
bun add taglib-wasm
:::
Why TagLib-Wasm?
The JavaScript/TypeScript ecosystem lacked a robust, universal solution for reading and writing audio metadata across all popular formats. Existing solutions were either:
- Limited to specific formats (e.g., MP3-only)
- Platform-specific (requiring native dependencies)
- Incomplete (missing write support or advanced features)
- Unmaintained (dormant projects)
TagLib-Wasm solves these problems by bringing the power of TagLib – the industry-standard C++ audio metadata library – to JavaScript via WebAssembly.