General
Common File Extensions Reference
Comprehensive reference of common file extensions organized by category - programming, web, data, documents, media, and archives.
Overview
File extensions identify file types and help operating systems determine how to handle them. This reference covers the most common extensions developers encounter, organized by category.
Programming Languages
| Extension | Language/Technology | Description |
|---|---|---|
.js | JavaScript | JavaScript source |
.mjs | JavaScript | ES module |
.cjs | JavaScript | CommonJS module |
.ts | TypeScript | TypeScript source |
.tsx | TypeScript/React | TypeScript with JSX |
.jsx | JavaScript/React | JavaScript with JSX |
.py | Python | Python source |
.rb | Ruby | Ruby source |
.rs | Rust | Rust source |
.go | Go | Go source |
.java | Java | Java source |
.kt | Kotlin | Kotlin source |
.swift | Swift | Swift source |
.c | C | C source |
.cpp / .cc | C++ | C++ source |
.h | C/C++ | Header file |
.cs | C# | C# source |
.php | PHP | PHP source |
.lua | Lua | Lua source |
.ex / .exs | Elixir | Elixir source / script |
.erl | Erlang | Erlang source |
.hs | Haskell | Haskell source |
.scala | Scala | Scala source |
.r | R | R source |
.sh | Shell | Bash/shell script |
.zsh | Zsh | Zsh script |
.ps1 | PowerShell | PowerShell script |
.sql | SQL | SQL query |
.wasm | WebAssembly | WebAssembly binary |
.wat | WebAssembly | WebAssembly text format |
Web & Markup
| Extension | Format | Description |
|---|---|---|
.html / .htm | HTML | Web page |
.css | CSS | Stylesheet |
.scss / .sass | Sass | CSS preprocessor |
.less | Less | CSS preprocessor |
.mdx | MDX | Markdown with JSX |
.md | Markdown | Markdown document |
.svg | SVG | Vector graphic |
.vue | Vue.js | Vue single-file component |
.svelte | Svelte | Svelte component |
.astro | Astro | Astro component |
.ejs | EJS | Embedded JavaScript template |
.hbs | Handlebars | Handlebars template |
.pug | Pug | Pug template (formerly Jade) |
.njk | Nunjucks | Nunjucks template |
.woff / .woff2 | Web font | Web Open Font Format |
.ttf | TrueType | TrueType font |
.otf | OpenType | OpenType font |
.eot | EOT | Embedded OpenType (legacy IE) |
Data & Configuration
| Extension | Format | Description |
|---|---|---|
.json | JSON | JavaScript Object Notation |
.jsonc | JSON with comments | JSON allowing comments |
.json5 | JSON5 | Extended JSON |
.yaml / .yml | YAML | YAML configuration |
.toml | TOML | TOML configuration |
.xml | XML | Extensible Markup Language |
.csv | CSV | Comma-separated values |
.tsv | TSV | Tab-separated values |
.env | dotenv | Environment variables |
.ini | INI | INI configuration |
.properties | Properties | Java properties |
.plist | Property List | Apple property list |
.proto | Protocol Buffers | Protobuf schema |
.graphql / .gql | GraphQL | GraphQL schema/query |
.prisma | Prisma | Prisma schema |
.tf | Terraform | Terraform configuration |
.hcl | HCL | HashiCorp Config Language |
Documents & Spreadsheets
| Extension | Format | Description |
|---|---|---|
.pdf | Portable Document Format | |
.doc / .docx | Word | Microsoft Word |
.xls / .xlsx | Excel | Microsoft Excel |
.ppt / .pptx | PowerPoint | Microsoft PowerPoint |
.odt | ODT | OpenDocument text |
.ods | ODS | OpenDocument spreadsheet |
.rtf | RTF | Rich Text Format |
.txt | Text | Plain text |
.tex | LaTeX | LaTeX document |
.epub | EPUB | E-book format |
Archives & Packages
| Extension | Format | Description |
|---|---|---|
.zip | ZIP | ZIP archive |
.tar | Tar | Tape archive |
.gz / .gzip | Gzip | GNU zip compression |
.tar.gz / .tgz | Tarball | Compressed tar archive |
.bz2 | Bzip2 | Bzip2 compression |
.xz | XZ | XZ compression |
.7z | 7-Zip | 7-Zip archive |
.rar | RAR | RAR archive |
.zst | Zstandard | Zstandard compression |
.deb | Debian | Debian package |
.rpm | RPM | Red Hat package |
.dmg | DMG | macOS disk image |
.appimage | AppImage | Linux portable app |
.snap | Snap | Snap package |
DevOps & Infrastructure
| Extension | Format | Description |
|---|---|---|
.dockerfile | Dockerfile | Docker build instructions |
.dockerignore | dockerignore | Docker ignore rules |
.gitignore | gitignore | Git ignore rules |
.gitattributes | gitattributes | Git file attributes |
.editorconfig | EditorConfig | Editor configuration |
.eslintrc | ESLint | ESLint configuration |
.prettierrc | Prettier | Prettier configuration |
.nvmrc | nvm | Node.js version |
.ruby-version | rbenv | Ruby version |
.python-version | pyenv | Python version |
.tool-versions | asdf | Multi-runtime versions |
.pem | PEM | Certificate / key |
.crt / .cer | Certificate | SSL/TLS certificate |
.key | Private key | SSL/TLS private key |
.pub | Public key | SSH public key |
.log | Log | Log file |
.lock | Lock file | Dependency lock (various) |
.map | Source map | JavaScript source map |