.m
💻 CodeText-based

.m File — Objective-C / MATLAB Source

text/x-objectivec

File Inspector

Drop any file to identify its extension and type — runs entirely in your browser

M

Drop a .m file here or click to choose

Or drop any file to identify its extension

Expected MIME type:text/x-objectivec

Quick Facts

Extension.m
Full NameObjective-C / MATLAB Source
MIME Typetext/x-objectivec
CategoryCode
TypeText-based (human-readable)
Typical Size1 KB – 100 KB
First Appeared1984

What Is a .m File?

The .m extension is shared by two major programming languages: Objective-C and MATLAB. In the Apple development context, .m files contain Objective-C source code — a superset of C that adds Smalltalk-style messaging and object-oriented features. Objective-C was the primary language for macOS and iOS development from the 1980s through 2014 when Swift was introduced. Objective-C's message-passing syntax ([object method:parameter]), dynamic runtime, categories, protocols, and ARC (Automatic Reference Counting) memory management are distinctive features. Legacy iOS/macOS codebases and system frameworks still contain substantial Objective-C code. In the scientific computing context, .m files contain MATLAB scripts and functions — MATLAB (Matrix Laboratory) is a proprietary numerical computing platform widely used in engineering, signal processing, control systems, and academic research. MATLAB's matrix-oriented syntax, extensive toolboxes, and Simulink integration make it essential for engineering workflows. GNU Octave provides an open-source, largely compatible alternative. Context (project type, imports) determines which language an .m file contains.

How to Open .m Files

Xcode
MATLAB
VS Code
GNU Octave
vim
any text editor

Related File Extensions

More Code File Extensions

Other code formats you might encounter

Browse File Extensions by Category

Explore our reference of 259 file extensions with details, programs, and related formats.