Audio Trimmer
Search for an audio trimmer and page one is video editors that want an account and an upload before you can make one cut. This one decodes the file in this browser tab with the Web Audio API, so the moment a file opens you are looking at its waveform with two handles on it, a Play selection button and the start and end times as fields you can type into. The cut is worked out in frames rather than seconds: a selection from 0:12.000 to 0:31.500 at 48 kHz is exactly 936,000 frames, and the export lands on the sample those two times name instead of snapping to whatever boundary a re-encoding trimmer happens to use. The samples between the handles are written out as uncompressed 16-bit PCM WAV, with an optional 10 or 50 millisecond linear ramp at each edge so the cut does not click. The two ceilings, 120 MB of file and 30 minutes of decoded audio, are checked before the file is read and before the cut is allocated, because the whole thing is held as samples in this tab rather than on somebody's server.
Open an audio file
· or drop one anywhere on the stage
Ready. Choose an audio file, or drop one on the stage.
Drag either handle, drag across the waveform to select a new span, or type a time into Start and End. With a handle focused the arrow keys move it by a tenth of a second and shift with an arrow moves it by a second, so the selection can be set without a pointer. A dragged handle stops at the other one; a typed time is taken as typed. Space plays the selection with the fade applied, which is the same shape as the file that downloads. The ceilings are 120 MB and 30 minutes, because the whole file is decoded to 32-bit samples in the memory of this tab before anything is cut.
Common questions
- Which audio formats can I open here?
- Whatever your browser can already decode, which is the honest answer because the decoding is the browser's own. In practice that means MP3, WAV, M4A and AAC, OGG and Opus, and FLAC in current versions of Chrome, Firefox, Safari and Edge, with the exact list differing a little between them. There is no separate list of supported formats maintained here and nothing to keep up to date: the file is handed to the browser's decoder, and if it comes back undecodable the tool says so and names the file rather than failing silently. Anything a browser will not touch, such as a proprietary or DRM-protected file, has to be exported as a WAV or an MP3 first.
- Why is the download a WAV, and why is it bigger than the file I started with?
- Because browsers decode many formats and encode almost none. There is no MP3 or AAC encoder built into the platform, so a trimmer that runs entirely in the page either ships a large encoder of its own or writes the one format the platform can write, which is uncompressed 16-bit PCM in a RIFF container. This tool writes the WAV. That means the download is about 11.5 MB a minute for stereo at 48 kHz, which is larger than the compressed file you opened, and the size is printed under the controls before you download so there is no surprise. What you get for it is that the samples between the handles are never put through a second lossy encode, so nothing is lost a second time.
- Is the cut really sample accurate?
- Yes, and you can read the number. Both times are turned into a frame index once, by rounding to the nearest sample, and everything after that counts frames: one second at 48 kHz is 48,000 frames and the exported file holds exactly 48,000 frames. The frame count for your own selection is printed in the row under the stage. This matters because a trimmer that re-encodes has to start on a boundary the codec allows, which can be tens of milliseconds away from the point you dragged to, and almost none of them tell you that they moved it.
- What does the fade do, and when do I need it?
- A cut that starts or ends in the middle of a waveform jumps from wherever the sound was to silence in a single sample, and that step is audible as a click. The fade is a linear ramp at each edge: the first sample of the selection is exactly silent, the gain rises over the fade length, and the end mirrors it. 10 ms is enough to remove the click without anybody hearing the level move, and 50 ms is a fade you can hear, for the start of a loop or the end of a clip. Off is exactly the samples between the handles and nothing else. A fade longer than half the selection is refused rather than applied, because two ramps that overlap never reach full level, which is not the fade you asked for. Play selection previews the ramp, so what you hear is the shape of the file that downloads.
- Is my audio uploaded anywhere?
- No. The file is read by the decoder built into this browser, the waveform is drawn on a canvas here, and the WAV is written by JavaScript in this tab and handed to the browser's download. There is no upload, no queue, no account and no request of any kind, so no part of the audio reaches a server, an analytics call or an error report. The only thing kept between visits is the fade setting, stored in this browser under one key, and the Start over button at the top of the page forgets it.
- What are the size and length limits, and why does a local tool have any?
- 120 MB of file and 30 minutes of decoded audio. Neither is a commercial gate, because nothing is uploaded and there is nothing to charge for. They exist because decoding expands audio: 30 minutes of stereo at 48 kHz is 86.4 million frames, which is about 691 MB of 32-bit samples held in this tab before a single byte of WAV is written, and cutting the whole of it allocates about that much again. The size is checked against the file before it is read at all, and the length is checked against the decoded audio before the trim allocates anything, so a file past either ceiling gets a message naming the limit and its own actual value instead of a frozen tab. For anything longer, cut it into pieces in a desktop editor first.
- Can I set the selection without a mouse?
- Yes, in two ways. Start and End are ordinary text fields: type 0:12.500, or 1:00, or just 12.5 for twelve and a half seconds, and press Enter. Both handles are also focusable, and with one focused the left and right arrow keys move it by a tenth of a second, shift with an arrow moves it by a whole second, and Home and End send it as far as it will go, which is the edge of the file or the other handle, whichever it meets first. A dragged or nudged handle is pinned so it cannot cross the other one, while a time you type is taken as typed: an end before the start is refused with both times in the message rather than quietly moved. The space bar plays the selection and stops it again, from a handle or from anywhere outside the fields. Anything you type that is not a time is refused with the form to type instead, rather than quietly becoming zero.
- Does trimming an MP3 here lose quality?
- It does not add a second generation of lossy compression, which is the loss people are usually asking about. The browser decodes the MP3 to samples once, the selected samples are copied out, and they are written as uncompressed PCM, so there is no re-encode. Two honest details sit alongside that. Whatever the original compression already removed is gone before this tool ever sees the file, and the WAV is written at 16 bits, so the browser's 32-bit float samples are rounded to the nearest 16-bit value and anything past full scale is clamped rather than allowed to wrap. Both are far below the level of an audible change, and neither is a second compression pass.
The cut lands on the exact sample the start and end times name, and the audio inside the selection is not re-encoded. The download is uncompressed PCM WAV, so it is larger than a compressed source, and the formats that open are whatever your browser can decode.