Types of files that cannot be added to a list or library

Applies To
SharePoint Server 2019 SharePoint Server 2019 Central Administration SharePoint Server 2016 SharePoint Server 2016 Central Administration

Allow or prevent custom script

No restrictions to types of files added to SharePoint

Recent improvements in SharePoint in Microsoft 365 and  SharePoint Server 2019 have removed the limitations on types of files that can be added. There are currently no known types of files that cannot be added.

Note on custom script file extensions

The following types of files can be uploaded to SharePoint in a web browser or using the sync app, but they won't work unless the site allows you to run custom script. By default, custom script is blocked on user-created sites that have Microsoft 365 groups. If you're a global admin or SharePoint admin in your organization, see Allow or prevent custom script to learn how to change the custom script settings.

File extension File type
.aspx ASP.NET Active server page
.asmx ASP.NET web services source file
.ascx ASP.NET wep user control file
.master ASP.NET master web page
.xap Windows phone installation
.swf ShockWave Flash
.jar Java archive
.xsf Office InfoPath form definition file
.htc HTML Component file

If your admin allows custom script on a site, you need "Add and Customize Pages" permission (part of the Design and Full Control permission levels) to run the script in the file types listed above. 

For the list of file names restricted by the sync app, see Invalid file names and file types in OneDrive and SharePoint.)