What is a .cfg file?
Configuration File · Code and data · Various · n/a
A .cfg file is a generic configuration file. Like .conf, it is a label many programs use for their settings, so the exact format depends on the software that created it, though most are readable text.
What is a .cfg file used for?
There is no single .cfg standard. Games, applications and tools each define their own layout, commonly key=value lines or sections in brackets, similar to INI. Most are plain text you can open and tweak.
Because a .cfg belongs to a specific program, editing one by hand only helps if you know that program's settings. A wrong value can stop the software loading, so keep a backup before changing it.
What opens a .cfg file?
The .cfg format opens in the following apps, grouped by operating system. If one app does not work, try another from the same list.
Windows
- Notepad++
- VS Code
- any text editor
macOS
- VS Code
- TextEdit
- any text editor
Linux
- nano
- VS Code
- any text editor
Open a .cfg file step by step
- Confirm the file really is a .cfg. Drop it into the WhatFileType identifier, which reads its signature in your browser without uploading anything.
- On Windows, open it with Notepad++ or VS Code.
- On Mac, use VS Code or TextEdit.
- On Linux, try nano or VS Code.
- Still stuck? Search for a dedicated CFG viewer rather than a generic one.
Why can't I open my .cfg file?
Almost always because no installed app understands CFG. Install one of the apps above, or convert the file to a format your existing software already reads. If double-clicking opens the wrong program instead of nothing at all, the file association is set to the wrong app rather than the file being broken.
The other possibility is that the file is not really a .cfg at all. Drop it into the file identifier to check it by its bytes instead of its name. Nothing is uploaded.
CFG has no fixed magic number, so there is no signature table on this page. Its bytes alone do not prove the format: identification relies on the extension, the structure of the content and the program that created it. The magic-numbers reference lists the formats that do carry one.
Frequently asked questions
What is a .cfg file?
A .cfg file is a generic configuration file. Like .conf, it is a label many programs use for their settings, so the exact format depends on the software that created it, though most are readable text.
How do I open a .cfg file?
Open it in a text editor like VS Code or Notepad++. Most .cfg files are readable text, even though the exact layout depends on the program.
Can I edit a .cfg file?
Often yes, but only if you know the program's settings. Back up the original first, since a bad value can stop the software from starting.
Why is my .cfg file unreadable?
Some programs store .cfg data in a binary form. If it looks like gibberish in a text editor, only the program that made it can read it.
Related formats
Sources
Details on this page were checked against authoritative references. How sources are ranked and what is deliberately left out is set out in the methodology.