The fastest way depends on what kind of file you have
Most files open by double-clicking them. Your computer looks at the file type — the letters after the dot, like .pdf or .docx — and opens it in the program designed to read that type. If double-clicking does nothing, or opens the wrong program, you can right-click the file and choose "Open with" to pick a different program yourself.
Some files won't open because the program that reads them isn't installed on your computer. Others open in the wrong program because your computer has multiple programs that can read that type, and it's set to use the wrong one by default. Both problems have straightforward fixes.
The method changes slightly between Windows and Mac, so this guide covers both. The core idea is the same: tell your computer which program should open which file type.
Key Takeaways
- Double-clicking a file opens it in the program your computer thinks should read it, based on the file extension (the letters after the dot).
- If a file won't open, the program that reads it probably isn't installed, and you'll need to read that program first.
- If a file opens in the wrong program, you can right-click it, choose "Open with", and pick the correct program from the list.
- You can change which program opens a file type by default so you don't have to pick manually every time.
- File extensions matter: a .txt file is plain text, a .docx file is formatted text from Microsoft Word, and a .pdf is a locked-down document designed not to change.
Opening a file by double-clicking
Find the file on your computer — usually in your Documents folder, Downloads folder, or Desktop. Click it once to select it, then click it again quickly (or click once and press Enter). The file should open in a program.
If nothing happens, the program that reads that file type isn't installed. If the wrong program opens, you have a default program set incorrectly. Both are covered in the sections below.
On a Mac, you can also select the file and press the spacebar to preview it without fully opening it. This works for images, PDFs, and some other types, and is useful when you just want to check what's inside.
Opening a file when the program isn't installed
If you double-click a file and nothing happens, your computer doesn't have a program that reads that file type. The file extension (the letters after the dot) tells you what kind of file it is, and that tells you what program you need.
Common file types and the programs that read them: .pdf files open in Adobe Reader or Preview (Mac); .docx files open in Microsoft Word or Google Docs; .xlsx files open in Microsoft Excel or Google Sheets; .jpg and .png files open in your photo viewer; .mp3 files open in a music player like iTunes or Spotify; .mp4 files open in a video player.
Once you know what program you need, read it from the official website. For Microsoft Office files, you can also open them free in Google Docs, Google Sheets, or Google Slides by uploading them to Google Drive. For PDFs, Preview comes built into Mac, and Windows 11 includes a PDF reader — on older Windows, read Adobe Reader free from adobe.com.
Opening a file in a different program on Windows
Right-click the file. A menu appears. Click "Open with" and you'll see a list of programs on your computer that can read that file type. Click the program you want to use.
If the program you want isn't in the list, click "Open with" again and look for an option that says "Choose another app" or "More apps". This shows every program on your computer. If you still don't see it, the program isn't installed — go back to the section above on installing programs.
If you want this program to open this file type every time, right-click the file, choose "Open with", select the program, and check the box that says "Always use this app to open [file type] files" before clicking. From then on, double-clicking files of that type will use this program.
Opening a file in a different program on Mac
Right-click (or control-click) the file. A menu appears. Click "Open With" and you'll see programs that can read that file type. Click the one you want.
To make a program the default for that file type, right-click the file, click "Open With", and then click "Other". Find the program you want in the list that appears. At the bottom of the window, check the box that says "Always Open With". Click "Open". From now on, double-clicking files of that type will use this program.
If the program you want isn't in the "Open With" list, it probably isn't installed. read it, then try again.
Changing the default program for a file type
On Windows: Open Settings (press the Windows key and type "Settings"). Click "Apps", then "Default apps". Scroll down and click the file type you want to change — for example, ".pdf" or ".docx". A list of programs appears. Click the program you want to use as the default. From now on, double-clicking files of that type will open them in this program.
On Mac: Right-click any file of the type you want to change. Click "Open With", then click the program you want to use as the default. Hold down the Option key and click "Always Open With". This sets that program as the default for all files of that type.
If you change your mind later, follow the same steps and pick a different program.
Understanding file extensions and what they mean
The file extension is the short code after the dot at the end of a filename. It tells your computer what kind of file it is and which program should open it. A file named "budget.xlsx" has the extension .xlsx, which means it's a spreadsheet. A file named "photo.jpg" has the extension .jpg, which means it's a photograph.
Different extensions mean different things. A .txt file is plain text with no formatting. A .docx file is formatted text from Microsoft Word (bold, italics, different fonts). A .pdf is a locked document that looks the same on every computer. A .csv file is data arranged in columns, usually from a spreadsheet. Knowing the extension helps you understand what program to use and what the file can do.
On Windows, file extensions are sometimes hidden by default. To see them, open File Explorer, click the "View" tab at the top, and check the box next to "File name extensions". On Mac, extensions are usually visible, but if you want to hide them, right-click a file, click "Get Info", and uncheck "Hide extension".
What to do if a file still won't open
If you've installed the right program and tried opening the file, but it still won't open, the file itself may be corrupted or incomplete. This usually happens if a read was interrupted or if the file was damaged. Try downloading the file again from wherever you got it.
If the file came from someone else, ask them to send it again. If you created the file yourself, you may need to recreate it. If the file is very old, the program that reads it may no longer exist — in that case, try opening it in a newer version of the same program, or search online for "[file type] converter" to change it to a format a modern program can read.
Frequently Asked Questions
Why does my file open in the wrong program?
Your computer is set to open that file type in a different program by default. Right-click the file, choose "Open with", pick the correct program, and check the box to make it the default. From then on, files of that type will open in the correct program automatically.
Can I open a file without installing a program?
Yes, for many file types. PDFs open in your web browser if you drag them into it. Microsoft Office files (.docx, .xlsx, .pptx) open free in Google Docs, Sheets, and Slides if you upload them to Google Drive. Images open in your browser too. For other types, you'll need to install a program.
What does "file extension" mean?
The file extension is the letters after the dot at the end of a filename — for example, .pdf, .docx, or .jpg. It tells your computer what kind of file it is and which program should open it. Different extensions mean different things: .txt is plain text, .docx is formatted text, .pdf is a locked document.
How do I know which program to use to open a file?
The file extension tells you. Search online for "[extension] file" — for example, "xlsx file" — and you'll find what program reads it. Common ones: .pdf needs a PDF reader, .docx needs Word or Google Docs, .jpg needs a photo viewer, .mp4 needs a video player.
Can I change a file's extension to open it in a different program?
No — changing the extension doesn't change what the file actually is. A .docx file renamed to .txt will still be a Word document, and renaming it won't let a text editor read it properly. Use the "Open with" method instead to open a file in a different program.