Tools › Guides › Does trimming an MP3 lose quality?

Does trimming an MP3 lose quality?

Only if the tool decodes it. Cutting an MP3 can be done by copying bytes, and then nothing is lost at all. Here is how to tell which kind you are using.

The short answer

No, if the tool cuts the file rather than rebuilding it. Yes, and audibly, if it decodes the audio and encodes it again.

Both kinds of tool have the same buttons and produce a file with the same name. The difference does not show up until you listen to the result next to the original, by which time you have usually thrown the original away.

Why a cut can be free

An MP3 is not one long stream that has to be unpicked from the beginning. It is a run of short, self-contained blocks called frames, each carrying about 26 milliseconds of sound and its own small header saying how long it is and how it was encoded.

That structure is what makes a lossless trim possible. To keep the middle thirty seconds of a track, a tool can find the frame containing your start point, find the frame containing your end point, and copy every byte in between into a new file. No decoder runs. No encoder runs. The audio in the result is, byte for byte, the audio that was in the original.

Re-encoding is the other path: decode every frame back to raw samples, cut the samples, then compress them again. That second compression is where the quality goes. MP3 is lossy, and lossy formats do not survive being flattened twice: the encoder throws away detail based on what it thinks you cannot hear, and on the second pass it is making that judgement about audio that has already had detail removed. The artefacts compound.

What it costs instead

Precision. Because the cut has to land on a frame boundary, it cannot land exactly where you dragged the handle.

Sample rateFrame lengthHow far off a cut can be
44.1 kHz1152 samples26.122 ms
48 kHz1152 samples24 ms
32 kHz1152 samples36 ms

Twenty-six milliseconds is about a fortieth of a second. For a ringtone, a podcast excerpt or a sample, it is irrelevant. For syncing to picture frame by frame it is not, and that is the case where decoding to WAV is the right answer rather than a compromise.

A tool that is being straight with you will tell you where it actually cut rather than echo back the number you typed. Ours says something like cut at 0:02.978 and 0:07.001: the nearest frame boundaries.

Three things that force a re-encode

  1. A fade. A fade changes the sample values themselves, and you cannot

change sample values inside a compressed frame without decoding it. Any fade above zero, in or out, turns the lossless path off. It is a trade worth making on purpose and never by accident, which is why our tool greys out the MP3 option in front of you the moment you move that slider.

  1. Saving a non-MP3 as an MP3. If the source was AAC or FLAC, there are no

MP3 frames to copy. Something has to encode.

  1. Changing the bitrate, sample rate or channel count. All three are

properties of the frames. Changing any of them means making new ones.

What comes out instead, if you are not getting MP3

WAV, usually, and that is not a downgrade in quality: it is uncompressed, so nothing is thrown away at all. It is a downgrade in file size: three minutes of CD-quality stereo is about 30 MB, against roughly 3 MB as an MP3.

If you are handing the clip to an editor, WAV is what you want anyway. If you are sending it to someone's phone, the size matters.

A detail almost every trimmer gets wrong

Variable-bitrate MP3s carry a small header at the front: a Xing or Info frame, holding the file's real length and a seek table. It is not audio; it is metadata.

Copy it into a trimmed file and it now describes a file that no longer exists: the wrong duration, and a seek table pointing at the wrong bytes. Players believe it, so the track shows a length it does not have and the scrub bar lands somewhere else.

Drop it and say nothing, and a variable-bitrate file ends up with no length at all. A player then has to guess from the average bitrate, and guesses badly, we measured a four-second clip being reported as 7.4 seconds.

The correct move is to write a fresh one describing the file you just made. It is the kind of thing nobody notices when it is right.

What about the very start?

One genuine artefact survives even a byte-perfect trim. MP3 frames may borrow a little data from the frames before them: a shared pool called the bit reservoir, so the first frame or two after a cut can be missing something it expected to find. The result is a very short click or a slightly soft transient at the very beginning.

Every frame-level trimmer has this, including the ones that do not mention it. If it bothers you on a particular file, cutting a fraction of a second earlier usually moves it into silence.