Articles / Image and audio basics

Audio Formats Compared: WAV, MP3, OGG, and More for Game Development

A beginner-friendly guide to what makes each audio format different and how to choose one for sound effects, music, and more.

Why it helps to know audio formats

Game development involves a lot of audio: sound effects, background music, character voices, and more. Audio comes in many file formats, such as WAV and MP3, and the format affects sound quality, file size, how easy it is to loop, and which environments can play it.

Choosing an unsuitable format can make files needlessly large and slow to load, add a gap of silence at the seam of a looping track, or leave you with audio that some environments cannot play. Understanding the differences between formats can help you avoid these problems.

Three differences to know first

1. Uncompressed, lossless, and lossy compression

Audio is large when stored as-is, so most formats compress the data. There are three main approaches.

  • Uncompressed: The audio data is stored as it is. There is no loss in quality, but the file is very large.
  • Lossless compression: The original sound can be restored exactly. There is no loss in quality, and the file is smaller than uncompressed, though larger than lossy.
  • Lossy compression: Information that is hard for the human ear to notice is discarded to make the file smaller. The file gets smaller, but the sound quality is reduced.

2. Bitrate and sample rate

In lossy formats, the bitrate (the amount of data per second, measured in kbps) affects both sound quality and file size. A higher bitrate gives better sound quality, but the file is larger.

The sample rate (how many times per second the sound is recorded, measured in Hz) also affects how fine the sound is. Music CDs use 44.1 kHz, and 48 kHz is common for video and streaming.

3. How easy the audio is to loop

Background music often loops: when it reaches the end, it returns to the beginning and repeats. Because of how their compression works, some formats add a short stretch of silence at the start or end of a track. If that silence ends up at the loop seam, you hear a small break in the sound. This noise also depends not only on the format but also on whether the delay information is stored and whether the player reads it. (For details, see Why Looping BGM Clicks or Gaps and How to Fix It.)

Comparison of the main formats

FormatCompressionCharacteristics
WAVUncompressedThe standard format with no loss in quality. Files are large.
MP3LossyLight and widely supported. Silence can appear at loop seams.
OGG (Vorbis)LossyWidely used in game engines and web games. Well suited to looping.
AAC / M4ALossyConsidered more efficient than MP3. Widely used on smartphones and for streaming.
FLACLosslessKeeps the quality while being smaller than WAV. Suited to storing and exchanging source material.
OpusLossyA newer format that keeps quality well even at low bitrates. Used for calls and streaming.
AIFFUncompressedAn uncompressed format similar to WAV. Mainly used in audio production on Mac.

Characteristics of each format

WAV

WAV is uncompressed, so there is no loss in sound quality. It is light on processing at playback, which suits sound effects that need to play with precise timing. It is also a standard choice for source files when editing audio. On the other hand, the files are large. For example, stereo at 44.1 kHz and 16-bit takes up about 10 MB per minute.

MP3

MP3 uses lossy compression and makes small files easily. At 192 kbps, for example, it takes up about 1.4 MB per minute. It is supported in a wide range of environments, so it is a safe choice when in doubt. However, because of how its compression works, a short stretch of silence can appear at the start and end of a track, and in some playback environments the seam is noticeable when you loop background music.

OGG (Vorbis)

OGG here means Vorbis, a lossy compression format widely used in game engines and web games. Because the specification can express the length to the sample, loop seams are considered less noticeable, which makes it a good fit for background music. A lower quality setting gives a smaller file, but the sound quality is reduced.

AAC / M4A

AAC is a lossy format that is considered to give better sound quality than MP3 at a similar bitrate. M4A is one of the file formats that can hold AAC audio, and you often see it in smartphone recordings. Some game engines cannot import it, so when you receive it as source material, check which formats your engine supports.

FLAC

FLAC uses lossless compression, so it can make files smaller while keeping the sound quality. It suits storing source material and exchanging files between creators. However, some game engines cannot import it as is.

Opus

Opus is a relatively new lossy format that keeps quality well even at low bitrates. It is widely used for calls and streaming. If you use it in game development, check first that your environment supports it.

AIFF

AIFF is an uncompressed format similar to WAV, mainly used in audio production on Mac. There is no loss in sound quality, but the files are large. In game development, it is often converted to WAV before use.

Choosing a format for game development

UseRecommended formatWhy
Sound effects (short sounds)WAVNo loss in quality and light on processing at playback. Files are also small for short sounds.
Background music (looped)OGGSmall files, and loop seams are less noticeable.
Voices and longer audioOGG / MP3Lossy compression keeps files small.
Lighter audio for a web gameOGG / MP3Reduces the amount of data to load. Choose after checking which environments support it.
Source files before editing, and storing materialWAV / FLACNo loss in quality.

Keep your original working files (the original recordings) in a lossless format such as WAV, and convert them to the format you need when you distribute the game.

Some game engines also convert imported audio to another format or setting internally. Even then, the better the quality of your source audio, the better the final result.

What to watch for when converting

  • Lost sound quality does not come back: Converting an MP3 to WAV does not restore the quality that was already lost.
  • Lossy to lossy conversion tends to degrade quality further: Converting from one lossy format to another, such as MP3 to OGG, can reduce quality even more. When you convert, work from the original source whenever possible.
  • Raising the bitrate does not improve quality: Re-encoding audio that was saved at a low bitrate at a higher bitrate does not bring back the discarded information. It only makes the file larger.
  • Watch the loop seam: Depending on the environment, background music converted to MP3 may have silence at the loop seam. If you want to loop it, convert it to a format such as OGG and check. For details, see Why Looping BGM Clicks or Gaps and How to Fix It.
  • Long audio takes longer to convert: The longer the audio, the more time and memory the conversion needs.

Convert with our tool

Our Audio Format Converter lets you choose an audio file and convert it to WAV, MP3, or OGG. The source format is detected automatically, and everything is processed in your browser, so your audio is never sent to a server. You can choose the bitrate for MP3 and the quality for OGG. Note that the maximum length is 30 minutes, and for audio with three or more channels, only the first two channels (stereo) are converted.

Format support can differ depending on your browser and your game engine version. Be sure to also check the official documentation for the environment you use.

← Back to all articles