> For AI agents: the complete documentation index is available at https://anyformat.swc.rs/llms.txt, the full documentation bundle is available at https://anyformat.swc.rs/llms-full.txt.

# Introduction

anyformat processes the file formats of the web. The core is written in Rust,
and each format family is published as a package for Node.js and for Python.

## Format families

| Family                                           | npm package             | PyPI package       |
| ------------------------------------------------ | ----------------------- | ------------------ |
| [Image](https://anyformat.swc.rs/api/image.md)   | `@swc/anyformat-image`  | `anyformat-image`  |
| [Audio](https://anyformat.swc.rs/api/audio.md)   | `@swc/anyformat-audio`  | `anyformat-audio`  |
| [Video](https://anyformat.swc.rs/api/video.md)   | `@swc/anyformat-video`  | `anyformat-video`  |
| [Font](https://anyformat.swc.rs/api/font.md)     | `@swc/anyformat-font`   | `anyformat-font`   |
| [PDF](https://anyformat.swc.rs/api/pdf.md)       | `@swc/anyformat-pdf`    | `anyformat-pdf`    |
| [Office](https://anyformat.swc.rs/api/office.md) | `@swc/anyformat-office` | `anyformat-office` |

Install only the families that you use. Each package contains one native module
and has no runtime dependencies.

## What a package does today

Each family starts with format detection. The `detect` function reads the
leading bytes of a file and returns the format and its MIME type. It does not
use the file name or the file extension.

Decoding, encoding, and conversion will be added per family.

## One API for Node.js and Python

The Node.js package and the Python package of a family have the same API. Each
language uses its own naming style:

| Node.js              | Python                |
| -------------------- | --------------------- |
| `supportedFormats()` | `supported_formats()` |
| `mimeType`           | `mime_type`           |
| `null`               | `None`                |

## Status

The packages are at version 0.1.0. The API can change before version 1.0. The
Rust crates are not published to crates.io yet.
