TagLib-Wasm
Guide
API Reference
Examples
NPM
GitHub
Guide
API Reference
Examples
NPM
GitHub
  • Getting Started

    • Introduction
    • Installation
    • Quick Start
    • Platform-Specific Examples
  • Features

    • Working with Cover Art
    • Examples
    • Cloudflare Workers Setup
  • Core Concepts

    • Runtime Compatibility
    • Memory Management
    • Performance Guide
    • Error Handling Guide
  • API Reference

    • taglib-wasm API Reference
    • TagLib Tag Name Constants and Cross-Format Mapping
    • Extended Metadata with PropertyMap API
  • Advanced

    • Implementation Guide
    • Troubleshooting Guide
    • Cloudflare Workers
  • Development

    • Testing Guide
    • Future Improvements
    • Publishing Guide

Introduction

TagLib-Wasm brings the power of TagLib, the industry-standard audio metadata library, to JavaScript and TypeScript through WebAssembly.

What is TagLib-Wasm?

TagLib-Wasm is a WebAssembly port of TagLib that enables you to:

  • Read and write audio metadata tags (title, artist, album, etc.)
  • Support all major formats including MP3, FLAC, MP4/M4A, OGG, and WAV
  • Work everywhere – Deno, Node.js, Bun, browsers, and Cloudflare Workers
  • Use modern APIs with TypeScript-first design and async/await support
  • Handle advanced metadata like MusicBrainz IDs, AcoustID, and ReplayGain

Key Features

🎯 Format Abstraction

Write once, work with any format:

// Same API works for MP3, FLAC, MP4, OGG, WAV...
file.setTitle("My Song");
file.setAcoustidId("12345678-90ab-cdef");

🚀 Two API Styles

Choose the API that fits your needs:

Simple API - For quick tasks:

const tags = await readTags("song.mp3");
await updateTags("song.mp3", { title: "New Title" });

Core API - For full control:

const taglib = await TagLib.initialize();
const file = taglib.openFile(audioData);
file.setTitle("New Title");
file.save();

🌐 Universal Runtime Support

RuntimeSupportPackage
Deno✅ Nativenpm:taglib-wasm
Node.js✅ Fullnpm install taglib-wasm
Bun✅ Nativebun add taglib-wasm
Browsers✅ FullCDN or bundler
Cloudflare Workers✅ Fulltaglib-wasm/workers

When to Use TagLib-Wasm

TagLib-Wasm is ideal when you need to:

  • Build music library managers or media players
  • Process audio files in batch operations
  • Extract metadata for music databases
  • Implement audio file organization tools
  • Add tagging features to web applications
  • Process audio metadata in serverless functions

Next Steps

  • Installation Guide - Get started with your runtime
  • Quick Start - Write your first metadata handler
  • API Reference - Explore the full API
Edit this page on GitHub
Last Updated:: 6/17/25, 3:55 AM
Contributors: Charles Wiltgen, Claude
Next
Installation