๐Ÿงฐ UtlKit

Audio Merger: How to Merge 3 Audio Clips into One File โ€” 30s + 45s + 15s into 1:30, Sample-Rate Unification and the 11-to-1 WAV-versus-MP3 Size Split

Merge audio clips in the browser: 30 s, 45 s and 15 s become one 1:30 file after decode, trim, reorder and sample-rate unification, exported as 16-bit stereo WAV at 176400 bytes per second or as 128 kbps MP3 at 16000 bytes per second, an 11-to-1 size split, with the whole pipeline local and no upload.

Merging audio is a decode, not a calculation: each file is decoded into the same stream of raw numbers, the kept parts are laid end to end, and the result is re-encoded as a single file. Audio Merger runs that pipeline entirely in the browser. Drop in three clips โ€” a 0:30 intro, a 0:45 middle section, a 0:15 outro โ€” trim each one with the drag handles, order them with the up and down buttons, and the merge output is one 1:30 file, exported as 16-bit stereo WAV at 176400 bytes per second or as 128 kbps MP3 at 16000 bytes per second, an 11-to-1 size split. Nothing is uploaded: the Web Audio API decodes, resamples and encodes on the machine that has the files.

Before the Merge: Trim, Cut and Reorder

Each track renders a waveform with two drag handles. The left handle moves the start position, the right handle moves the end position, the selected window is highlighted, and a time label follows each handle in M:SS format. The shortest selectable window is 0.05 seconds, which at 44100 hertz is exactly 2205 samples, so every cut has a hard floor below which the trimmer will not go. The up and down buttons reorder the track list, and the list order is the output order: the clip at the top plays first in the merged file. Clicking the waveform sets a playback cursor, and the play button on the track starts from that cursor, which is how you audition a cut before committing it. If you already have a single file you want to cut down, the audio trimmer does the same handle drag as a standalone step and hands the result back as a file, ready to be merged with others.

The Formats the Browser Can Decode

The merger accepts whatever the browser decoder accepts: MP3, WAV, OGG, AAC and M4A on the usual platforms, all decoded through the same Web Audio path into the same intermediate shape. A file that fails to decode is skipped rather than treated as a fatal error โ€” the remaining tracks still merge โ€” which is a deliberate asymmetry. The tool optimizes for getting the usable clips into one file, and the cost of a bad file is one missing track that you can re-import after fixing it. When a format sits outside the decoder window, or a container is unusual for the platform you are on, the fix is to convert it to WAV or MP3 first with the audio converter and then merge. Converting before merging also normalizes sample rates ahead of time, which shortens the resampling step and keeps the whole pipeline at one clock from the start.

One Sample Rate for Every Clock

Concatenation needs one clock. Two clips at different rates contain different numbers of samples per second, and pasting one after the other would stretch or squeeze whichever rate you did not pick. The merger resolves this by taking the highest sample rate among the tracks and resampling the rest to it: a 0:30 clip at 48000 hertz placed next to a 0:45 clip at 44100 hertz makes the whole merge run at 48000 hertz, and the 44100 clip is resampled upward. The resampler is the browser OfflineAudioContext, which applies a low-pass filter as it changes the rate. That filtering matters, because naive decimation โ€” simply dropping every second sample when halving the rate โ€” aliases and adds a metallic edge to the highs. When the output is MP3, the encoder only knows a fixed list of rates, so hi-res sources follow a clean halving chain: 96000 becomes 48000, 88200 becomes 44100, 192000 becomes 96000 and then 48000, and 176400 becomes 88200 and then 44100.

The Output Split: WAV Versus MP3

The two outputs hold the same samples in two different cost structures. WAV writes 16-bit PCM behind a 44-byte RIFF header: at 44100 hertz in stereo that is 176400 bytes per second, so the 1:30 merge is 15876044 bytes, about 15.1 MiB, and the size is exact โ€” duration times rate times two channels times two bytes, plus the header. MP3 encodes at 128 kbps, which works out to 16000 bytes per second, so the same 1:30 lands at 1440000 bytes, about 1.4 MiB. The ratio is 11 to 1, and it stays 11 to 1 for any length because both formats scale linearly with duration. The trade is lossless against lossy: WAV keeps every sample, MP3 keeps what the psychoacoustic model deems audible. A mono source is duplicated to both channels instead of being padded with silence, so panning stays neutral. Choose WAV for an archival master or a further editing pass, and MP3 for sending, embedding in video, or uploading to a host. The file size converter does the same per-second math whenever you need a size estimate for a length the tool does not display.

From Recording to Merging

The merge step is the second half of a capture workflow. The voice recorder captures takes in the same in-browser Web Audio path, so a recorded segment can be saved, dropped into the merger next to existing files, trimmed to drop the false start, and merged into the final cut without leaving the site and without an intermediate upload to a recording service. The pattern is the one podcast and narration editors use by hand: record separately, then assemble. Doing the assembly client side means the raw takes never have to be handed to anyone, which matters when the recording is a client session, a rehearsal, or anything the owner would rather not paste into a web form.

Where Else the Merge Pattern Shows Up

Merging is a general pattern: decode to a common form, reorder, concatenate, re-encode โ€” and the file format is just the packaging on the way in and out. The same shape runs through documents and images in the browser. The PDF merger joins pages from several PDF files in the order you choose, the image to PDF converter assembles a stack of pictures into a single document, and the image cropping guide covers the sibling prep step where a picture is reduced to the region that matters before it is packaged. The shared property across all of them is that the common intermediate form does the work while the formats stay on the edges, and that the whole pipeline runs locally: the audio, the pages and the pixels never leave the machine, which is exactly the property a merge tool should have.

Related Tools

Frequently Asked Questions

Can I merge MP3 and WAV files into a single output?

Yes. The merger decodes every file into the same raw stream of samples, so a 0:30 MP3 and a 0:45 WAV sit in the same shape before they are laid end to end. The output is one file in a single format: 16-bit stereo WAV at 176400 bytes per second, or 128 kbps MP3 at 16000 bytes per second. Mixed input is the normal case, not a special one.

Why is the merged file always stereo?

The output buffer is built with two channels no matter what goes in. A mono source is duplicated to both channels โ€” dual mono โ€” instead of being padded with silence on one side, so the mix sits centered and panning stays neutral. A stereo source keeps its two channels untouched. That is why a mono merge has the same size as a stereo merge of the same duration.

Why are my clips resampled before merging?

Concatenation requires one sample rate across the board. The merger picks the highest rate among the tracks and resamples the rest to it with the browser OfflineAudioContext, which low-pass filters while it changes the rate. Naive decimation without that filter would alias. A 44100 hertz clip next to a 48000 hertz clip therefore ends up at 48000 hertz, and the 44100 side is resampled upward rather than the other way around.

How big will the merged file be?

Linear in duration. WAV at 44100 hertz in stereo is 176400 bytes per second, so a 1:30 merge is 15876044 bytes, about 15.1 MiB. MP3 at 128 kbps is 16000 bytes per second, so the same 1:30 is 1440000 bytes, about 1.4 MiB. The split stays at 11 to 1 for any length, which is why long merges are where the format choice really shows.

Is my audio uploaded to a server?

No. The whole pipeline runs in the browser: decodeAudioData, the resampler, and the encoder are all Web Audio and Web APIs on the local machine. The files never leave it, which is what makes the tool usable for client sessions, rehearsals, and other recordings the owner would rather not send anywhere.

Related Articles