Trim Audio

Choose an audio file, drag across its waveform to choose the part you want (or type where it starts and ends), listen to that part, optionally fade the edges, and download it as a WAV or MP3 file. The file is decoded and cut inside your browser: it never leaves your device.

Trim Audio

or drop it here. The file stays on this device.

How it works

  1. Choose or drop an audio file. Its length, sample rate and channels are shown and the waveform appears.
  2. Drag across the waveform to choose the part to keep, or click it to move the nearer edge there; the sliders and the seconds fields set the same start and end, and Whole file resets the range. Play selection plays that part, with its fades, before you trim. Add a fade in or fade out in milliseconds if you want soft edges. The bit depth follows the file unless you choose 16- or 24-bit.
  3. Choose WAV, or MP3 and its bitrate, press Trim audio, listen to the preview, and download the file. The name carries the start and end times.

Questions

Which formats can be opened?

Whatever your browser can decode: WAV, MP3, Ogg Vorbis and Opus, FLAC, and AAC in M4A or MP4 in current Chrome, Edge, Firefox and Safari; AIFF in Safari. A file the browser cannot decode is refused with a message rather than producing a broken result.

Can it make an MP3?

Yes: choose MP3 under Format, with a bitrate of 64, 128, 192 or 320 kbps. The MP3 is encoded on your device by LAME (lame.sourceforge.net) in its JavaScript port lamejs 1.2.1, under the LGPL-3.0, which this site serves unchanged with its licences and loads only when you make an MP3; a long recording can be stopped while it encodes. MP3 holds 8 to 48 kHz and one or two channels: another sample rate is converted first with the same filter as Convert Audio (96 kHz becomes 48 kHz), and so is stereo at 64 kbps from 32 kHz up, which is written at 24 kHz, the rate LAME uses for it (the result says so); at 16 to 24 kHz the bitrate is at most 160 kbps and at 8 to 12 kHz at most 64 kbps, and a file with more channels is refused for MP3 and stays WAV. An MP3 starts with 1,105 samples of silence that the encoder adds (25 ms at 44.1 kHz, 23 ms at 48 kHz, up to 138 ms at 8 kHz) and its end is padded to a whole frame; nothing in the file marks them, so players play them too, and the preview plays the MP3 itself. WAV keeps every sample exactly and is about ten times larger: about 10 MB per minute of 16-bit stereo at 44.1 kHz, where an MP3 at 128 kbps is about 1 MB.

Is the quality changed?

The kept section is written at the file's own sample rate, read from its header (WAV, AIFF, MP3, AAC, M4A, Ogg, WebM or FLAC), and with its own channels. A 16- or 24-bit PCM WAV is read by the page itself and written at its own bit depth by default, so without fades the section is sample for sample identical to the original; choosing 16-bit for a 24-bit file rounds every sample to 16 bits, and the result says so. Other formats are decoded by the browser, which decides their exact sample values: a FLAC or AIFF is written at the bit depth its header states (24 bits at most), a lossy file such as MP3 at 16-bit, unless you choose another depth. Fades change only the samples inside them. MP3 is lossy by nature: the encoder leaves out detail to make the file about a tenth of the size, so an MP3 is never sample for sample the original; WAV is. If a header does not state the rate, or states an AAC core rate that HE-AAC doubles, the page names the rate it used.

How large a file can I trim?

Files up to 50 MB. Decoded audio takes 4 bytes per sample per channel in memory, so a 50 MB MP3 of about an hour at 44.1 kHz takes about 1.3 GB in stereo, or 0.6 GB in mono, while it is open; on a phone that can fail, and the file is then refused with a message. A trim needs up to as much again for the part kept, plus the file it writes: a WAV takes 2 bytes per sample per channel at 16-bit and 3 at 24-bit, and an MP3 is decoded once more for its preview. Trimming itself takes well under a second; encoding an MP3 takes about a tenth of the recording's length on a recent computer (a minute of stereo in about 6 s) and can be stopped.

Does it work offline?

Once the page has loaded, yes, for WAV: nothing is fetched while you trim. MP3 needs its encoder, about 530 KB, which the page fetches from this site the first time you make an MP3; offline before then, the page says it could not load the encoder.

Is my file uploaded?

No. The page loads a small script into your browser and every operation runs on your device. You can check this yourself in the browser's network panel: after the page has loaded there are no upload requests. Closing the tab discards the file.

Do I need an account or to pay?

No. These basic tools are free and store nothing on our servers. The only limits are the tool's own: files up to 50 MB. Within them, the practical limit is your device's memory.

What does this page keep in my browser?

Nothing you open or type. While the tab is open, the tool pages keep a short list of the steps taken in it, in the tab's session storage: the step (page opened, started, succeeded, first success, used again or failed), the tool's name, the time, how many files were used and, for a failure, an error code; never a file name, the contents of a file or your text. It holds at most the latest 200 steps, and the browser deletes it when the tab closes. The page never sends it. Where a Report a problem button is shown, you can attach the last 20 steps to your report; nothing is attached unless you tick that box. In local storage the page keeps only choices you made: a Light or Dark theme until you choose System again, the language you picked with the EN / 中文 switch if it differs from your browser's language, and this tool in your recently used list if you switched that list on at the tools page.

Questions or problems

Found a problem or missing feature? Tell us. Please describe the steps; do not send confidential data.