Music Tool

Trim Any Audio File to the Exact Moment You Need

Upload an MP3, WAV, OGG, FLAC or M4A file, drag the handles to set your trim range, and export the result as WAV.

Start Trimming
Trim Any Audio File to the Exact Moment You Need
Free Tool

Audio Trimmer

Upload an audio file, drag the handles on the waveform to set your range, and export as WAV.

No file loaded

Drop an audio file here, or click Load file

Audio waveform with start and end trim handles
01

Waveform Trim Editor

Try It Now
Audio player with waveform selection highlighted
02

Preview Before Downloading

Try It Now
Download button for trimmed audio export
03

WAV Export at Original Quality

Export Now
How It Works

Trim audio in three steps

1

Upload your audio

Drop an audio file onto the upload area or click to browse. MP3, WAV, OGG, FLAC, and M4A are all supported. The waveform loads immediately.

2

Set your trim range

Drag the blue handles on the waveform to set the start and end of your clip. Use the time input fields for precise values. The playback loops within your selection so you can hear it before exporting.

3

Export the trimmed clip

Click Trim Audio. The selected range is extracted and downloaded to your device as a WAV file at the original sample rate.

Deep Dive

How the Audio Trimmer Works

All processing runs in your browser using the Web Audio API, no server upload required.

How the Audio Trimmer Works
01

Decoding: AudioContext.decodeAudioData()

When a file is loaded the browser reads it as an ArrayBuffer and passes it to AudioContext.decodeAudioData(). This converts compressed audio (MP3, OGG, FLAC) into a raw PCM AudioBuffer at the file's native sample rate, ready for frame-accurate editing.

FormatsAny format the browser's built-in codec supports
ProcessingRuns on a background thread, UI stays responsive
02

Waveform Rendering: Canvas 2D

The decoded PCM data is sampled into amplitude buckets and drawn as vertical bars on a Canvas element. The selected region is highlighted in blue; audio outside the selection is drawn in grey. Handles are overlaid on top for dragging.

VisualizationAmplitude-based, sampled from the decoded PCM buffer
ChannelLeft channel (channel 0) used for display
03

Trimming: AudioBuffer Slice

On export the tool creates a new AudioBuffer sized to exactly the selected duration. Sample data is copied from the original buffer starting at the start-time sample index. No OfflineAudioContext rendering step is needed for a simple trim, keeping export fast.

QualityLossless: direct sample copy with no re-encoding
SpeedCompletes in under a second for most files
04

WAV Export: Manual PCM Encoder

The trimmed AudioBuffer is encoded to a standard WAV file in JavaScript. Each sample is converted from a 32-bit float to a signed 16-bit integer, interleaved across channels, and written after a 44-byte RIFF header. The resulting Blob is offered as a download.

Bit depth16-bit PCM (CD quality)

The exported WAV file is uncompressed and will be larger than the original MP3 or OGG. Convert it with any audio tool if a smaller file size is needed.

Benefits

Why Use This Audio Trimmer

✂️

Frame-Accurate Trimming

Drag handles on the waveform and fine-tune with numeric inputs for precise start and end points.

🎧

Preview In Selection

Playback loops within your selected range so you can hear the result before exporting.

🎵

Multiple Formats In

Accepts MP3, WAV, OGG, FLAC and M4A — any format your browser can decode.

💾

Lossless WAV Out

16-bit PCM WAV at the original sample rate with no quality loss.

Who Uses It

Who Uses the Audio Trimmer

From podcasters cleaning up recordings to musicians extracting loops, here are the most common uses.

People using an audio trimming tool
01

Podcasters

Remove a slow intro, trim dead air from the end of an episode, or extract a single answer from a long interview — without opening a full DAW.

Tip: loop playback within the selection a few times to confirm the cut sounds clean before exporting.

02

Musicians and Producers

Isolate a drum fill, a vocal phrase, or a guitar riff from a longer recording and export it as a WAV sample ready for your DAW.

03

Content Creators

Trim a background music track to exactly the length of your video or reel and download it immediately.

WorkflowTrim here, import the WAV into your video editor
04

Teachers and Educators

Extract a specific section of an audio lesson or musical example to share with students. Works on any device with a modern browser, including tablets.

05

Developers

A practical reference for AudioContext.decodeAudioData(), manual AudioBuffer slicing, and WAV file encoding in the browser.

APIs usedAudioContext, AudioBuffer, AudioBufferSourceNode
06

Casual Users

Need to trim a voice memo or shorten a song? Drop the file, drag the handles, and download the result.

Frequently Asked Questions

Can I use this to trim MP3 files?

Yes. Drop any MP3 file onto the upload area, drag the handles to set your trim range, and export as WAV. The browser decodes the MP3 natively so no conversion step is needed.

Can I trim WAV files?

Yes. WAV files load and decode instantly since they are already uncompressed PCM. The exported WAV is a direct sample-accurate slice of the original, with no quality loss.

What audio formats are supported?

Any format your browser's built-in codec can decode: typically MP3, WAV, OGG, FLAC, M4A, and AAC. The exported file is always a WAV.

How precise is the trim?

The numeric input fields let you set start and end times to one decimal place (0.1 s). The underlying sample-level copy is accurate to a single audio sample at the file's native sample rate.

Why is the exported WAV larger than the original file?

WAV is an uncompressed format. The original file may have been an MP3 or OGG compressed to a fraction of the size. Run the exported WAV through an audio converter if you need a smaller file.

Can I trim very long audio files?

The tool loads the entire file into memory as a decoded PCM AudioBuffer. Files up to around 30 to 60 minutes work fine on most modern devices. Very long files may cause the browser to run low on memory.

Get Started Free

Ready to Trim?

Drop an audio file, drag the handles to your range, and download your trimmed clip in seconds.