.MS file extension
To open .MS files on Windows, open the .ms file in a plain-text editor to view or edit the source (it is plain text).
To open a .ms file, treat it as a troff/groff ms document: open it in a text editor to read/edit, or render it with groff using the ms macro package to produce a viewable PDF or PostScript. On phones/tablets, you’ll usually only be able to view the plain text unless you render it on a desktop first.
Last updated: June 11, 2026
Open on your device
Choose your operating system for a dedicated step-by-step opening guide.
How to open .MS files
Use these platform-specific instructions to open .MS files safely.
Windows
- Open the .ms file in a plain-text editor to view or edit the source (it is plain text).
- To see the formatted document, render it with a groff-compatible toolchain (for example in a Linux environment or VM) and export to PDF/PostScript, then open the result in a PDF/PS viewer.
Mac
- Open the .ms file in a plain-text editor to view or edit the source.
- To preview the formatted output, use a groff/troff toolchain available on your system to render to PDF/PostScript, then open the rendered file.
Linux
- View/edit the .ms source in any text editor (it is plain text).
- Render it with groff using the ms macros (see groff_ms(7) and the groff manual) to generate output such as PostScript/PDF, then open the result in a viewer.
iOS
- Open the file in the Files app: if it doesn’t preview nicely, use a plain-text/code editor app to view the source, or render it to PDF on a desktop first and then view the PDF on iOS.
Android
- Open the file with a plain-text/code editor app to view the source, or render it to PDF on a desktop first and then view the PDF on Android.
Security notes
- .ms files are plain text, but roff/groff is a powerful document processor; avoid rendering untrusted .ms files in automated pipelines if you are concerned about parser/toolchain vulnerabilities.
- Be cautious when a .ms file comes with build scripts or commands (for example, instructions to run a shell pipeline). Prefer rendering with a known-good groff toolchain rather than executing unknown scripts.
- If you only need to inspect contents, open the file in a text editor first; this avoids invoking a formatter until you trust the source.
Can't open this file?
These are the most common causes and fixes when .MS files fail to open.
Common reasons
- The file opens as “garbled text” or looks unformatted
- Rendering fails or output looks wrong
- Wrong app is associated with .ms
Fix steps
- Open it in a plain-text editor and confirm it contains roff/ms macros (lines starting with '.' or ''' are common).
- Render it with a groff/troff toolchain using the ms macros to produce PDF/PostScript for normal reading.
OS-specific troubleshooting
What is a .MS file?
.ms is widely used for documents written for the troff/groff typesetting system using the “ms” macro package (often for reports, letters, and manuscripts). The file is plain text containing roff requests and ms macros, which are processed by groff/troff into formatted output (for example PostScript or PDF). On Linux systems, the extension is associated with the freedesktop MIME type text/x-troff-ms.
Background
The “ms” macro package is one of the classic macro packages shipped with troff and compatible implementations like GNU roff (groff). It provides higher-level document commands (macros) so authors can write structured manuscripts (titles, headings, paragraphs, footnotes) without manually handling all low-level typesetting details.
In practical use, .ms files are source documents: you typically edit them with a plain-text editor and then run a formatter (such as groff) to produce a final, shareable format like PDF or PostScript. Many Unix-like workflows also use roff for technical documentation and printing pipelines.
Because .ms files are plain text, they are easy to diff, version-control, and process with command-line tooling. However, the rendered output depends on the roff implementation and the exact macro set used, so “opening” often means either viewing the source text or running a renderer to preview/print the formatted document.
Common MIME types: application/x-troff-ms
Other meanings of .MS
The extension .MS is used by several programs. Besides the file type described on this page, it can also stand for:
- Maxwell Script
- 3ds Max Script
Further reading
Authoritative resources for more details on the .MS format.
Common .MS issues
The file opens as “garbled text” or looks unformatted
.ms is typically roff source; it is meant to be processed by troff/groff with the ms macro package, not displayed as a finished document by default.
- Open it in a plain-text editor and confirm it contains roff/ms macros (lines starting with '.' or ''' are common).
- Render it with a groff/troff toolchain using the ms macros to produce PDF/PostScript for normal reading.
Rendering fails or output looks wrong
Formatting depends on using the correct roff implementation and macro package; missing macros or mismatched tools can cause errors or odd layout.
- Ensure you are using groff with the ms macro package (consult groff_ms(7) for expected behavior and options).
- Check the document for macros or requests that require specific preprocessors or a particular roff environment, then re-render.
Wrong app is associated with .ms
On some systems, file associations can point .ms to an unrelated program, causing confusing errors when double-clicking.
- Open the file explicitly with a text editor to confirm it is a troff/ms source document.
- Change the file association to a text editor (for editing) or use a rendering workflow (groff to PDF/PS) for viewing.
FAQ
Is .ms a Microsoft file?
Not usually. In common Unix-like documentation workflows, .ms is a troff/groff ms macro document (plain-text manuscript source) processed by troff/groff.
What MIME type is associated with .ms?
In shared-mime-info (freedesktop.org), .ms is associated with text/x-troff-ms. The often-seen application/x-troff-ms is not an IANA-registered media type.
How do I convert .ms to PDF?
You generally render it with groff/troff using the ms macro package to produce PostScript or PDF, then share the rendered PDF.
Can I edit a .ms file in a normal editor?
Yes. .ms is plain text; any text editor can edit it. For a formatted preview, you need to render it with groff/troff.
Similar file extensions
Compare related formats in the same category to find the right tool faster.
