CocoaDev

Edit AllPages

Could everyone help me create a list of common file extensions used in programming? I’ll get things started off.

Thanks to everyone who is contributing to the list. However if you could keep in mind that I’m just looking for extensions commonly used in programming, so things like Power Point presentation’s are not necessary. [Others besides you may be interested.]

Also check out http://www.filext.com or http://www.liutilities.com/products/winbackup/filextlibrary/

Most of these extensions map to one or more UniformTypeIdentifiers, particularly in XCode.

Format: .extension - Description ( MIME/type, public.uti)


Source Code:

* - C++ Header File (In some cases) *.a - Assembly language source *.applescript - AppleScript source file (com.apple.applescript.text) *.asdictionary - AppleScript dictionary file *.asm - Assembler Source *.bas - Basic Source *.c - C Source (public.c-source) *.cc - C++ Source (public.c-plus-plus-source) *.cp - C++ Source (public.c-plus-plus-source) *.cpp - C++ Source (public.c-plus-plus-source) *.cxx - C++ Source (public.c-plus-plus-source) *.c++ - C++ Source (public.c-plus-plus-source) *.cs - C# Source *.d - D Source (DProgrammingLanguage) *.el - Emacs Lisp *.f - Fortran Source *.f77 - Fortran 77 Source *.f90 - Fortran 90 Source *.for - Fortran Source *.g - Antlr Compiler Creator Grammar *.h - Header (Usually C, C++, or Objective-C, public.c-header) *.hpp - C++ Header File (public.c-plus-plus-header) *.hh - C++ Header File (public.c-plus-plus-header) *.inc - Assembler include file *.j - Java source *.jav - Java source code (com.sun.java-source) *.java - Java source code (com.sun.java-source) *.js - JavaScript (not the same thing as Java, com.netscape.javascript-​source) *.jar - Java ARchive ( application/java-archive, com.sun.java-archive) *.jnlp - Java Web Start ( application/x-java, application/jnlp, com.sun.java-web-start) *.l - Lisp or Lex *.lm - Lex with Objective-C support *.lmm - Lex with Objective-C++ support *.lpp - Lex with C++ support *.m - Objective-C (public.objective-c-source) *.m - Matlab Source Code *.mcp - Metrowerks CodeWarrior project file *.ml - ML (e.g. OCaml) Source code *.mm - Objective-C++ Source (public.objective-c-plus-​plus-source) *.M - Objective-C++ Source (a single uppercase M, but don't use that for new code, since HFS+ is case-preserving, but case insensitive) *.p - Precompiled header file (also Pascal source) *.pas - Pascal Source *.pch - Pre Compiled Header (Usualy C, C++, or Objective-C) *.php - PHP code (possibly intermixed with HTML, text/x-php-script, text/php, application/php, public.php-script) *.phps - PHP source *.pl - Perl Script ( text/x-perl-script, public.perl-script) *.pl - Prolog *.pm - Perl Module ( text/x-perl-script, public.perl-script) *.ppob - PowerPlant Constructor resource file *.py - Python (programming language, text/x-python-script, public.python-script) *.pyc - Precompiled Python module *.r - Rez file. Code for old-style Mac resource fork, to be compiled with Rez. (com.apple.rez-source) *.rb - Ruby source ( text/ruby-script, public.ruby-script) *.rb - REALbasic project files (ew) *.rsrc - Resource file (generally only for Carbon, may be in resource or data fork) *.S - Assembler source file. Also commonly lowercase (.s) (public.assembly-source) *.scm - Scheme (programming language) *.scpt - AppleScript (com.apple.applescript.script) *.sh - shell script (public.shell-script) *.sml - Standard ML Source Code (programming language) *.strings - Localized application UI text *.tcl - Tcl script *.tex - TeX/LaTeX source *.y - Yacc (Yet Another Compiler Compiler) *.ym - Yacc with Objective-C support *.ymm - Yacc with Objective-C++ support *.ypp - Yacc with C++ support

Text Files

.csv - Comma Separated Values *.doc - Word Document ( application/msword, com.microsoft.word.doc) *.rtf - Rich Text Format ( text/rtf, public.rtf) *.rtfd - “Rich Text Format Directory”. RTF text with image or file attachments. A Mac/NeXT-specific format. (com.apple.rtfd) *.tex - See *Source Code *.txt - TeXT file ( text/plain, public.plain-text) *.text - Text file ( text/plain, public.plain-text) *.etx - Setext Structure Enhanced Text (e.g. Tidbits)

Graphic/Video Files

*.ai - Adobe Illustrator file (com.adobe.illustrator.ai-​image) *.avi - AVI Video file ( video/avi, video/msvideo, video/x-msvideo, public.avi) *.bmp - Windows Bit Map file (com.microsoft.bmp) *.eps - Encapsulated PostScript (com.adobe.encapsulated-​postscript) *.gif - Graphical Interchange File ( image/gif, com.compuserve.gif) *.ico - Windows Icon (com.microsoft.ico) *.icns - OS X Icon (com.apple.icns) *.jp2 - JPEG 2000 Graphic ( image/jp2, public.jpeg-2000) *.jpeg - JPEG/JFIF Graphic ( image/jpeg, public.jpeg) *.jpg - JPEG/JFIF Graphic ( image/jpeg, public.jpeg) *.mov - QuickTime ( video/quicktime, com.apple.quicktime-movie) *.mp4 - Motion Pictures Experts Group, version 4 ( video/mp4, video/mp4v, public.mpeg4) *.mpeg - Motion Pictures Experts Group ( video/mpg, video/mpeg, video/x-mpg, video/x-mpeg, public.mpeg) *.mpg - Motion Pictures Experts Group ( video/mpg, video/mpeg, video/x-mpg, video/x-mpeg, public.mpeg) *.ogg - OggContainer Multimedia File Format *.pdf - Portable Document Format ( application/pdf, com.adobe.pdf) *.pict - MacOS QuickDraw PICT ( image/pict, image/x-pict, image/x-macpict, com.apple.pict) *.png - Portable Network Graphic ( image/png, public.png) *.psd - Adobe Photoshop File ( image/x-photoshop, image/photoshop, image/psd, application/photoshop, com.adobe.photoshop-​image) *.ps - PostScript ( application/postscript, com.adobe.postscript) *.svg - Scalable Vector Graphics Format *.svgz - Scalable Vector Graphics Format (Compressed) *.tga - Targa Image ( image/targa, image/tga, application/tga, com.truevision.tga-image) *.tif - Tag(ged) Image File Format ( image/tiff, public.tiff) *.tiff - Tag(ged) Image File Format ( image/tiff, public.tiff) *.wmv - Windows Media Video ( video/x-ms-wmv, com.microsoft.windows-​media-wmv)

XML and Related

*.css - Cascading Style Sheet *.xml - eXtensible Markup Language ( text/xml, public.xml) *.htm - HyperText Markup Language ( text/html, public.html) *.html - HyperText Markup Language ( text/html, public.html) *.xhtml - eXtensible HyperText Markup Language *.plist - Property List *.xsl - eXtensible Stylesheet Language

File Packages (“Bundles”) ‘(These are extensions for directories rather than files.)’

.app - Application bundle (com.apple.application-​bundle) *.bundle - Generic bundle (com.apple.bundle) *.framework - Framework bundle (com.apple.framework) *.kext - Kernel EXTension *.mpkg - see *Archives, Disk Images, Compression .mdimporter - Spotlight Metadata Importer (com.apple.metadata-​importer) *.nib - NeXT Interface Builder *.pbproj - ProjectBuilder project (also openable by XCode; see also .xcode) *.pkg - see *Archives, Disk Images, Compression .plugin - Plugin bundle (com.apple.plugin) *.prefPane - System Preferences pane bundle *.rtfd - See *Text Files *.saver - Screensaver bundle *.slideSaver - Slideshow screensaver bundle (with embedded images) *.wdgt - Dashboard widget (com.apple.dashboard-​widget) *.webarchive - Safari web archive *.xcode - XCode project (version 2.0 and earlier) *.xcodeproj - XCode project (version 2.1 and later)

Archives, Disk Images, Compression

*.bin - MacBinary ( application/x-macbinary, application/macbinary, com.apple.macbinary-​archive) *.bz2 - BZip2’d (Compressed) *.cdr - DiskUtility CD/DVD master (disk image) *.cpio - cpio archive. Typically from ditto on OSX *.cpgz - gzipped cpio archive. Also from ditto. *.cpt - Bill Goodman’s Compact Pro (Compressed) *.dmg - Disk iMaGe *.gz - Gnu Zipped (compressed, application/x-gzip, application/gzip, org.gnu.gnu-zip-archive) *.hqx - BinHex (older textual form for Macintosh two-fork binaries, application/mac-binhex40, application/mac-binhex, application/binhex, com.apple.binhex-archive) *.iso - ISO CD-ROM disk image *.mpkg - metapackage installer bundle *.pkg - Package (Installer bundle) *.rar - RAR’d file (compressed) *.sea - Self Extracting Archive *.sit - StuffIt (compressed, application/x-stuffit, application/x-sit, application/stuffit, com.allume.stuffit-archive) *.sitx - StuffIt X (compressed, application/x-stuffit, application/x-sit, application/stuffit, com.allume.stuffit-archive) *.tar - Tape ARchive ( application/x-tar, application/tar, public.tar-archive) *.tbz - Tar BZip2’d (Tarred and Compressed) *.tgz - Tar Gnu Zipped (tarred and compressed, org.gnu.gnu-zip-tar-archive) *.war - Java Web ARchive *.Z - compressed with Unix Compress *.zip - Zip compressed (see PkWare and ZipFileFormat, application/zip, com.pkware.zip-archive)

Others

*.a - Static Library *.bak - Backup file. Usually located in the same directory, with the same base name as its original. *.class - Java byte code (com.sun.java-class) *.conf - Unix-style configuration file (many formats - see the individual tool docs) *.dat - DATa file *.data - Data file *.dylib - DYnamic LIBrary *.in - INput file *.lib - LIBrary (object code) *.log - log file *.o - object (public.object-code) *.obj - object, A (normally intermediate) file produced during program compilation. *.obj - The OBJ file format for describing 3D models. *.org - Original *.out - OUTput file (text or binary) *.xls - Excel (spreadsheet, application/vnd.ms-excel, com.microsoft.excel.xls)