What is MIME type "audio/x-mp3"?

A MIME type is a string that tells browsers and other tools how to handle a particular kind of file.

The MIME type audio/x-mp3 signals that a file contains compressed audio data using the MP3 format. It instructs software on how to treat the content as playable audio.



This MIME type is less standard than audio/mpeg but is still found in legacy systems and custom implementations. It ensures proper handling of audio content across various platforms. For more technical details, see the IANA Media Types resource.

Associated file extensions

Usage Examples

HTTP Header

When serving content with this MIME type, set the Content-Type header:


    Content-Type: audio/x-mp3    
  

HTML

In HTML, you can specify the MIME type in various elements:


    <a href="file.dat" type="audio/x-mp3">Download file</a>    
  

Server-side (Node.js)

Setting the Content-Type header in Node.js:


    const http = require('http');    
    
    http.createServer((req, res) => {    
      res.setHeader('Content-Type', 'audio/x-mp3');    
      res.end('Content here');    
    }).listen(3000);    
  

Associated file extensions

FAQs

What is the difference between audio/x-mp3 and audio/mpeg?

The MIME type audio/mpeg is the official IANA standard for MP3 files, while audio/x-mp3 is a non-standard or legacy identifier. While modern browsers often handle both, you should use audio/mpeg for maximum compatibility in web development.

Why does my server send the audio/x-mp3 MIME type?

This usually occurs because the web server is using an older configuration file or a default setting that predates the standardization of MP3 MIME types. To fix this, you can update your server config to map the MP3 extension to the standard type.

Will HTML5 <audio> tags work with audio/x-mp3?

Yes, most modern browsers (Chrome, Firefox, Safari) use "MIME sniffing" to detect the file content and will play the audio even if the header is audio/x-mp3. However, strictly compliant parsers might reject it, so serving the correct standard header is best practice.

How do I configure Apache to serve audio/x-mp3?

If a legacy application specifically requires this MIME type, you can add AddType audio/x-mp3 .mp3 to your .htaccess or server configuration file. Otherwise, it is recommended to use AddType audio/mpeg .mp3.

What does the 'x-' prefix mean in this MIME type?

The x- prefix stands for "experimental" or "extension," indicating that the type was not a registered standard at the time of its creation. Although audio/x-mp3 is widely recognized, it is technically a non-standard private subtype.

How do I fix Nginx serving MP3s as audio/x-mp3?

You need to edit your mime.types file (often located in /etc/nginx/). Locate the line defining .mp3 extensions and ensure it reads audio/mpeg mp3;. If you specifically need the legacy type, change it to audio/x-mp3 mp3; and reload Nginx.

General FAQ

What is a MIME type?

A MIME (Multipurpose Internet Mail Extensions) type is a standard that indicates the nature and format of a document, file, or assortment of bytes. MIME types are defined and standardized in IETF's RFC 6838.

MIME types are important because they help browsers and servers understand how to process a file. When a browser receives a file from a server, it uses the MIME type to determine how to display or handle the content, whether it's an image to display, a PDF to open in a viewer, or a video to play.

MIME types consist of a type and a subtype, separated by a slash (e.g., text/html, image/jpeg, application/pdf). Some MIME types also include optional parameters.

How do I find the MIME type for a file?

You can check the file extension or use a file identification tool such as file --mime-type on the command line. Many programming languages also provide libraries to detect MIME types.

Why are multiple MIME types listed for one extension?

Different applications and historical conventions may use alternative MIME identifiers for the same kind of file. Showing them all helps ensure compatibility across systems.