What Are CFG and CONFIG Files?

How to open, edit, and convert CFG and CONFIG files

Screenshot of several CFG files in Windows 10 that open with Notepad

 Screenshot

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 CFG 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. One example is the Web.config file used by Microsoft's Visual Studio software.

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

Note

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 Office, OpenOffice, Visual Studio, MAME, MacMAME, Bluestacks, Audacity, Celestia, Cal3D, and LightWave, among many others.

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.

Note

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 CFG file, used by the Audacity audio recording/editing program, is 100% plain text:

[Locale]
Language=en
[Version]
Major=2
Minor=1
Micro=3
[Directories]
TempDir=C:\\Users\\Jon\\AppData\\Local\\Audacity \\SessionData
[AudioIO]
RecordingDevice=Microphone (Blue Snowball)
Host=MME
PlaybackDevice=Speakers / Headphones (Realtek
EffectsPreviewLen=6
CutPreviewBeforeLen=2
CutPreviewAfterLen=1
SeekShortPeriod=1
SeekLongPeriod=15
Duplex=1
SWPlaythrough=0

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 article on the best free text editors.

Important

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 might 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.

More Information on Configuration Files

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

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