.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 · Reviewed by Julian Stricker

What “reviewed” means on this page
  • Format fit: whether the “what is this file?” description matches common real-world use of the extension, including category, typical MIME types, and aliases.
  • Opening paths: whether Windows / macOS / Linux steps read plausibly for current OS dialogs and default apps; we remove fantasy menus and unsafe shortcuts.
  • Security framing: whether risk notes match the extension class (for example executables vs plain data) and whether affiliate wording does not contradict the security section.
  • Sources and further reading: whether external links point to vendors, standards bodies, or other primary references where possible; we avoid inventing details we cannot ground.
  • Limits: this is clarity and safety-messaging QA, not a guarantee that every statement is exhaustive or that every binary you download is harmless.

Full methodology in the Imprint The Imprint also states where AI is used and what that does—and does not—replace.

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

  1. Open the .ms file in a plain-text editor to view or edit the source (it is plain text).
  2. 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.
Full Windows guide

Mac

  1. Open the .ms file in a plain-text editor to view or edit the source.
  2. To preview the formatted output, use a groff/troff toolchain available on your system to render to PDF/PostScript, then open the rendered file.
Full Mac guide

Linux

  1. View/edit the .ms source in any text editor (it is plain text).
  2. 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.
Full Linux guide

iOS

  1. 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.
Full iOS guide

Android

  1. 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.
Full Android guide

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.

If you did not expect this file

This extension is usually plain data, text, or structured content—not a program by itself. The practical risk is social engineering (a scam attachment or misleading filename). For trusted senders you rarely need heavy-handed antivirus wording; use these tools when you want an extra check on unexpected downloads.

We may earn a commission when you use affiliate links. This supports our free file extension guides.

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

  1. Open it in a plain-text editor and confirm it contains roff/ms macros (lines starting with '.' or ''' are common).
  2. Render it with a groff/troff toolchain using the ms macros to produce PDF/PostScript for normal reading.

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

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.

  1. Open it in a plain-text editor and confirm it contains roff/ms macros (lines starting with '.' or ''' are common).
  2. 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.

  1. Ensure you are using groff with the ms macro package (consult groff_ms(7) for expected behavior and options).
  2. 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.

  1. Open the file explicitly with a text editor to confirm it is a troff/ms source document.
  2. 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.