What Is an ASPX File?

How to open, edit, and convert ASPX files

What to Know

  • An ASPX file is an Active Server Page Extended file.
  • Open one with your web browser or a text editor like Notepad++.
  • Convert it to HTML, ASP, and other similar formats using Visual Studio.

This article explains what ASPX files are and how they're used, what to do if you download one by mistake, and how to convert one to a more usable format.

What Is An ASPX File?

A file with the ASPX file extension is an Active Server Page Extended file that's designed for Microsoft's ASP.NET framework. They're also called .NET web forms. Though they look fairly similar, ASPX files are not the same as the Web Handler files ASHX.

ASPX files are generated by a web server and contain scripts and source codes that help communicate to a browser how a web page should be opened and displayed.

Person looking at aspx files on a computer
Derek Abella / Lifewire

More often than not, you'll probably only see the extension .ASPX in a URL or when your web browser accidentally sends you an ASPX file instead of the one you thought you were downloading.

How to Open Downloaded ASPX Files

If you've downloaded an ASPX file and expected it to contain information (like a document or other saved data), it's likely that something is wrong with the website and instead of generating usable information, it provided this server-side file instead.

In that case, one trick is to simply rename the ASPX file to whatever you expect it to be. For example, if you expected a PDF version of a bill from your online bank account, but instead got an ASPX file, just rename the file as bill.pdf and then open the file. If you expected an image, try renaming the ASPX file image.jpg. You get the idea.

Screenshot showing how to change the file extension of an ASPX file to PDF
Renaming ASPX to PDF.

In order to rename the file, your computer has to be set up to show you the file extension. To do this, open the Run dialog box (WIN+R) and enter control folders. Use the View menu to locate the Hide extensions for known file types — uncheck it and apply the changes.

The issue here is that sometimes the server (the website you're getting the ASPX file from) doesn't properly name the generated file (the PDF, the image, the music file, etc.) and present it for downloading as it should. You're just manually taking that last step.

You can't always change a file extension to something else and expect it to work under the new format. This case with a PDF file and the ASPX file extension is a very special circumstance because it's basically just a naming error that you're fixing by changing it from .ASPX to .PDF.

Sometimes the cause of this problem is browser or plug-in related, so you might have luck loading the page that's generating the ASPX file from a different browser than the one you're using now. For example, if you're using Internet Explorer, try switching to Chrome or Firefox.

How to Open Other ASPX Files

Seeing a URL with ASPX at the end, like this one from Microsoft, means that the web page is being run in the ASP.NET framework:


There's no need to do anything to open this type of file because your browser does it for you, whether it's Chrome, Firefox, Internet Explorer, etc.

When the browser displays the page, it looks completely normal; this is what the source code behind the page looks like in that example:

Screenshot of the text behind an ASPX web page
ASPX Sample Text.

The actual code in the ASPX file is processed by the web server and can be coded in any program that codes in ASP.NET. Microsoft's Visual Studio is one free program you can use to open and edit ASPX files. Another tool, although not free, is the popular Adobe Dreamweaver.

Sometimes, an ASPX file can be viewed and its contents edited with a simple text file editor. To go that route, try one of our favorite text editors.

Many URLs end in default.aspx because that file serves as the default web page for Microsoft IIS servers (i.e., that's the page that opens when a user requests the site's root web page). It can, however, be changed to a different file by an admin.

Be careful to avoid confusing other similarly named file extensions for one that ends with .ASPX. For example, ASX files look like they might be related to ASPX files but they could actually be Alpha Five Library Temporary Index files that only work within the context of the Alpha Anywhere platform. The same is true for others like ASCX.

How to Convert an ASPX File

ASPX files have an explicit purpose. Unlike image files, like PNG, JPG, GIF, etc. where a file conversion retains compatibility with most image editors and viewers, ASPX files will stop doing what they're meant to do if you convert them to other file formats.

Converting ASPX to HTML, for example, will certainly make the HTML result look like the ASPX web page. However, since the elements of the ASPX files are processed on a server, you can't use them properly if they exist as HTML, PDF, JPG, or any other file you convert them to on your computer.

However, given that there are programs that use ASPX files, you can save the ASPX file as something else if you open it in an ASPX editor. Visual Studio, for example, can save open ASPX files as HTM, HTML, ASP, WSF, VBS, ASMX, MSGX, SVC, SRF, JS, and others.

  • How do you open .ASPX files on Android?

    While .ASPX files may stop working if you convert them into other formats, you can try turning them into PDFs to view them on Android. Open the file as normal, then go to File > Print and choose to print as a PDF. Or use a third-party file converter.

  • How do you open an .ASPX file on a Mac?

    Microsoft has a Mac version of its Visual Studio software, which you can use to open .ASPX files on that platform. You can download and install it from Microsoft's website.

  • How do you create an .ASPX file using inline code instead of code behind?

    Inline code is code that's written inside an ASP.NET web page, unlike code behind which is created in a separate class file. To use inline code, create a new web page to your website in Visual Studio and make sure the Place code in separate file option is unchecked.

Was this page helpful?