Home Beginner's Guide How to convert MP3 to WAV on Linux

How to convert MP3 to WAV on Linux

by Brandon Jones
Mp3 to WAV convert Linux

To appreciate the idea of converting an MP3 audio file format into a WAV audio file format, you first need to understand the making of these two distinguishable audio formats. The keyword that distinguishes an MP3 audio file from a WAV audio file is “compressed”. An MP3 audio file exists in a compressed state, while a WAV audio file exists in an uncompressed state.

Now that you know the difference between these two audio file formats, the next question is knowing why you need each of them. In terms of applicability, the WAV audio file format will help you edit a podcast, while the MP3 audio file format is a better candidate for distributing audio files. The iTunes application takes this distribution approach to relay music to its user base.

If you are after top uncompressed audio quality for media like DVD, radio, or TV, you should consider converting your audio to a .wav format. This audio file format is lossless and uncompressed. Also, if you are considering or already pursuing web animations, the .WAV files are the best option for processing loops.

Converting .mp3 formatted files to .wav file formats in a Linux environment

With Linux and its open-source nature on the table, countless tools will get this job done. So hopefully, we should be able to mention a few of them before the article ends. The first tool to consider should take care of this itch of .mp3 to .wav audio file conversion. Its name is mpg321.

Every Linux user knows the open-source flexibility of this operating system. The mpg321 mp3 player is a testament to this flexibility feature.

This media player lets you play and listen to audio formatted music from the comfort of your Linux terminal. Its usage is under the second version of the GNU General Public License. This audio player is rich in features like HTTP proxy support and IPv6 support. Also, the basic authentication mechanism is linked with its HTTP proxy support feature.

Using mpg321 for .MP3 file to .WAV file conversion

Before using this audio media player to convert .mp3 files to .wav files, we have to figure out how to install it on our Linux systems. For users with Debian and Ubuntu Linux distributions, the following command should get mpg321 installed on your system.

sudo apt update
sudo apt install mpg321

As for the RHEL/Fedora users, you can install this audio player and converter tool with the following command.

yum install mpg321

When the installation process completes successfully, you will want right away to convert your .mp3 files to .wav file format. With your Linux terminal still open, you should navigate to or close and open the Linux terminal in the directory or folder containing your targeted .mp3 format files you wish to convert to .wav format.

Suppose you have a .mp3 formatted file called “emotional.mp3” on your Linux Downloads directory. To convert this .mp3 formatted file into a .wav formatted file would imply we use a command similar to the following:

mpg321 -w emotional.wav emotional.mp3

The “-w” argument instructs the mpg321 tool to convert the “emotional.mp3” file to a .wav file format with the file name “emotional.wav”.

If the command executes successfully, you should get an output similar to the following screenshot.

using mpg321 to convert a .mp3 file to a .wav file format

using mpg321 to convert a .mp3 file to a .wav file format

Afterward, your newly created .wav file should be accessible and playable but not from the command line. The mpg321 tool is only effective with .mp3 formatted files. So if you want to play any .mp3 formatted audio file from the Linux command line, use the following mpg321 command.

mpg321 emotional.mp3

Just make sure you are in the same directory with the .mp3 audio file you wish to play.

An alternative way

Since a .wav audio file format is also an ideal candidate for a voice changer program, you will want to deal with other alternatives of creating it.

Using FFMpeg for .mp3 file to .wav file conversion

This framework tool is also ideal and dependable in converting a .mp3 file to a .wav file format. Most Linux distributions come pre-installed with this audio conversion tool. To check if you already have it, run the following command on your terminal.

ffmpeg -version

The above command should give you the current FFMpeg audio conversion tool on your Linux system.

how to check ffmpeg version

how to check the ffmpeg version

If you do not have FFMpeg installed on your Linux machine, you could do so with the following terminal command.

sudo apt install ffmpeg

The above command is for Debian-based users. For Arch users, the following command should suffice.

yaourt ffmpeg

RHEL/Fedora users can use the following command.

yum install ffmpeg

To further understand the usage of this .mp3 to .wav audio file conversion tool, key in the following command on your terminal.

ffmpeg -help

This help command reveals the powerhouse of this tool. From just your terminal, you will be able to use this tool to change an audio file’s sampling rate, audio channels, and even volume. Since we are here to learn how to convert an audio file from .mp3 format to .wav format, we should first meet this objective.

The first step is to trace the .mp3 audio file you wish to convert to .wav audio format. Open your terminal on the directory or folder containing this audio file. You could also navigate to the audio file’s location if that too is your preference. Once you have achieved this objective, run the following command on your terminal.

ffmpeg -i file.mp3 newfile.wav

From this command, you have specified the .mp3 audio file you wish to convert and the new name of the .wav audio file resulting from this conversion process.

As an example, I wanted to convert the .mp3 audio file “emotions.mp3” to a .wav audio file with the following command.

ffmpeg -i emotions.mp3 emotions.wav

A sample output of this process from my end looks like the following screenshot.

using ffmpeg to convert .mp3 audio file to .wav audio file

using ffmpeg to convert .mp3 audio file to .wav audio file

This audio tool is purely a converter, unlike the mpg321 tool that functions as both a .mp3 converter and an audio player.

The flexibility of FFMpeg is that you are not limited to specific audio formats. You can also convert audio files from/to other formats as long as they are supported by this tool. To check for the supported formats, run the following command on your terminal.

ffmpeg -formats

Another unique aspect of FFMpeg is the flexibility of its usage. You can easily convert a .mp3 audio file to several other audio file formats at the same time. Take a look at the following implementation of this feature.

ffmpeg -i file.mp3 file.ogg file.wav file.mp4

From the above case, you will have three different outputs from a single .mp3 audio file input.

Another desirable feature of the FFMpeg tool is that you get to convert your .mp3 file to a .wav file and specify the desired codec. Take a look at the following implementation of the same.

ffmpeg -i file.mp3 c:a libopus file.wav

The above illustration is just an example of implementation. You can find out more on the codecs you can use with this tool from the following terminal command.

ffmpeg -codecs

Alternatively, you can find out more about this tool from its amazing documentation.

You now know more than one way of converting your .mp3 audio files to .wav audio files and the advantages of each approach. I hope this tutorial was helpful.

You may also like


Preslav September 8, 2021 - 11:48 PM

It is really great. If you have the need to convert between audio formats on Windows and Mac, Avdshare Audio Converter can work.

Mikhail November 28, 2023 - 8:54 AM

~$ sudo apt install soundconverter
GUI comfortable


Leave a Comment



FOSS Linux is a leading resource for Linux enthusiasts and professionals alike. With a focus on providing the best Linux tutorials, open-source apps, news, and reviews written by team of expert authors. FOSS Linux is the go-to source for all things Linux.

Whether you’re a beginner or an experienced user, FOSS Linux has something for everyone.

Follow Us


©2016-2023 FOSS LINUX



“Linux” is the registered trademark by Linus Torvalds in the U.S. and other countries.