Audio file trimming/music cut editing tool | ZeroTools

Decode audio files to display their waveform, preview and trim a selected segment using two sliders, and export the excerpt as a WAV file.

Loading tool interface...

When to use this tool

Back to the tool ↑

Suited for previewing specific audio intervals directly in your browser and exporting them as 16-bit WAV files.

Try it first

Load audio at least 2 seconds long and select 0.50–1.50 seconds. Export a 1-second, 16-bit WAV containing all decoded channels.

Before you start

The waveform shows only the first channel; supported input formats and decoded sample rate depend on your browser. MP3 export, fading, and joining are not supported.

Local Audio Processing and Network Scope

Audio decoding, waveform rendering, playback preview, trimming, and WAV export execute entirely within the local browser memory without uploading audio files to external servers. This does not imply the site operates fully offline, as site assets, analytics, and advertising involve separate network requests.

ZeroTools: Browser Processing & Privacy

ZeroTools focuses on tools that process input on your device. Check each tool’s scope and limitations before use.

Processing and privacy policy
Chapter 1

Saving a Target Segment from a Single Audio File

The audio trimming tool is designed to select a single required section from your audio file and save it as a separate WAV file. It processes one file at a time.

Click inside the dashed border to choose a file or drag and drop an audio file into the box to load it. Once the waveform and file details are displayed, define your trimming range using the start and end sliders and verify your selection by clicking Play Selection.

Afterward, click Trim and Export and download the resulting WAV file via the save button that appears. The output file is named by taking the original filename without its extension and appending _trimmed.wav.

Preview playback plays only the selected interval without looping. Because a waveform outline alone does not reveal spoken words or musical phrasing, listen to the preview audio to refine boundary points.

Moving either slider after exporting invalidates the previous export data and clears the completion status. Saving a newly adjusted range requires clicking export again.

If you wish to save multiple segments, adjust the range and export each one separately; this tool does not automatically split audio into multiple files simultaneously.

Chapter 2

Input Formats and Browser Decoding

The selected file is decoded using AudioContext.decodeAudioData() and handled as an AudioBuffer. Format examples shown on screen such as WAV, MP3, M4A, OGG, and FLAC do not guarantee compatibility across all environments.

Supported containers and codecs vary across browsers and operating systems, and files sharing the same extension can behave differently depending on their internal encoding.

Unsupported or corrupted files trigger an error upon loading. This page does not feature microphone recording.

The Original Size shown in the status section reflects the uploaded file size, whereas the sampling rate and channel count describe the decoded AudioBuffer.

Because decodeAudioData() may resample audio to match the sample rate of the AudioContext, displayed values and output WAV parameters might not correspond to the metadata header of the original file.

Even compressed audio is decompressed into PCM samples in memory for editing. While this implementation imposes no hardcoded file size limit like 30 MB, this does not imply unlimited capacity.

Long recordings or multi-channel audio demand substantial memory, which can lead to sluggish performance or decoding failures depending on the device and browser.

Input file size alone cannot determine required memory.

Chapter 3

Reading the Waveform and Operating the Sliders

The canvas waveform summarizes the amplitude of the first audio channel (channel 0) and does not combine left and right stereo channels.

It calculates the minimum and maximum values for sample groups corresponding to roughly one pixel of canvas width and draws vertical lines connecting these extremes.

Consequently, it is not an exact plot for examining fine waveform nuances or sounds occurring exclusively on secondary channels. The unselected regions are darkened, with boundary lines and current playback position overlaid.

Use the waveform as an approximate visual guide to identify sound presence or near-silence, and confirm boundaries using audio preview.

You cannot select ranges by clicking or dragging directly on the waveform, nor is there a zoom function. Range selection is operated solely through the two start and end sliders positioned below the waveform.

Slider adjustments operate in 0.01-second increments, with the start position placed before the end position and the end position placed after the start position.

Timestamps display minutes, seconds, and two decimal places. This represents slider step precision rather than an absolute guarantee that output audio boundaries align perfectly with displayed times, and vertical waveform bars do not depict sample-level accuracy.

To preserve brief word onsets or initial transients, listen to the selected range and reposition sliders as needed.

Chapter 4

Converting Timestamps to Sample Boundaries

Preview playback uses the decoded original AudioBuffer, playing from the specified start time for the duration between start and end via an AudioBufferSourceNode.

Exporting does not save time values directly; it constructs a new buffer from the decoded sample array. The start and end timestamps in seconds are multiplied by AudioBuffer.sampleRate and rounded down using Math.floor() to determine sample indices.

The end index is clamped so it does not exceed buffer length, copying samples from the start index up to the end index. If the calculated segment length is zero or negative, an error is returned.

Although waveform rendering uses only the first channel, trimming extracts all channels. For stereo audio, identical sample spans from both left and right channels are copied into the new buffer, and files with three or more channels retain their original channel count.

Trimming boundaries align with sample positions based on the decoded sample rate, so 0.01-second slider steps should not be mistaken for arbitrary millisecond numerical inputs.

This routine does not apply smoothing envelopes across boundaries. Cutting at non-zero amplitudes may cause an audible click in the exported file.

Chapter 5

16-bit PCM WAV Specifications and Limitations

Output is restricted exclusively to 16-bit signed PCM WAV. Floating-point samples from the trimmed AudioBuffer are quantized into 16-bit integers.

The generated file consists of a 44-byte RIFF/WAVE header followed by interleaved PCM channel samples. File size scales with duration and channel count.

When compressed formats like MP3 are trimmed, the resulting file is saved as WAV rather than MP3, which may be larger than the source file.

Due to potential resampling during decoding and 16-bit integer quantization on export, this process is not a lossless byte-for-byte copy of the source stream.

Exporting to MP3, AAC, M4A, OGG, FLAC, or WebM is not supported. Metadata tags such as track title, artist name, and album artwork are not copied over.

Volume adjustments, normalization, noise reduction, fade-in/fade-out, file merging, and multi-segment batch splitting are unavailable.

If you require a different format, process the exported WAV using a dedicated conversion tool. For very long recordings, keep in mind both device memory limits and the fact that this implementation utilizes a standard 32-bit integer RIFF chunk size field.

Chapter 6

Use Cases and Data Handling

This tool is well suited for extracting a single agenda item from a meeting recording, trimming a lecture excerpt for easier review, or removing unwanted introductory and ending silence.

Listening to audio playback can help check boundaries before saving, though it does not guarantee exact edit results. Applying crossfades at cut boundaries or suppressing background noise within the retained excerpt cannot be accomplished with this tool alone.

Pitch and speed adjustment and stereo/mono channel editing require separate tools. Determine suitability based on whether extracting a single segment into a WAV file meets your workflow needs.

Audio decoding, waveform rendering, playback preview, trimming, and WAV generation take place entirely inside the browser. However, this does not imply that the entire website operates offline, performs zero network transfers, or provides absolute confidentiality guarantees.

Network requests unrelated to audio processing, such as page loading, analytics, and advertising, may occur. Check your device, browser extensions, and network environment accordingly.

The AudioBuffer and generated WAV data utilize browser memory during processing. Clearing files or navigating away from the page does not delete source files or previously saved WAV files stored on your device.

Frequently Asked Questions (FAQ)

A.
One file can be loaded at a time. Compatibility for formats like WAV, MP3, M4A, OGG, and FLAC depends on browser and OS decoding capabilities, and files sharing the same extension may fail to load. While there is no fixed file size limit, long recordings require sufficient device memory.
A.
No. The waveform summarizes amplitude from the first channel and does not support click-and-drag selection or zooming. Adjust start and end points using the two sliders with 0.01-second precision and verify the excerpt with preview playback.
A.
Exporting is limited to 16-bit PCM WAV, saved with _trimmed.wav appended to the original filename. Embedded tags such as song titles are not retained, and fades, noise reduction, and normalization are not applied. Modifying the range requires re-exporting.
A.
The sliders adjust in 0.01-second increments. The actual start and end positions are calculated by multiplying the selected seconds by the decoded sample rate and rounding down to integer sample indices. Decoding may also resample the original file rate.
A.
Audio decoding, waveform rendering, preview playback, trimming, and WAV generation occur entirely within the browser. However, this does not guarantee zero network traffic across the website, as page loading, analytics, and advertising communicate separately.