Hello, is it possible for me to create my own type of file format which only my program can view or is compatible with?

If yes then how would i make the file format and how would i make my program able to view it? Im guessing my program will have to be the one to create the file.