Skip to content

Instantly share code, notes, and snippets.

@Prajwal-Koirala
Created December 11, 2023 17:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Prajwal-Koirala/c5b16fdd9ba7aa6305eb17ec9732a498 to your computer and use it in GitHub Desktop.
Save Prajwal-Koirala/c5b16fdd9ba7aa6305eb17ec9732a498 to your computer and use it in GitHub Desktop.

File Extensions for Different File Types

File Type File Extension
Batch .bat
C .c
C# .cs
C++ .cpp, .h
CSS .css
Clojure .clj, .cljs
CoffeeScript .coffee
Diff .diff, .patch
Dockerfile .Dockerfile
F# .fs
Git Commit Message .gitcommit
Git Rebase Message .gitrebase-msg
Go .go
Groovy .groovy
HLSL .hlsl
HTML .html, .htm
Handlebars .hbs, .handlebars
Ignore .gitignore, .ignore
INI .ini
JSON .json
JSON with Comments .jsonc
Java .java
JavaScript .js
JavaScript react .jsx
Less .less
Log .log
Lua .lua
Makefile .mk, Makefile
Markdown .md
Objective-C .m
Objective-C++ .mm
PHP .php
Perl .pl, .pm
Perl 6 .p6, .pl6
Plain Text .txt
PowerShell .ps1
Properties .properties
Pug .pug, .jade
Python .py
R .R, .Rmd
Razor .cshtml
Ruby .rb
Rust .rs
SCSS .scss
SQL .sql
Search Result .txt
ShaderLab .cginc, .hlsl
Shell Script .sh, .bash, .zsh
Swift .swift
TypeScript .ts
TypeScript React .tsx
Visual Basic .vb
XML .xml
XSL .xsl, .xslt
YAML .yaml, .yml

Additional Notes:

  • Some file extensions are case-sensitive, while others are not. Be sure to follow the correct case for the file extension to ensure that your files work properly.
  • This is not an exhaustive list of all possible file extensions. There are many other file extensions in use, and new ones are constantly being created.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment