My file manager prompts to open it with HTML Viewer (system app) or various web browsers. But I'm on Android 12. Answer from Exciting-Outside-167 on reddit.com
🌐
Reddit
reddit.com › r/androidquestions › open a local html file on a phone?
r/AndroidQuestions on Reddit: Open a local HTML file on a phone?
September 9, 2024 -

I considered it a no-brainer. I was wrong.

I wanted to take along some files to read when I'm out of network reach or in flight mode. The files happen to be quite plain HTML files, no script, just a CSS file defining the simple layout, and that's it. So I copied the HTML and the CSS files onto my phone and tried to open them.

First attempt was from a file manager. It told me that it no idea what to do with an HTML file. I then tried to look for an "open file" entry in Chrome. Nope. Same in Firefox. Then I tried to force-open the files by using a file:///path/to/file style URL - and it actually submitted the whole string to Google as a search string, as if Chrome (and Firefox) had been lobotomized of the file: protocol.

Now I'm at a loss - is there no way to open a simple HTML file on an Android 13 phone?

🌐
TutorialsPoint
tutorialspoint.com › how-do-you-open-html-files-on-your-phone
How do you open HTML files on your phone?
Depending on your settings, the file will open either in a regular web browser or in an HTML viewer. A different option is to open the browser on your Android smartphone and enter "file:///path/to/your/file.html" in the address bar.
🌐
Mozilla Support
support.mozilla.org › en-US › questions › 1329243
Open local html file on android | Firefox for Android Support Forum | Mozilla Support
I use File Manger Plus (recommended). You can set it to open HTML/txt in Firefox as default app. This is the only way I've manged to make it work. ... Hi This option is currently unavailable in Firefox for Android.
🌐
ConTEXT Editor
contexteditor.org › home › news › how to open html file in mobile
How to open HTML file in mobile
September 3, 2023 - There are several apps available for mobile devices that can be used to open HTML files. These include HTML Viewer, WebMaster’s HTML Editor Lite, and DroidEdit. HTML Viewer is a free app available for both Android and iOS devices.
Top answer
1 of 3
10

You have 2 options:

  • You can use a local web server in your Android phone itself. There are many server apps out there in the Play Store, one such app is Simple HTTP Server.

  • You can put your documents into the folder Android/data/com.android.chrome/files/Download/ in the internal storage. It's absolute path is /storage/emulated/0/Android/data/com.android.chrome/files/Download/ or /sdcard/Android/data/com.android.chrome/files/Download/. This is the location where Chrome stores any downloaded files and therefore, this the only location where Chrome can access the files. But remember, uninstalling Chrome will delete this directory.

2 of 3
6

For Android 11 [One UI 3.1]

Browsing local files (in internal storage space) in Chrome using file:///sdcard/ or file://localhost/sdcard/, one can notice that only media files and subdirectories (if any) are listed in almost every folder except the "Download" folder (but not in its subfolders=subdirs).

This means that on Android 11, the folder from which Chrome can read local (m)HTML is /Download folder, not Android/data/com.android.chrome/files/Download in internal or external storage space like in Android 10.

NOTE: on my Samsung devices, downloads onto internal storage were saved into /Download folder in all versions of Android (9, 10, 11), but downloads on an external SD card changed their folder from /storage/emulated/exSD_CARD/Android/data/com.android.chrome/files/Download in Android 10 to /storage/emulated/exSD_CARD/Download in Android 11, where exSD_CARD is the device's label for external SD card (0123-4567 or 9C33-6BBD in my devices)

Thus, (m)HTML files saved into /Download folder with Chrome (with .mhtml extension from older times or with manually added extension by renaming saved mhtml files without extension - from certain time Chrome stopped to append .mhtml extension to saved mhtml files :) on my devices, I guess from upgrading to Android 10)

This did not work for the mhtml files which have been moved to other folders and then returned to /Download folder. (And because of collecting saved mhtml files in many different folders, I have many mhtml files which are necessary to copy/move back to /Download folder prior to opening but they still cannot be opened)

Notes about opening mhtml files

I need to use Total Commander's "Open with" functionality with file://url option checked, then choose Chrome in order to open (mhtml) file with Chrome (with file://url checked, the Chrome is in the list to choose from, with file://url option unchecked, it is not listed in the list) or to browse local files in internal storage directly in Chrome (file manager My Files provided with the device was unusable to choose mhtml files to be opened with Chrome)

(mhtml) files from /Download folder opened in this way are opened as offline versions of downloaded web pages - but only if the file was not moved and returned back to /Download folder, otherwise you get Access Denied message. Also, opening (mhtml) files in this way using Total Commander, but from other folders than /Download folder, leads to Access Denied message

Opening mhtml files from any folder using Total Commander, but with file://url option unchecked (in this case, the Chrome is not in 1st list, so you need to choose "Open with *" option with folder icon from the list and subsequently choose Chrome from next list) behaves differently. Opening in such a way leads not to successful opening or Access Denied message but to Save as Dialog Form in which one can choose also if the resaved mhtml file should be saved to internal storage or external SD card (if present). In this way, resaved mhtml files in /Download folder (on internal or external storage space) can be now opened using Total Commander "Open with" dialog with checked file://url option.


Still, there exists a way of opening the (m)HTML files with Chrome

  • without other browsers/viewer
  • without rooting the Android device

but maybe only until the next update :)

Find elsewhere
🌐
Google Support
support.google.com › youtube › thread › 327321775 › where-is-the-html-file-in-an-android-phone-located
Where is the html file in an android phone located - YouTube Community
Skip to main content · YouTube Help · Sign in · Google Help · Help Center · Fix a problem · Watch videos · Manage your account & settings · Supervised experiences on YouTube · YouTube Premium
🌐
Quora
quora.com › How-do-you-open-html-files-on-your-phone
How to open html files on your phone - Quora
Answer (1 of 12): HTML files require a program (as is the case of any file being opened), to be associated with it. The difference being, HTML can contain other types of references within them, which require rendering capabilities. For example an HTML file may contain JavaScript, which would req...
🌐
Gadgetroyale
gadgetroyale.com › home › how to open html file in mobile browser (a how-to guide)
How to open html file in mobile browser (A How-to Guide) - Gadgetroyale
November 30, 2023 - The fact is that you can’t open an HTML file on a mobile browser rather there are apps that help you to view HTML files on android or iPhone.
🌐
Droidrant
droidrant.com › home › can i open html file on android?
Can I Open Html File on Android? [Answered 2026]- Droidrant
June 2, 2022 - If you want to open HTML files on your Android device, you can use the native HTML Viewer app or use the free HTML Reader/Viewer application available on Google Play. In both cases, you will need to accept the application. Once installed, you can view the HTML file’s contents and source code.
🌐
Google Support
support.google.com › androidtv › thread › 178943565 › how-can-i-open-my-local-index-html-file-in-android-tv
How can i open my local Index.html file in android TV? - Android TV Community
Skip to main content · Android TV Help · Sign in · Google Help · Help Center · Community · Android TV · Privacy Policy · Terms of Service · Submit feedback · Send feedback on... This help content & information · General Help Center experience · Next · Help Center ·
🌐
Google Support
support.google.com › chrome › thread › 3131802 › how-open-html-files
How Open html files - Google Chrome Community
Skip to main content · Google Chrome Help · Sign in · Google Help · Help Center · Community · Google Chrome · Terms of Service · Submit feedback · Send feedback on
🌐
Mozilla Support
support.mozilla.org › en-US › questions › 1166206
How can I open a html file in android
JavaScript is disabled in your browser · Please enable JavaScript to proceed · A required part of this site couldn’t load. This may be due to a browser extension, network issues, or browser settings. Please check your connection, disable any ad blockers, or try using a different browser
🌐
YouTube
youtube.com › madhur sharma tech
How to open HTML file in mobile || HTML file kaise open kare || HTML - YouTube
How to open HTML file in mobile || HTML file kaise open kare || HTML#html In this video I will show you that how to open a HTML file in android. It may be ch...
Published   July 5, 2023
Views   53K
🌐
ExtensionFile
extensionfile.net › open › html
How to Open HTML File on Windows, Mac OS, Android
The code written in HTML file is directly analyzed by browsers and is a transparent process for the user. To open, edit, create or modify an HTML file, a common text editor is enough, however, we recommend using a highlighting text editor or WYSIWYG (What you see is what you get) so that the ...
🌐
GitHub
github.com › gelin › open-in-browser
GitHub - gelin/open-in-browser: Allows to open HTML file or image from a filemanager in a browser on Android · GitHub
You copy the HTML files and images to SD card · You insert SD card to you Android tablet or phone · You opens the index.html from you favorite file manager in your favorite browser · You start reading · PROFIT! Google Play ·
Starred by 4 users
Forked by 6 users
Languages   Java 95.3% | Shell 4.2% | Makefile 0.5%
🌐
Google Play
play.google.com › store › apps › details
HTML Reader/ Viewer - Apps on Google Play
- Enable/ disable JavaScript . - In-built file explorer and support for third party file managers to pick html files. - To edit files use any text editor in your phone and see results in HTML Reader.
Rating: 3.8 ​ - ​ 4.49K votes