Skip to content

HTTP status codesUpdated 2 Nov 2026

415 Error Code: Unsupported Media Type, Step by Step

Quick answer A 415 means the server will not accept the type of file or data you sent. Upload a supported format, or if you build apps, set the right Content-Type header.

HTTP status415
Impact
Medium impact
Typical fix time
Minutes
Who fixes it
You or the developer

The 415 error code means Unsupported Media Type: you sent something to a server, such as a file or a block of data, and the server does not handle that format. The server is fine and your internet is fine. The format is the issue.

Ordinary users meet it when uploading a photo, document or video to a form that wants a different type. Developers meet it far more often, when an API call carries the wrong or missing Content-Type header. Both cases are easy to fix once you know which one you are in.

Common causes

  • 1File type not allowed by the form

    How to tellUpload works for a JPG but fails for another picture type

    What fixes itConvert the file to a type the page lists, then upload again

  • 2File renamed with a wrong extension

    How to tellA file named photo.jpg is actually another format

    What fixes itSave or export it properly in the right format

  • 3API call missing Content-Type

    How to tellThe request has a body but no type header

    What fixes itAdd the header that matches the body, such as application/json

  • 4Header does not match the body

    How to tellHeader says JSON while the body is form data

    What fixes itMake the header and the body agree

  • 5Server only accepts certain types on that route

    How to tellSame data works at another endpoint

    What fixes itRead the API documentation for accepted types

  • 6Compressed or encoded body not supported

    How to tellRequest is zipped and the server cannot read it

    What fixes itSend it uncompressed or use a supported encoding

How to fix it, step by step

  1. Check which formats the page accepts

    Look near the upload button for words like JPG, PNG or PDF only. Choose a file that matches. Many pages reject newer or rarer formats, even when your phone can open them.

  2. Convert the file instead of renaming it

    Changing .heic to .jpg in the name does not change the file inside. Open the picture and save or export it as a JPG or PNG. On a phone, share or screenshot settings often allow a most compatible format.

  3. Try a smaller or simpler file

    Open the file once on your own device to make sure it is not damaged. A broken file can be read as the wrong type. Try another file to see if the form works at all.

  4. Use a different browser or the app

    If the site has an app or you have a second browser, upload from there. This tells you whether the page script is the problem.

  5. Developers: set the Content-Type header

    For JSON, send Content-Type: application/json and a valid JSON body. For forms with files, let the tool create the multipart header itself, since it includes a needed boundary value.

  6. Developers: read the endpoint documentation

    Confirm which types the route takes, and also check the Accept header, which is about what you want back, not what you send. Mixing these two is a common slip.

  7. Contact the site if a normal upload fails

    If a supported format still fails, report the file type, size and page address to the site's support team.

What the 415 error code means for your file

Every request that carries data should say what kind of data it is. The server compares that label with the list it can read. If the label is missing, wrong or unknown, it replies with 415 instead of guessing. The sentence to remember: the server understood the request but refuses the format of the body.

A tester posts text to an API and gets 415 Unsupported Media Type. The body was JSON, but no Content-Type header was set, so the server did not know how to read it.

Fixing 415 on phones and computers

On iPhone, photos can be saved in a format that some websites do not accept. Using a most compatible setting in the camera options, or exporting a copy as JPG, solves it. On Android, share the picture through the gallery's save as option, or take a screenshot of it if quality does not matter. On Windows, open the file in Paint or Photos and save a copy as JPG or PNG. Documents can be saved again as PDF from most office programs.

Only convert files with tools already on your device or the site's own help. Avoid unknown online converters for private documents.

415 compared with other client errors

Request errors that sound alike
CodeWhat the server objects to
400The request is broken or malformed
413The body is too large
415The body format is not supported
406It cannot produce a reply in the type you requested
422Format is fine but the content fails the rules

Details in 400 Bad Request, 413 Content Too Large, 406 Not Acceptable and 422 Unprocessable Content.

How owners can make 415 friendlier

List accepted formats next to every upload field, and check the type on the page before sending. Return a message that names the formats allowed, not just the number. See all codes at HTTP status codes.

Where a form handles photos, say whether it needs the original or a reduced copy, and set a clear size limit so users do not run into 413 Content Too Large next.

Frequently asked questions

What does the 415 error code mean?

It means Unsupported Media Type. The server refuses the format of the file or data you sent.

How do I fix error code 415 when uploading a photo?

Save a copy in a common format such as JPG or PNG and upload that. Renaming the extension alone does not change the file.

How do I fix a 415 in an API?

Set the Content-Type header to match the body, for example application/json for JSON, and check the documentation for accepted types.

Is a 415 error a problem with my internet?

No, your connection is fine. The request arrived, and only its format was refused.

What is the difference between 415 and 400?

A 400 means the request itself is malformed. A 415 means the request is readable but the data type is not supported.