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

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. It stores shortcut keys, keyboard mapping settings, and other preferences specific to the user of the MAME video game emulator. Since this format uses XML, the file is fully made up of text, so it can be viewed and edited easily.

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

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

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.

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, Cal3D, and LightWave, among many others. Within those programs, there might be specific tools used to actually edit the configuration file.

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

Some CFG files are 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 CFG file, used by Inkscape, is 100 percent plain text and incredibly easy to read/edit:

 width=800height=600canvwidth=1200canvheight=900shape=arrowmode=standardresizemode=autofillcolor=""title=Pythonturtlegraphicsdemo.

The Notepad program in Windows works just fine for viewing, editing, and even creating text-based configuration files like that one. If you want something more robust or need to open the file on a Mac or Linux computer, see our Best Free Text Editors list.

Conversely, opening some CFG/CONFIG files is pretty useless. As you can see in the example below, this CFG file is used by an antivirus program and clearly isn't meant to be read by a person.

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

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. A true format conversion is possible with a file conversion tool.

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 is off by a letter or two. This makes the file unusable in the CFG openers I 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.

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.

Was this page helpful?

Thanks for letting us know!

Get the Latest Tech News Delivered Every Day

Subscribe

Tell us why!

What Are CFG and CONFIG Files, and How Do You Open Them? (2024)
Top Articles
Latest Posts
Article information

Author: Prof. An Powlowski

Last Updated:

Views: 6782

Rating: 4.3 / 5 (64 voted)

Reviews: 95% of readers found this page helpful

Author information

Name: Prof. An Powlowski

Birthday: 1992-09-29

Address: Apt. 994 8891 Orval Hill, Brittnyburgh, AZ 41023-0398

Phone: +26417467956738

Job: District Marketing Strategist

Hobby: Embroidery, Bodybuilding, Motor sports, Amateur radio, Wood carving, Whittling, Air sports

Introduction: My name is Prof. An Powlowski, I am a charming, helpful, attractive, good, graceful, thoughtful, vast person who loves writing and wants to share my knowledge and understanding with you.