Someone emailed me an HTML file: how do I open it from Apple Mail?
Quick answer
To open an .html attachment in Apple Mail, get it into a browser. On a Mac, Control-click it, choose Open With, then a browser. On an iPhone or iPad, touch and hold it, choose Save to Files, then pick it in an HTML viewer in Safari. Apple doesn't say what Mail or Quick Look shows for an .html file.
Free plan: no credit card, 1 published page.
On this page
A teacher emails a quiz as quiz.html. A client sends a page an AI built for them. You open the email in Mail on your iPhone, iPad, or Mac, and want the page they saw, with its buttons working. Apple's Mail guides don't say what Mail shows for an .html attachment, and a page's scripts need a browser to run. This guide covers how to get the file out of Mail on each device, how to open it so it works, and what to check before you do. If you're the one sending, How to send an HTML file by email covers your side.
The Apple help pages quoted here were read on November 6, 2026. We didn't test Apple's Mail app on any device. The device results below come from our earlier tests of the file itself, in an iPhone simulator, an iPad simulator, and on a Mac.
The quickest way on any device: save the attachment as in step 2, open Convika's free HTML viewer in Safari or another browser, tap or click Choose an .html file, and pick the file. Your browser reads the file, and it isn't uploaded. If someone sent you a file you weren't expecting, ask them first, and turn off Run scripts before you choose it.
What Apple Mail does with an .html attachment
Apple's Mail guides for iPhone, iPad, and Mac cover saving an attachment, opening it with another app, and, on a Mac, previewing it. They don't say what you see when you tap or click an .html attachment, which apps Mail offers for one, or whether its scripts run. They don't list any file types Mail blocks.
| What Apple's guides say | iPhone | iPad | Mac |
|---|---|---|---|
| Save the attachment | Touch and hold it, then Save to Files | Touch and hold it, then Save to Files | Click the Attach button in the message header, then the file's name or Save All. Or File > Save Attachments, or drag it to the desktop |
| Where it goes | Apple doesn't say | Apple's iPad guide says Downloads in Files holds files "that you downloaded from the internet or your mail app" | "Email attachments are saved in the Downloads folder", unless you pick another in Mail > Settings > General |
| Open it with another app | Touch and hold it, tap Share, then choose the app | Touch and hold it, tap Share, then choose the app | Control-click it, choose Open With, then choose an app |
| Preview it | Apple doesn't say | Apple doesn't say | Select it and press the Space bar, or force click it |
What an .html file shows | Apple doesn't say | Apple doesn't say | Apple doesn't say. It names images and one-page PDFs as attachments Mail shows in the message |
Which apps it lists for an .html file | Apple doesn't say | Apple doesn't say | Apple doesn't say |
| Whether the page's scripts run | Apple doesn't say | Apple doesn't say | Apple doesn't say |
The Mac steps come from Apple's Mail guide for macOS 27. Its version for macOS Tahoe 26 starts the Open With step with "Double-click the attachment" instead of a Control-click.
The Mac's preview is Quick Look. Apple's Mac guide calls it "a fast, full-size preview of nearly any kind of file without opening the file", and says nothing about HTML or scripts. On an iPhone or iPad, Apple's Files guide says: "If you haven't installed the app that created a file, a preview of the file opens in Quick Look." It describes that preview for "an image file or a PDF".
Open an HTML attachment from Apple Mail in 4 steps
These steps get the file out of Mail and open it in a browser, where its scripts run. Nothing is uploaded.
1. Check who sent it
Look at the sender before you open the attachment. Apple's advice on scams: "Don't follow links or open or save attachments in suspicious or unsolicited messages." It lists "The message is unsolicited and contains an attachment" among the signs of a phishing email. If you weren't expecting a file, ask the person by phone or in a new message, not by replying. Is it safe to open an HTML file? lists the red flags.
2. Save the attachment
- iPhone or iPad: in Mail, open the message, touch and hold the attachment, and choose Save to Files, as Apple's Mail guide gives it. On an iPad, Apple's guide says Downloads in the Files app shows files "that you downloaded from the internet or your mail app".
- Mac: in Mail, move the pointer over the message header, click the Attach button, click the file's name, choose a place, and click Save. You can also choose File > Save Attachments, or drag the attachment to the desktop. Apple says attachments go to your Downloads folder unless you choose another in Mail > Settings > General.
3. Open it in a browser
- Mac: in Mail, Control-click the attachment, choose Open With, and choose a browser, such as Safari or Chrome. Or Control-click the saved file in the Finder and do the same. To make a browser the app for every
.htmlfile, select the file, choose File > Get Info, pick the browser under Open with, and click Change All, as Apple's guide describes. In our macOS 26.5.2 test, Chrome ran the script inside a test file opened from disk, and inside a copy of it downloaded in Chrome. We didn't test a Finder double-click, Safari, or a file saved from Mail. How to open an HTML file on a Mac covers the rest. - iPhone or iPad: tapping the file in Files opens Quick Look. That preview ran no JavaScript in our iOS 26.3 iPhone simulator test, or in our iPadOS 26.5 iPad simulator test, so a quiz or a game won't respond there. In the iPad test, Open With in Files said "No Apps Available". Use step 4 instead.
4. Or open it in the HTML viewer
Open Convika's free HTML viewer in Safari or another browser and tap or click Choose an .html file. On an iPhone or iPad, pick the file from the folder you saved it in: in our iPad test, a Files sheet opened over Safari with the file under Recents. The page runs inside the viewer with its scripts, and the file isn't uploaded. The viewer opens .html and .htm files up to 2 MB. If someone sent you a file you weren't expecting, ask them first, and turn off Run scripts before you choose it.
Why the attachment won't open or shows code
- The preview looks finished, but nothing responds. Apple doesn't say whether Quick Look runs a page's scripts. In our tests it didn't: in Files in an iPhone simulator and an iPad simulator, and on a Mac, where we opened Quick Look with the
qlmanage -pcommand, not the Space bar in Mail. Save the file and open it in a browser. - No browser in the list. Apple doesn't say which apps Share or Open With offers for an
.htmlfile. In our iPad test, Open With in Files said "No Apps Available". Use the HTML viewer, as in step 4. - The attachment hasn't downloaded on a Mac. Apple says Mail "automatically downloads attachments you receive based on the download option you set in Account Information settings in Mail."
- It opened, but shows code or doesn't respond. The app that opened it isn't a browser, or runs no scripts. Open it in a browser, as in step 3. If pictures and styles are missing, the page needs files that were saved next to it, and only the
.htmlfile came with the email. Why does my HTML file open as code (or a blank page)? goes through each cause.
Ways to open it, compared
| Way to open it | Extra app needed | Scripts run | Who sees the page |
|---|---|---|---|
| Tap or click it in Mail | No | Apple doesn't say | Only you |
| Quick Look on a Mac (the Space bar) | No | Apple doesn't say. Quick Look opened with qlmanage -p ran none in our macOS 26.5.2 test | Only you |
| Open With a browser on a Mac | A browser | Yes, in our macOS 26.5.2 test: Chrome ran the script inside a test file opened from disk. We didn't test Safari, or a file opened from Mail | Only you, on that Mac |
| Files on an iPhone or iPad (Quick Look) | No | No, in our iOS 26.3 and iPadOS 26.5 simulator tests | Only you |
| Convika's HTML viewer, in any browser | No, it's a web page | Yes, unless you turn off Run scripts | Only you, on that device |
| A link from the sender | No | Yes, if the host runs them | Everyone with the link, on any phone or computer |
Is an HTML attachment in Apple Mail safe to open?
Apple's Mail guides don't list file types Mail blocks, and they don't warn about .html files. Is it safe to open an HTML file? covers the lists Gmail and Outlook publish, neither of which has .html, and the HTML attachments Microsoft's researchers documented that show a fake sign-in box and send the password to the attacker. On a Mac, Mail Privacy Protection hides your IP address from senders and downloads a message's "remote content" privately. Apple doesn't say it covers a page you open from an attachment.
So open one only if you expected it and know who sent it. To look at a file you weren't expecting without running it, open the HTML viewer and turn off Run scripts before you choose the file: the page then shows its HTML and CSS only. Don't type a password into a page that came as an attachment. Apple says never to enter a password or a security code "into a webpage that someone directs you to."
At school or work, report a file you didn't expect to your IT team instead of opening it.
Ask the sender for a link
A link skips every step above. The sender puts the page at a web address and pastes that address into the email. You tap it in Mail, and the page opens in your browser with its buttons working, if the host runs its scripts. Convika is one such host: the sender uploads the file, publishes it, and sends an address like yourpage.convika.page.
If you're the sender, How to send an HTML file by email covers attaching the file in Gmail, Outlook, and iPhone Mail, and the 4 steps to send it as a link instead. How to share an HTML file as a link compares other free hosts.
Frequently asked questions
How do I open an HTML attachment in Apple Mail?
Get it into a browser. On a Mac, Control-click the attachment, choose Open With, and choose a browser. On an iPhone or iPad, touch and hold it, choose Save to Files, then open Convika's free HTML viewer in Safari and choose the file: its scripts run there, and it isn't uploaded. If you weren't expecting the file, ask the sender first, and turn off Run scripts before you choose it.
How do I open an HTML attachment from Mail on my iPhone?
Touch and hold the attachment and choose Save to Files, as Apple's Mail guide describes. Tapping the saved file in Files opens Quick Look, which ran no JavaScript in our iOS 26.3 simulator test. In Safari, open Convika's HTML viewer and choose the file: its scripts run there. If you weren't expecting the file, turn off Run scripts first.
Can Apple Mail preview HTML files?
Apple doesn't say. On a Mac, Apple's Mail guide says to select an attachment and press the Space bar to preview it. Apple's Quick Look guide says the Space bar opens Quick Look, including for items in emails, and says nothing about HTML. On an iPhone or iPad, Apple doesn't describe a preview in Mail. Quick Look ran no scripts in our tests, so a quiz or a game won't work there. To see the page working, open the file in a browser.
Where does Apple Mail save attachments on a Mac?
In your Downloads folder, Apple's Mail guide says: "Email attachments are saved in the Downloads folder, available in the Dock." To use another folder, choose Mail > Settings, click General, and select a folder.
Why does my HTML attachment do nothing on my iPad?
If you tapped it in Files, you're seeing a Quick Look preview, not a browser. Apple doesn't say what a tap shows in Mail. In our iPadOS 26.5 simulator test, a tap on the file in Files opened Quick Look, which showed the page's text and CSS but ran none of its scripts, and Open With said "No Apps Available". Open the file in Safari through an HTML viewer, or ask the sender for a link.
Is it safe to open an HTML attachment in Apple Mail?
Yes, if you expected it and know who sent it. Apple's Mail guides don't list blocked file types, and an HTML file can show a fake sign-in box. Apple's advice is not to open or save attachments in suspicious or unsolicited messages. If you weren't expecting it, ask the sender in a new message. Then open it in the HTML viewer with Run scripts off before you open it in your browser. Don't type a password into it.
Sources
- Download email attachments in Mail on iPhone (Apple) (checked November 6, 2026)
- Find and view files and folders in Files on iPhone (Apple) (checked November 6, 2026)
- Download email attachments in Mail on iPad (Apple) (checked November 6, 2026)
- Find and view files and folders in Files on iPad (Apple) (checked November 6, 2026)
- Find your downloaded files on iPad (Apple) (checked November 6, 2026)
- View, save, or delete email attachments in Mail on Mac (Apple) (checked November 6, 2026)
- View and edit files with Quick Look on Mac (Apple) (checked November 6, 2026)
- Choose an app to open a file on Mac (Apple) (checked November 6, 2026)
- Protect email privacy in Mail on Mac (Apple) (checked November 6, 2026)
- Recognize and avoid social engineering schemes, including phishing messages (Apple) (published June 15, 2026; checked November 6, 2026)
Next step
How to password protect an HTML page without code, on your own domain
JavaScript passwords sit in the page code. Put an HTML page from ChatGPT or Claude behind a server-checked password on your own domain.
Related articles
- How to Send an HTML File by Email (Gmail, Outlook, or Link)Gmail and Outlook let you attach .html files, though work filters can block them and mail apps may show code. Or publish it and email a link instead.
- Is it safe to open an HTML file someone sent me? How to check firstAn HTML file is a web page: it can run scripts and show a fake sign-in box. Open one only if you expected it, and check it as text or with scripts off first.
- How do I open an HTML file on iPhone in Safari, and send one that opens?Open an .html file on iPhone in Safari: save it to Files, open a free HTML viewer, and choose it so its scripts run. The Files preview ran none in our test.
- How do I open an HTML file on iPad and make it run?Open an HTML file on iPad: save it to Files, open a free HTML viewer in Safari, and choose it. A tap in Files opened a preview that ran no scripts in our test.
- How do I open an HTML file on a Mac, and why does my AI-made page break?A Mac opens an .html file in your browser from a file:// address. Our October 2026 test shows what Chrome blocks there, and 3 fixes: one file, a server, a link.
- Why does my HTML file show code or a blank white page?An HTML file shows code in a text editor or under a .txt name, and goes blank when its script can't run. Each fix, and what file://error_page_loaded.html is.
AI Skill Pod
Share AI skills with your team, the easy way
Everyone uses your team's skills in their own ChatGPT, Claude or Gemini, on any plan. Send one invite link. Free to start.
Start free on AI Skill Pod