# Audio Trimmer

> Cut a section out of an audio file. See the waveform, drag the trim region, add fades, and export WAV.

Free audio trimmer that runs entirely in your browser. Upload audio, see the waveform, drag-select the part to keep, add fade in and fade out, and download a 16-bit WAV. Your audio never leaves this device.

- Page: https://benchline.fabwaseem.com/t/audio-trimmer
- Runs: in the browser. Input stays on the device.
- Price: free, no account
- Input: An audio file (any format the browser can decode), the trim start and end, and optional fade in and fade out lengths.
- Output: A 16-bit PCM WAV file containing the selected region with fades applied.
- Keywords: audio trimmer, trim audio, cut audio, audio cutter, mp3 trimmer, wav trimmer
- Updated: 2026-10-18
- Built by: Waseem Anjum (https://fabwaseem.com)

## How to use it

1. **Add an audio file.** Drop any audio file. It is decoded in this browser, never uploaded.
2. **Select the trim region.** Drag across the waveform to choose the part to keep. Start and end times are shown.
3. **Add fades and export.** Set fade in and fade out lengths, preview the selection, then download the trimmed audio as a 16-bit WAV.

## Use it from an AI agent

MCP tool name: `trim_audio`
MCP endpoint: https://benchline.fabwaseem.com/mcp (Streamable HTTP, no key)
HTTP: POST https://benchline.fabwaseem.com/api/v1/tools/audio-trimmer with the input as the JSON body
This call fetches a public URL on the server. Private addresses are refused.

Trim a WAV audio file to a time range with optional fade in and out, returning a 16-bit PCM WAV as base64. Only WAV is accepted; the web UI handles MP3/OGG/M4A.

### Input schema

```json
{
  "type": "object",
  "properties": {
    "file": {
      "type": "object",
      "properties": {
        "url": {
          "description": "Public http or https URL. Private and local addresses are refused.",
          "type": "string"
        },
        "data": {
          "description": "Base64 bytes or a data URI. Decoded size is capped at 10 MB.",
          "type": "string"
        },
        "mimeType": {
          "description": "MIME type when you know it.",
          "type": "string"
        },
        "filename": {
          "description": "File name, including the extension when you have one.",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "startSec": {
      "type": "number",
      "minimum": 0,
      "description": "Trim start in seconds."
    },
    "endSec": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Trim end in seconds, after startSec."
    },
    "fadeInSec": {
      "default": 0,
      "description": "Linear fade-in length in seconds.",
      "type": "number",
      "minimum": 0
    },
    "fadeOutSec": {
      "default": 0,
      "description": "Linear fade-out length in seconds.",
      "type": "number",
      "minimum": 0
    }
  },
  "required": [
    "file",
    "startSec",
    "endSec",
    "fadeInSec",
    "fadeOutSec"
  ],
  "additionalProperties": false
}
```

### Example tools/call

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "trim_audio",
    "arguments": {
      "file": {
        "url": "https://example.com/file"
      },
      "startSec": 1,
      "endSec": 1,
      "fadeInSec": 0,
      "fadeOutSec": 0
    }
  }
}
```

Setup for Claude, Cursor, and VS Code: https://benchline.fabwaseem.com/mcp/guide

## Questions

### Are my audio files uploaded?

No. Everything runs locally in the browser. The file is decoded, trimmed, and encoded on this device. Nothing is sent to a server.

### Which formats can I open?

Anything your browser can decode: MP3, M4A, OGG, FLAC, WAV, and more. The export is always a 16-bit WAV, no matter which format you opened.

### How do I pick the trim region?

Press and drag across the waveform to select the part to keep. The start and end times update as you drag. Fades apply to the kept section.

### Why is the exported file bigger than the original?

WAV is uncompressed. The same audio in 16-bit WAV takes roughly 10 MB per stereo minute.
