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.
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.
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.
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.
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.
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.