Tap a .md file in your Android file manager and you may get a shrug: "No app can perform this action", or a prompt offering a browser that downloads it again. Android does not ship with a Markdown viewer, and the system does not always recognise the extension. Here is how to get a Markdown file open and readable.
Why Android struggles with .md files
Android decides which app to offer by looking at a file's MIME type. Markdown has an official type, text/markdown, but many file managers, email apps and browsers report .md files as text/plain or the generic application/octet-stream. If no installed app registers for the type reported, the system has nothing to offer you.
The practical fix is to use an app that registers for several of those types and also checks the file extension, or to open the file from inside the app rather than from the file manager.
Option 1: Open it in Docento
The Docento app can open Markdown files as well as PDFs. From the home screen choose the file-reading option and pick your .md file, or tap the file in Files or Downloads and choose Docento from the "Open with" list. You can also share a .md file to Docento from another app.
Once open, Markdown is shown rendered, with headings, lists, links and tables formatted. Tap the pencil to edit the source, use the toolbar for bold, italics, headings, lists, quotes, code and links, and switch to Preview to check the result. When you are done, Save keeps the change in Docento's copy and Save a copy writes the file somewhere you choose, such as Downloads or Google Drive.
Option 2: Use your browser
If you do not want to install anything, the browser route works on Android too. Open Docento's Text & Markdown Editor in Chrome, tap Choose File and select the .md file. It is read on your device and is not uploaded. You get the same Edit and Preview tabs, and Download saves your changes back to your phone.
Option 3: A general text editor
Any plain-text or code editor from the Play Store will show the raw Markdown. This is fine for quick edits, but you will see the symbols rather than formatted text unless the app has a preview feature.
Editing tips on a small screen
- Use the toolbar rather than hunting for the asterisk and backtick keys on the phone keyboard.
- Preview often. A missing blank line before a list is much easier to spot rendered than in the raw text.
- Mind the line breaks. A single newline does not create a new line in Markdown; end the line with two spaces or leave a blank line.
- Keep a copy. If a file came from a messaging app, it may be stored in a cache that the system cleans up. Save a copy to a folder you control.
Getting files onto your phone
Markdown files arrive by email, chat, cloud storage or a USB transfer. When you open a file from a cloud provider, Android often hands the app a temporary copy. Edits then apply to that copy, so use Save a copy to put the result back where you want it.
Troubleshooting
The file opens as garbled characters. The file may use an encoding other than UTF-8. See text file encodings explained.
The file is very large. Text viewers load the whole file into memory. Docento caps text files at 5 MB; for larger files, use a desktop editor.
Links do not open. Only http and https links are opened from the rendered view; other schemes are ignored for safety.
Takeaway
Android can handle Markdown once an app knows how to ask for it. Open the file in Docento on your phone, or use the browser editor, then use Save a copy to keep the result where you want it.