How to trim and join audio files without installing anything
Editing audio used to mean installing a 200 MB desktop app or uploading your recording to a stranger's server. Neither is necessary for the two jobs people actually do most: cutting a section out, and gluing several files together.
Decoding happens locally
Every modern browser ships a full audio decoder. `AudioContext.decodeAudioData()` takes the raw bytes of an MP3, WAV, M4A, OGG, FLAC or WebM file and hands back an `AudioBuffer` of floating-point samples. From that point on there is no format left — just numbers you can slice, scale and re-arrange.
Cutting a clip
Trimming is a slice of that sample array. Pick a start and end time, multiply by the sample rate to get sample indexes, and copy the range into a new buffer. Because the tool renders through an `OfflineAudioContext`, a fade is just a gain automation curve on the way out:
const gain = ctx.createGain();
gain.gain.setValueAtTime(0.0001, 0);
gain.gain.linearRampToValueAtTime(1, 2); // 2-second fade inThe Audio Trimmer & Cutter does exactly this, and also offers volume change and mix-to-mono in the same render pass.
Joining tracks
Merging is scheduling. Each clip becomes a buffer source started at an offset: the running total of the clips before it, plus any silence you asked for, minus the crossfade overlap. Overlapping two clips and ramping one down while the other ramps up gives you a proper crossfade rather than a click.
Normalising afterwards is a single pass over the rendered samples: find the loudest one, then scale everything so it sits just under full scale. That stops a quiet voice memo from disappearing next to a loud music bed.
Why the output is WAV
WAV can be written in a few lines of JavaScript — a 44-byte header plus 16-bit samples. MP3 or AAC encoding needs a codec the browser does not expose for writing, so tools that offer it ship a multi-megabyte WebAssembly encoder. If you need MP3 at the end, convert the WAV once at the last step instead of at every edit.
Practical limits
- Everything lives in memory, so an hour of stereo audio is roughly 600 MB of float samples. Long files can fail on phones.
- Trimming a lossy file and re-exporting does not re-compress it as WAV, but it cannot recover detail the original encoder threw away.
- Sample rates differ between files; a merger has to resample to a common rate, which the offline context does for you.
Both tools run with no account, no upload and no watermark — open, drop the file, export.