Trim Audio

Cut a track down to the part you need — or take a stretch out of the middle — without the file leaving this tab.

Runs on your deviceAudioWorkingNo account needed

What this tool does

Trim Audio decodes your file into raw samples — WAV through a pure-JavaScript RIFF reader, everything else through the browser's own audio decoder — and then copies out the range you named. Each cut lands on the sample nearest your timecode, so at 44.1 kHz the placement is accurate to about two hundredths of a millisecond. Keep the selection and Remove the selection are the same operation run in opposite directions: one copies the middle out, the other copies the head and the tail and joins them.

What you get back is a new file rather than a slice of the old one, and that distinction costs something. Trimming an MP3 means decoding it and encoding it again with the LAME encoder loaded by this page, which is a second lossy pass — inaudible at 256 or 320 kbps, but it accumulates if you keep re-cutting the same file. The cut also ignores MPEG frame boundaries, so this is not the frame-exact stream copy a command-line tool performs. Choosing WAV output skips the second encode entirely, at the price of a much larger file.

The output is WAV or MP3 and nothing else, because no browser exposes an AAC, FLAC or OGG encoder to a web page. Match the input where possible keeps an MP3 as an MP3 and writes everything else as WAV, so a FLAC or an M4A comes back bigger than it went in, at 16-bit unless you raise the bit depth. Reading is the wider half: anything your browser can play decodes here, including formats it has no way to write back.

Two practical limits are worth knowing first. There is no waveform to scrub — the start and end are typed as timecodes, so finding the right moment usually means playing the file elsewhere and noting the times. And the whole file sits in memory as 32-bit floats while it is edited, roughly 20 MB for every minute of 44.1 kHz stereo, which is nothing for a song and heavy for a two-hour recording, where the tab can run out of room before it reaches the encoder.

How to use it

  1. Choose the audio file. MP3, WAV, M4A, AAC, FLAC, OGG and Opus are accepted, decoded by whatever your browser supports. Add several and the same start and end are applied to each one in turn.
  2. Type the start and the end. Bare seconds such as 12.5, mm:ss such as 1:23, or hh:mm:ss such as 0:01:23.5. Leave End at blank to run to the end of the file; an end beyond the real length is pulled back to it.
  3. Decide what to keep. Keep the selection returns everything between the two points. Remove the selection deletes that stretch and joins what remains, and is refused when the range covers the whole file.
  4. Pick the output and run it. Match the input where possible, or force WAV or MP3, with a bitrate for MP3 and a bit depth for WAV. Soften the cut edges stays on by default and applies a 5 ms ramp so the join does not click.

Processing & privacy

Runs on your device. Your file is processed directly in this browser.

Common use cases

Making a ringtone

Take the thirty seconds of the chorus, keep the selection, and write it as MP3 at 192 kbps or higher so the second encode stays out of earshot.

Cutting the dead air off a recording

Voice notes and interviews open with fumbling and close with someone reaching for stop. Set an end and leave the start at 0, or the other way round.

Lifting an advert out of a downloaded show

Remove the selection deletes the stretch you name and joins the two halves, with the ramp hiding the seam where they meet.

Fitting a clip inside an upload cap

A minute of audio is a small fraction of an hour, so cutting to the part that matters is often enough on its own, before any thought of compression.

Questions

Is my audio uploaded?
No. The file is decoded, edited and encoded inside this browser tab, and no part of it is transmitted or stored. Two things do come over the network beforehand: the audio module, fetched when you open this tool, and the LAME encoder, fetched the first time a run writes MP3. Once both are in the tab, further trims complete with the network disconnected.
Does trimming an MP3 lose quality?
A little. The audio has to be decoded and encoded again rather than copied out of the original bitstream, so it is a second lossy pass. At 256 or 320 kbps that is hard to hear, and choosing WAV output avoids it completely.
Why did my FLAC come back as a WAV?
Browsers ship no FLAC, AAC or OGG encoder, so WAV and MP3 are the only formats this tool can write. Your file is read correctly and then written as one of those two, which usually makes it larger.
Can I cut a piece out of the middle?
Yes. Put the start and end around the part you do not want and choose Remove the selection — the head and the tail are joined into a single file.
What time formats are accepted?
Seconds (12.5), mm:ss (1:23) and hh:mm:ss (0:01:23.5). Anything the parser does not recognise is refused with the offending text quoted back, instead of quietly becoming zero.
Why was my range rejected?
Two checks stop any run: a start point past the end of the file, and a removal whose range covers everything, so nothing would be left. A third fires only under Keep the selection — an end that falls before the start. Remove the selection does not make that check today, so a backwards pair there is accepted rather than refused; see the next answer for what it produces.
What happens if I put the end before the start?
Under Keep the selection you get an error naming the file length. Under Remove the selection you get a file, and it is wrong: the head runs to the start point and the tail begins at the earlier end point, so the two overlap and the stretch between them is duplicated. A 60-second clip cut backwards from 0:30 to 0:10 comes back 80 seconds long. The summary line prints the range reversed, which is the tell — check it before you save.
Can I trim several files at once?
You can add several, but one pair of timecodes is applied to all of them, which only helps when the files line up. Different cut points mean separate runs.
How long a file will it handle?
There is no fixed cap; the limit is memory. Decoded audio costs roughly 20 MB per minute of 44.1 kHz stereo, so a podcast episode is comfortable on a desktop and an all-day recording is not.

Related tools