Have you ever encountered a .cfg file while wandering in different places on your Windows computer? A .cfg or .config file is a configuration file that stores settings for various applications, games, and software installed on your computer. While in most cases you don’t need any special software or tool to open CFG files, it can be easily opened in any text editor.
What Are CFG Files?
The .cfg or .config extension stands for configuration and various software stores their settings with this extension. Most CFG files are plain text files but in some cases, they can be in a specific format depending on their corresponding software code structure.
For example, the project IGI 2 contains a file by the name networkconfig.cfg, which contains settings related to network configuration.
While deleting or editing this particular file doesn’t affect the game performance but in some cases .cfg files store execution codes as well and deleting them can make those programs inoperable. In most cases, these instructions are commented on at the start of those files.
The one example of this case is file handling.cfg of GTA Vice City 2010 where it is mentioned: “Tweak at your own risk”. So before editing a .cfg file, you should know what you are doing or it may make the application crash when you open it next time.
How to Open CFG Files
While there are various programs and applications which use .cfg files for storing their data, Microsoft Office, Visual Studio, Project IGI, GTA Vice City, Bluestacks, and Celestia are some popular names using these types of files. As mentioned earlier, you don’t need any special application or tool to open CFG files, you can open or view them with Notepad (the default text editor of Windows OS).
Some .cgf files contain data in WML programming language like from the game The Battle for Wesnoth. While network configuration files like networkconfig.cfg of IGI 2 store information related to server connection, IP address, and passwords. Normally, users don’t need to access these files as these files are used by those programs internally for running smoothly.
To open CFG files, follow these simple mentioned below. We are taking the network configuration file of IGI 2 for the demonstration.
- Locate the file you need to open.
- Right-click on .CFG file and select “Open with” option.
- Choose Notepad from the list.
- Enable “Always use this app to open .cfg files” (optional).
- Click on OK to open the .CFG file.
How to Edit and Save CFG Files
While old school Notepad works fine if you want to just view the CFG files. But for editing the .CFG files correctly, we recommend using Notepad++ for more robust viewing and editing. It offers a variety of features like color and syntax highlighting that helps you editing the CFG files without syntax errors. You can also use Notepad++ to save the CFG file to any format you like.
However, there isn’t any important reason for you to change the configuration of these files as applications need these files in CFG format for normal operations. Otherwise, there isn’t any other way by which these programs/ applications can find those files. In that case, most probably programs will use their default setting and will create those files again.
About Notepad++, we can say that it is an advanced version of Notepad with features like tabbed editing, Autosave, simultaneous editing, and multiple language support. Using Notepad++ we can convert files from .cfg/.config to XML, JSON, HTML and more. While most CFG files can be edited using Notepad++ but few .cfg files like celestia.cfg need a special tool for editing. In the case of Celestia, it will need a Celesia Config Manager.
Follow the steps below to edit a CFG file using Notepad++
- Download and install the latest version of Notepad++ software on your computer.
- Locate the CFG file and create a copy of it for backup (Optional).
- Now right-click on the original CFG file.
- Choose the “Open With” option.
- Select Notepad++ from the list of installed software.
- Edit the CFG file as per your requirements.
- Click on the File menu in the upper left corner.
- Select the Save option to save the file with same .CFG extension.
- If you wish to change the extension, click on the “Save as” option, and choose the extension from the drop-down list.
Additional Information About Configuration Files
Changing the file extension will never alter the file contents. For example, if you change the .cfg extension to .txt format, you can still open it with any text editor or IDE’s. Though the file contents remain the same, the way the software process the file is different.
A software can store their application settings in any file format they like. Ultimately the corresponding software knows how they have stored the information and how to parse that file to retrieve the information.
Let’s have a look at a few other file extensions which can be used for storing configuration files.
- In most of the cases, configuration files use CNF or .cf extension.
- macOS use PLIST while Windows uses the INI extension.
- JSON, PROPERTIES, and CONF are some other extensions.
There are different types of extensions in which programs and applications save their data and the .CFG extension is one of the popular formats. Other extensions may need special tools to open them but to open CFG files you just need a simple text editor like Notepad, WordPad, or Notepad++.