What Are CFG and CONFIG Files, and How Do You Open Them?

How to open, edit, and convert configuration files

What to Know

  • A CFG/CONFIG file is a configuration file.
  • If it can be opened, try a text editor like Notepad++.
  • Convert to other text formats with those same programs.

This article explains what a configuration file is and how to use the CFG or CONFIG file you have.

What Are CFG and CONFIG Files?

A file with the .CFG or .CONFIG file extension is a configuration file used by various programs to store settings that are specific to their respective software. Some configuration files are plain text files but others might be stored in a format specific to the program.

A MAME Configuration file is one example, where the file is used to store keyboard settings in an XML-based format. This file stores shortcut keys, keyboard mapping settings, and other preferences specific to the user of the MAME video game emulator.

Some programs might create a configuration file with the .CONFIG file extension, like the Web.config file used by Microsoft's Visual Studio software.

A Wesnoth Markup Language file uses this same file extension, but not as a configuration file. These CFG files are plain text files written in the WML programming language and provide game content for The Battle for Wesnoth.

CFG files in Windows 11 that open with Notepad

The file extension for a configuration file is sometimes appended to the end of a file with the exact same name. For example, if the file is holding settings for setup.exe, the CONFIG file might be called setup.exe.config.

How to Open & Edit a CFG/CONFIG File

Lots of programs use a configuration file format to store settings. This includes Microsoft 365/Microsoft Office, OpenOffice, Visual Studio, Google Earth, MAME, BlueStacks, Audacity, Celestia, Cal3D, and LightWave, among many others. Within those programs, there might be specific tools used to actually edit the configuration file, such as Celesia Config Manager.

The Battle for Wesnoth is a video game that uses CFG files that are stored in the WML programming language.

Some CFG files are Citrix Server Connection files that hold information for making a connection to a Citrix server, like a server port number, username, and password, IP address, etc.

Jewel Quest instead uses the CFGE file extension for the same purpose of storing preferences. It also might hold score information and other game-related data.

However, it's highly unlikely that any of those applications or games have an "open" or "import" option to actually view the configuration file. They're instead just referred to by the program so that it can read the file for instructions on how to behave.

One exception where the file can for sure be opened with the application that uses it, is the Web.config file used by Visual Studio. The Visual Web Developer program built-in to Visual Studio is used to open and edit this CONFIG file.

Most CFG and CONFIG files are in a plain text file format that lets you open them with any text editor. As you can see here, this one is 100 percent plain text:


07.07.04 00:00:00

The Notepad program in Windows works just fine for viewing, editing, and even creating text-based configuration files like this. If you want something more robust or need to open the file on a Mac or Linux computer, see our list of the best free text editors.

It's vital that you only edit a configuration file if you know exactly what you're doing. Odds are that you do, considering you're dealing with a file that most people don't think twice about, but even a small change can make a lasting effect that could be hard to track down should a problem arise.

How to Convert a CFG/CONFIG File

There probably isn't a huge reason to convert a configuration file to a new format since the program that uses the file needs it to remain in the same format and with the same name, else it won't know where to look for preferences and other settings. A CFG/CONFIG file conversion might, therefore, result in the program using default settings or not knowing how to work at all.

Gelatin is one tool that can convert text files like CFG and CONFIG files, to XML, JSON, or YAML. MapForce might work as well.

Any text editor can also be used to convert a CFG or CONFIG file if you're just wanting the file extension to change so that you can open it with a different program. For example, you could use a text editor to save a CFG file to TXT so that it opens with Notepad by default. However, doing this doesn't actually change the format/structure of the file; it will remain in the same format as the original CFG/CONFIG file.

Other Configuration File Extensions

Depending on the program or operating system that uses the configuration file, it might instead use the CNF or CF file extension.

Windows often utilizes INI files for storing preferences, while macOS uses PLIST files.

Some other extensions used for files that might store configuration information include CONF, JSON, and PROPERTIES.

CFG is also short for other terms that have nothing to do with a file format, like control flow graph and context-free grammar.

Still Can't Open It?

If your file isn't opening at this point, there's a good chance you're misreading the file extension. Some files use an extension that closely resembles ".CFG" but it's off by a letter or two, making them unusable in the CFG openers mentioned above.

CGF is one example. Reserved for Crytek Geometry Format files, they're really only usable in the context of CRYENGINE.

SFG is another file extension that looks a lot like CFG. The Synfig Studio animation software is responsible for working with those files.

Was this page helpful?