Browser-based audio tool · MP3, WAV, M4A, FLAC, Ogg → one WAV or MP3

Merge Audio Files

Join several audio files into one: put them in order, crossfade or leave a gap between tracks, match their loudness if they were recorded at different levels, and save a WAV or an MP3. Every file is decoded and mixed in this tab.

Tracks, in playing order

Up to 30 files, about 60 minutes of 48 kHz stereo in total once decoded.

Drop audio files here

.mp3, .wav, .m4a, .aac, .flac, .ogg, .opus

Joins, loudness and export

Between tracks

Add at least two files to merge.

File type

16-bit PCM at the working sample rate.

Merge Audio Files

Operator: Abdulla Al Fahad. How tools are built and checked

Joining audio files is about the joins. Butting two files together leaves a click if the waves do not meet at zero, a jolt if one is louder than the other, and an abrupt change of room tone. This tool lets you put the tracks in order, choose between a crossfade and a stretch of silence at every join, and level the tracks against each other before it mixes them into one WAV or MP3.

It handles up to 30 files at a time. The Audio Cutter trims one recording and Audio to MP3 converts files one at a time; this one combines many. The loudness matching is a quick levelling of the tracks before they are joined, not a LUFS measurement.

Key features

  • Up to 30 files with their length, channels, RMS level and a move up, move down and remove button each
  • Crossfade (0 to 10 s, equal power) or silence (0 to 30 s) at every join
  • Optional loudness matching of each track to the average level of all, shown per track as a gain in dB
  • Mono or stereo result chosen from the inputs, and one sample rate for all tracks
  • WAV or MP3 export with a bit-rate choice, progress, cancel, a player and a download link
  • The total length shown before mixing, with a note when a crossfade is shortened

Crossfades, gaps, loudness matching and the common sample rate

Inputs are any audio the browser can decode: MP3, WAV, M4A and AAC, FLAC, Ogg Vorbis and Opus, up to 1 GB per file. All files are decoded at a single sample rate, the first file's if MP3 supports it (8, 11.025, 12, 16, 22.05, 24, 32, 44.1 or 48 kHz) and otherwise 44.1 or 48 kHz (or the nearest supported rate for an unusual low one). The browser resamples the others to it. If any track is stereo the result is stereo and mono tracks are placed in both channels; if all are mono, the result is mono.

A crossfade can be from 0 to 10 seconds and is equal power: the outgoing track is multiplied by the cosine and the incoming by the sine of a quarter-wave across the overlap, so two unrelated signals keep a steady loudness. Each overlap is limited to half of the shorter of the two tracks. A gap can be from 0 to 30 seconds of silence. The total decoded size of all files together is capped at the equivalent of 60 minutes of 48 kHz stereo.

The result is a 16-bit PCM WAV, or an MP3 from the LAME encoder at 64, 96, 112, 128, 160, 192, 224, 256 or 320 kbps, with the ceiling lowered for low sample rates (160 kbps below 32 kHz, 64 kbps below 16 kHz). The file is named after the first track and the number of tracks, for example intro-merged-5-tracks.wav.

How it works

Each file is decoded as you add it, and the page measures its level. The level is the mean-square of all samples in 100 millisecond blocks, ignoring blocks quieter than -60 dBFS so that silence at the ends does not drag the figure down, expressed in dBFS. The target is the average of those levels across all tracks, and each track gets the gain that moves it there. The gain is capped so that the track's own peak stays at or below -1 dBFS and so that it never rises by more than 24 dB; a track limited this way is marked.

The timeline is calculated from the lengths: with crossfades, each track starts at the previous start plus the previous length minus the overlap; with gaps, plus the gap. Tracks are then mixed into one buffer, each scaled by its gain and by the fade curves over the overlaps. If the sum would pass full scale, the whole mix is scaled down by one factor so that its peak is 0.999; otherwise nothing is changed.

Equal-power fades give a steady loudness for different material, but identical or very similar material, such as two takes of the same bar, adds in phase and can be about 3 dB louder in the overlap. That is why the final peak check exists.

Common use cases

  • Assembling a podcast episode from an intro, several recorded segments and an outro, with each join crossfaded for a second
  • Joining voice memos recorded at different distances from the microphone into one practice recording
  • Building a continuous mix of tracks with a short gap or a long crossfade between songs
  • Putting the chapters of an audiobook, recorded in separate files, into one file per part

How to use this tool

  1. Drop audio files onto the box or choose them. Wait for each row to show its length.
  2. Put them in order with the arrows and remove any you do not want.
  3. Choose Crossfade or Gap and type the length in seconds.
  4. Tick Match loudness if the tracks were recorded at different levels.
  5. Choose WAV or MP3, then click Merge and export.
  6. Play the result, check the joins and download it.

Example

Three tracks with a 2 second crossfade and loudness matching on

1  intro.wav       45.0 s   RMS -14.2 dBFS
2  interview.m4a  600.0 s  RMS -22.8 dBFS
3  outro.mp3       30.0 s   RMS -16.0 dBFS

What the page works out

Target level   (-14.2 - 22.8 - 16.0) / 3 = -17.7 dBFS
Gains          -3.5 dB, +5.1 dB, -1.7 dB (the interview, unless limited by its peak)
Crossfades     2 x 2 s
Merged length  45 + 600 + 30 - 4 = 671 s

Tips for best results

  • Use a crossfade for continuous material such as music or room tone, and a gap for speech where each track starts with a new thought; a half second of silence reads as a pause, a crossfade can make two sentences run into each other.
  • If the tracks are speech recorded in different rooms, set the crossfade to 0.3 to 0.5 seconds. A long crossfade over a change of room tone makes the change more audible, not less.
  • Turn loudness matching off for a music album, where the relative levels of the tracks were chosen by the artist; use it for speech where the level depends on the microphone.

Common pitfalls

The level used for matching is gated RMS, not the integrated loudness of broadcast standards. A track with long passages of near-silence can come out a little differently from what a LUFS meter would suggest.

A track whose peak is already near -1 dBFS cannot be raised, so it limits how far the others can be matched. The row shows (limited) when that happens.

MP3 cannot hold a sample rate that is not on its list. If the first file is at 88.2 or 96 kHz the page picks 44.1 or 48 kHz so MP3 still works, and the WAV is written at that rate as well.

Everything is decoded into memory, at 4 bytes per sample. Thirty long stereo files can reach the memory limit; the row for the file that would pass it shows the reason.

Common errors and how to fix them

Adding this file would pass the memory limit.
Merge in two groups, and then merge the two results.
A file could not be decoded.
Convert it to MP3, WAV, M4A or FLAC first; the message under its name gives the codec it found.

Crossfade length and short tracks

A crossfade of 2 seconds between a 45 second intro and a 600 second interview is simple. Between two 3 second jingles it would eat two thirds of each, so the overlap is limited to half the shorter track: 1.5 seconds. The page shows when that happened, with the real overlap in the summary line, and the merged length is calculated from the real overlaps.

Frequently asked questions

Can I trim the start or end of a track here?

No. Each file is used whole. Trim first with the Audio Cutter and then add the result.

Why is the result mono when I added a mono file and a stereo file?

It is not: if any track is stereo the result is stereo and the mono track is placed in both channels. The result is mono only when every track is mono.