How to save a web page’s HTML to a file
Updated 2026-11-16T00:00:00.000Z
Quick answer
Press Ctrl+S (Command+S on a Mac) and choose Webpage, HTML Only to save just the HTML file, or Webpage, Complete to also save its images and styles in a folder.
Chrome, Edge and Brave
- Press Ctrl+S (Command+S on a Mac), or open the menu ⋮ › Cast, save, and share › Save page as. Older versions have it under More tools.
- Next to Save as type, pick:
- Webpage, HTML Only for one .html file.
- Webpage, Complete for the .html file plus a folder with images, styles and scripts.
- Webpage, Single File for everything packed in one .mhtml file.
- Click Save.
Firefox
Press Ctrl+S (Command+S on a Mac) and choose Web Page, HTML only or Web Page, complete.
Safari on a Mac
Choose File › Save As. Set Format to Page Source for the HTML only, or Web Archive to keep the whole page in one file that opens in Safari.
On a phone
Phone browsers can’t save HTML files easily. Open the page on viewhtmlonline instead, open the Code tab, and copy the code from there. See view source on iPhone.
Which HTML do you get?
Browsers save pages a little differently, and a saved file can include changes that scripts made. If you need exactly what the server sent, copy it from the page source (Ctrl+U) or from viewhtmlonline. Why the source looks different.
Questions people ask
Will the saved page look the same offline?
Not always. Pages that load content with scripts or from other servers may look broken or empty when opened from a file.
How do I save just the source as text?
Open the source with Ctrl+U, select everything with Ctrl+A, copy it and paste it into a text editor. Save it with the .html ending.