✂️ MP3 Duration Trimmer

Browser‑only audio trimmer that decodes your MP3 locally, clips between start and end timestamps, and lets you download the result. To keep this library‑free and private, the export format is WAV (lossless) which you can convert if you specifically need MP3.

Upload an .mp3 file. Processing happens locally in your browser.
Example: 00:10 or 1:02:03. Leave empty for 0.
Example: 00:30. Leave empty to use full duration.

Trimmed Audio Preview:

podcast.mp3 • 00:00 → 00:30 • Output: WAV • Stereo 44.1 kHz
Waveform preview (example)

How to Use This MP3 Duration Trimmer

The MP3 Duration Trimmer lets you set precise start and end times to clip audio directly in your browser. It’s private, fast, and ideal for extracting segments for intros, previews, or quotes.

  1. Upload: Click MP3 File and choose an .mp3.
  2. Set Times: Enter Start and End in mm:ss or hh:mm:ss (e.g., 0:05 → 0:20).
  3. Trim: Press Trim Audio to clip the selection and preview.
  4. Download: Save the result (WAV). Convert to MP3 later if needed.

Tips:

  • Leave End blank to trim from Start to the end of the file.
  • Use short test trims first to confirm timing.
  • Large files take longer; performance depends on your device.

How It Works

The trimmer uses the Web Audio API to decode, slice, and export audio entirely client‑side.

  1. Decode: Reads the MP3 file into memory and decodes it to PCM with AudioContext.decodeAudioData.
  2. Clip: Computes sample indices from timestamps and copies samples into a new buffer (all channels preserved).
  3. Export: Encodes the trimmed PCM as a lossless WAV using an in‑browser encoder and provides a download link.

Why WAV? Native MP3 encoding isn’t available in browsers without extra libraries. WAV keeps the process private and compatible; convert to MP3 if you require that format.

When You Might Need This

Frequently Asked Questions

Does trimming happen locally?

Yes. Your file is decoded in the browser with Web Audio and never leaves your device.

Why is the download WAV and not MP3?

Browsers don’t provide native MP3 encoders without external libraries. To keep things private and dependency‑free, the tool exports WAV (lossless). You can convert it to MP3 afterward if needed.

What time formats can I use?

Use mm:ss (e.g., 1:23) or hh:mm:ss (e.g., 1:02:03). You can leave start as 0 or end blank to trim from a point to the end.

Are channels and sample rate preserved?

Yes. The tool keeps the original channel count and sample rate when building the trimmed buffer, then writes them into the WAV header.

How big can files be?

It depends on device memory and browser limits. If decoding fails or is slow, try trimming in smaller sections.