Audio Cutter
Operator: Abdulla Al Fahad. How tools are built and checked
Most people who need to trim a recording want one of three things: the part between two points, the silence at the front of a voice memo, or a song with its intro removed. This page draws the file as a waveform, lets you drag a start and an end handle to the bits you want, and saves that selection as a 16-bit WAV at the file's own sample rate. The decoding, the cut and the save all run in your browser tab, so the audio is never sent anywhere.
The same screen can also remove a section from the middle of a file and join what is left, add a fade in or out, change the volume in decibels, or normalise the peak level to -1 dBFS. Compressed output (WebM with Opus, Ogg with Opus, or M4A with AAC) is offered where the browser's recorder can write it, but that output is recorded in real time, so the page explains the wait before you start.
Key features
- Waveform drawn to the width of the window at the screen's pixel density, with start and end handles
- Handles move with the mouse, a finger or the arrow keys: 0.1 s per press, 1 s with Shift, Page Up and Page Down move by a tenth of the length or 1 s, whichever is larger, and Home and End for the ends of the file
- Keep the selection or cut it out, with a 5 ms fade either side of the join so the splice does not click
- Fade in and fade out in seconds, a volume change from -24 to +24 dB, normalising to -1 dBFS and a mono mix
- Playback of the selection, optionally looped, with a playhead; cut-out mode plays two seconds before the cut and two after
- WAV at the source rate, plus WebM, Ogg or M4A where the recorder supports them
Decodable inputs and the missing MP3 encoder
Input is anything the browser can decode. Chrome, Edge and Firefox handle MP3, WAV, M4A and AAC, FLAC, Ogg Vorbis, Ogg Opus and WebM Opus; Safari handles MP3, WAV, M4A and AAC, FLAC, and Opus only in recent versions. WMA, AMR, AC-3, DTS and most AIFF files do not decode in a browser, and the error names the audio codec found in the file header. The file can be up to 1 GiB, and the decoded audio is capped at 60 minutes of 48 kHz stereo, which is about 1.29 GiB of Float32 memory. The page refuses a file that would pass that cap, using the duration the browser reports before decoding and the channel count from the header (2 when the header does not give one). It checks again on the decoded result, so a file whose duration cannot be read before decoding is still refused, though only after it has been decoded. The message gives the length the cap allows at that rate and channel count.
The sample rate used for decoding is read from the file header: 44.1 kHz for a typical MP3 or CD rip, 48 kHz for most video soundtracks and Opus. Browsers resample to the audio device's rate by default, so the page decodes at the header's rate to keep the samples unchanged. Opus always decodes at 48 kHz whatever the header says. When the header gives no rate, the page uses 48 kHz and says so beneath the file details.
Selection times can be typed as seconds (12.5) or as minutes and seconds (1:05.5), or dragged on the waveform. The end must be at least 0.01 s after the start, and neither can pass the length of the file. The fade fields accept 0 to 60 seconds, and the volume slider runs from -24 dB to +24 dB in 0.5 dB steps. The WAV writer also refuses anything over 4 GiB, but the 60-minute decode cap keeps every selection under about 0.64 GiB of WAV, so that limit is a backstop rather than something a user will normally reach.
The WAV is written as RIFF with a 16-bit PCM fmt chunk and a 44-byte header, interleaved, at the decoded rate and channel count. Samples are clamped to plus or minus full scale and scaled by 32767 before rounding, so anything above full scale is flattened, and the page reports how many samples went past full scale after the volume change so you can lower it. A mono downmix averages the channels, so it halves the size of a stereo file rather than dropping one side.
How it works
The edit is plain sample arithmetic over Float32 channels, in this order: the selected frames are copied (or the rest of the file is joined across the cut), the channels are averaged if mono is on, linear fades are applied, the peak is measured, and one gain is applied. That gain is the normalising factor, 10^(-1/20) divided by the peak, multiplied by the volume factor. A peak of 0.25 (-12.0 dBFS) with normalise on and +3 dB volume therefore gets a total gain of +14.0 dB: 11.0 dB to bring the peak to -1 dBFS, then the 3 dB volume change.
Fade-in frame i is multiplied by i divided by the fade length, so the first sample is silent and the last full-level sample is just below one; fade-out frame i is multiplied by (N - i) divided by the fade length, so the last sample is multiplied by 1 divided by the fade length in frames: nearly silent, but not zero. A fade longer than the clip is cut to the clip's length. When the fade-in and fade-out together are longer than the clip, both shrink in the same ratio so they share the clip exactly: a 2-second fade-in and a 2-second fade-out on a 3-second clip become 1.5 seconds each, and the level still peaks at 1 where they meet, instead of dipping to about 0.56.
The WAV bytes come straight from those samples rather than from an OfflineAudioContext render, so the saved file has one code path to check. Compressed output is different because the browser's MediaRecorder can only record a live stream, so the selection is played through a media stream destination and the recorder runs for as long as the audio lasts.
Common use cases
- Trimming the dead air from the start and end of a podcast intro before uploading it to a hosting service that has a length limit
- Taking a 30-second chorus out of a long practice recording to send to a teacher
- Removing a cough or a dropped phone call from the middle of a voice memo so the sentences on either side meet
- Levelling several quiet phone recordings to the same peak before putting them in one folder
- Making a short looping sound effect from a longer clip, with a fade to hide the join
How to use this tool
- Choose or drop an audio file. The page decodes it and shows its length, sample rate and channel count.
- Drag the S (start) and E (end) handles, tap the waveform to move the nearer one, or type exact times in the boxes.
- Choose Keep the selection, or Cut it out to remove the section between the handles and join the rest.
- Set fades, volume, normalising or mono if you need them. The result length and WAV size update as you go.
- Play the selection to check it, then click Save WAV. The file appears under Saved files with a player and a download button.
- For WebM, Ogg or M4A, click the realtime button and wait for the selection to play through. A 3-minute selection takes 3 minutes.
Example
A 2:05.30 MP3 decoded at 44.1 kHz stereo, kept from 2.00 s to 7.00 s, with a 2 s fade-in and normalising off
File interview.mp3 (decoded at 44100 Hz, stereo)
Keep 2.00 s to 7.00 s (5.00 s)
Fade in 2.0 s
Fade out 0 s
Normalise off
Volume 0 dB
Mono offSaved WAV
interview-cut.wav
5.00 s at 44100 Hz, 2 channels, 16-bit PCM
220,500 frames x 2 channels x 2 bytes = 882,000 bytes of samples, plus the 44-byte header: 882,044 bytes
The first 2.0 s ramp from silence to full level, so the first sample is 0.Tips for best results
- Use Cut it out for a single unwanted sentence, then listen across the join. The 5 ms fade removes clicks, but a sudden change in room noise will still be audible.
- Volume is added on top of normalising rather than applied before it. With normalise on, a -3 dB volume gives a peak of -4 dBFS, so turn the volume down if the result still sounds too loud.
- Set the start and end by typing when the handle is sitting on an exact cue. Each arrow press moves the handle 0.1 s, and Shift makes it a second.
- Mono halves the WAV size. It is safe for speech, but a stereo mix of music panned left and right will lose the separation.
- A WAV made from a 44.1 kHz MP3 stays at 44.1 kHz. Resampling to 48 kHz is a separate step in a dedicated audio editor, so the page does not change the rate for you.
Common pitfalls
MP3 export is not available. Browsers include no MP3 encoder, and this page uses only the encoders the browser provides, so MP3 output would need a library the page does not load. Save WAV or the WebM or Ogg option instead.
Compressed output takes real time. The recorder plays the selection through a silent media stream, so the wait equals the length of the selection, and the browser tab has to stay open and active while it runs.
Decoding happens in memory. A 1 GiB file is read whole, and a long file may fail on a phone with little free memory even when it is under the cap.
What the cutter cannot do
It does not edit by tempo, pitch or beat. A selection is a span of samples, so a cut between two bars of music will not land on the bar line unless you put the handle there yourself, and there is no time-stretch or pitch-shift.
It does not repair the audio. There is no noise reduction, de-essing, equalisation or click removal, and clipped source audio stays clipped. The page counts samples that exceed full scale after the volume change and reports the number, so you can lower the volume, but it cannot restore peaks that were already lost in the source.
It does not keep metadata. Tags such as artist, title and album, and cover art, are not copied to the WAV or the compressed file, because the file is rebuilt from decoded samples.
Multichannel files are kept as they are, up to the cap. A 5.1 file saves six channels in a WAV, and not every player handles more than two, so downmix to stereo or mono first if the result must play anywhere.
What leaves the tab
The page sends no upload request. Choosing a file hands its bytes to the page, the browser's own decoder turns them into samples held in memory, and each saved file is a blob: link that only this open tab can resolve.
The only network traffic is the page's own code and styling, loaded the way any site loads. Choosing another file, or closing the tab, releases the decoded samples and revokes the saved links that are no longer listed.
Frequently asked questions
Why does my MP3 or M4A not open?
The page reports the codec it found in the header. Most MP3, AAC and FLAC files open in every current browser; WMA, AMR and AC-3 do not. Convert the file to WAV or MP3 in another program and try again. A WAV copy is the safest fallback.
Is the output the same quality as the input?
The WAV keeps the decoded samples at the file's own rate, so no resampling is added, but the samples are 16-bit. A 24-bit source loses its extra depth, and a lossy MP3 stays as decoded from the MP3. The compressed outputs add their own lossy coding at 128 kbps.
Why is the WebM or Ogg file slower than the WAV?
The WAV is written from the samples immediately. The WebM, Ogg and M4A files are recorded by the browser as the audio plays, so a 2-minute selection takes two minutes to save.