.CONFIG

CONFIG File

Configuration File
Ask a question
QUICK ANSWER

A .config file is a settings file that tells a program how to behave. The most common kind is a Microsoft .NET configuration file (App.config or Web.config), which is plain XML you open in any code editor such as VS Code or Notepad++. Always back up the file before editing - a typo can stop the application from starting.

Developer: N/A (generic extension; the dominant case is Microsoft .NET App.config / Web.config) Category: Developer Files MIME: text/xml
OPENS ON Windows macOS Linux
Related: .DO · .MD · .HEX · .XSD

On this page

19k+ extensions indexed
Last reviewed Jul 22, 2026

Not sure what your file is?

Drop any file into our identifier - we read just the first bytes to name the format.

Identify a file

What is the CONFIG file format?

.config files are commonly used within a system as configuration files. Using configuration files, various options, parameters and preferences within specific applications or the whole system are defined. In most .config files, all properties are stored as plain text - most often as XML, which is the format Microsoft .NET uses for App.config (desktop applications) and Web.config (ASP.NET web projects). Some programs instead use an INI-style key=value format or YAML.

Computer software and operating systems often rely on many settings and parameters necessary for controlling ongoing processes. .config files serve this purpose - among other things, they specify file directories, connection strings, and application behaviour switches. In some programs, more than one such file may be used, but this is usually seen in more complex applications.

  • Since these are text-based files, they can be edited with any plain-text editor, including Notepad on Windows. Before editing, you should familiarise yourself with the file's content, as incorrect changes can negatively affect the functioning of programs or the operating system.
  • .config files define how a program initialises or operates at runtime - most applications read them during startup. In .NET, a project's App.config is copied and renamed to <AssemblyName>.exe.config in the output folder.
  • The .NET runtime also reads a machine-wide machine.config and merges its settings with the application configuration; app-level settings take precedence over machine defaults. Related formats include .cfg files used by many non-.NET applications.

Security & safety

RISK: MEDIUM

A text .config is safe to open and read. The risk is in EDITING: because a .config often controls whether its program starts (and, for .NET, how it connects to databases), a bad value, typo or broken XML tag can stop the application working. Always copy the original to a backup before changing anything, edit with a plain- text/code editor (never a word processor), and change one thing at a time. Also note that .config files can hold sensitive data (database connection strings, passwords, API keys in Web.config) - treat them as confidential, and be wary of downloaded 'optimized' config files from untrusted sources.

Format details

in a nutshell
FULL NAMEConfiguration File
DEVELOPERN/A (generic extension; the dominant case is Microsoft .NET App.config / Web.config)since No single origin; .NET App.config/Web.config since .NET Framework 1.0 (2002)
MIME TYPEtext/xml
TYPEUsually a plain-text settings file - most often XML (.NET App.config/Web.config), sometimes key=value/INI or YAML; occasionally app-specific

Programs that open CONFIG files

Windows4 apps
Microsoft Visual Studio Freemium Open the project's App.config/Web.config with full schema awareness - the native editor for .NET configuration files.
Windows Notepad Built-in Right-click → Open with → Notepad for quick edits of small text configs; lacks XML help, so take care with structure.
Notepad Open-source Right-click → Edit with Notepad++; shows XML structure and line numbers for safe editing of text configs.
Visual Studio Code Free Open the .config to read/edit with XML/INI highlighting and validation. Best free choice, especially for .NET App.config/Web.config.
macOS2 apps
TextEdit Built-in Open the .config, then Format → Make Plain Text before saving so it stays a plain-text config (don't save as RTF).
Visual Studio Code Free Open to edit the config with highlighting/validation; safest cross-platform choice.
Linux3 apps
Visual Studio Code Free Open for editing with XML/INI/YAML highlighting.
GNOME Text Editor / gedit Open-source Open the .config to read/edit; the default GNOME editor handles config files fine.
nano / vim Open-source Edit in the terminal: 'nano file.config' - standard for server/framework config files. Back up first.

Technical details

deep spec
Primary formatXML - a `<configuration>` root element wrapping `<appSettings>`, `<connectionStrings>`, and `<system.*>` sections in the standard .NET layout
File encodingUTF-8 (standard for .NET XML config files; encoding declared in the XML prolog)
MIME type`text/xml`
File signatureNone universal; the .NET XML variant starts with `<?xml ...?>` at offset 0; INI-style key=value variants have no magic bytes
Root element (.NET)`<configuration>` - required outermost element; children such as `<appSettings>` and `<connectionStrings>` follow a schema enforced by the runtime
Runtime read mechanismRead at application startup by the .NET `ConfigurationManager` (or `IConfiguration` in .NET Core / .NET 5+); changes require an app restart unless a configuration reload is explicitly configured
Machine-level defaults`machine.config` in the .NET Framework installation folder provides system-wide defaults; application `.config` settings always override machine defaults
Build-time transformationXML Document Transform (`.xdt`) files such as `App.Debug.config` and `App.Release.config` are merged by MSBuild to produce environment-specific output files
Deployed file nameFor .NET desktop apps the output is renamed to `<AssemblyName>.exe.config`; for ASP.NET the file stays as `Web.config` in the web root
Connection strings section`<connectionStrings>` child element stores named database connection strings; the `providerName` attribute specifies the ADO.NET provider (e.g. `System.Data.SqlClient`)
Alternate text formatsSome applications use `.config` for INI-style `key=value` text, YAML, or TOML instead of XML - the internal format is entirely application-defined
Security handlingIIS blocks direct HTTP access to `.config` files by default; sensitive values such as passwords can be encrypted in place using `aspnet_regiis -pe` on Windows
Line endingsTypically CRLF on Windows, LF on Linux/macOS; the XML parser normalises both
Related extensions`.cfg`, `.ini`, `.conf`, `.xml`, `.json`, `.yaml`
ReleasedNo single origin; .NET App.config/Web.config since .NET Framework 1.0 (2002)
Specificationlearn.microsoft.com

CONFIG conversions

Community Q&A

asked by users
Ask a quick question
Get help from people who work with CONFIG files. Be specific - include your system and software version.
No account needed · answers usually within a day

No questions yet - be the first to ask about CONFIG files.

Frequently asked questions

How do I open a .config file?
Most are plain text - open them with VS Code, Notepad++ or Notepad on Windows, TextEdit (plain-text mode) on Mac, or gedit/nano on Linux. .NET App.config/Web.config files are XML and edit nicely in VS Code or Visual Studio. If the contents look like gibberish, it's a binary config only its program can read.
What is a Web.config or App.config file?
They're the standard .NET configuration files: Web.config for ASP.NET web apps, App.config for desktop apps. They're XML holding settings like connection strings and app keys, read by the application at startup.
Can I edit a .config file safely?
Yes, but back it up first. Use a plain-text/code editor (XML-aware for .NET configs), change one setting at a time, and keep the original so you can restore it if the program stops working. Never use a word processor.
Why does my .config file look like random characters?
Either it's a binary/proprietary config that only its program can read, or you opened an XML config in a tool that doesn't display it well. Try VS Code; if it's still gibberish, change those settings through the program itself.
What's the difference between .config, .cfg, .ini and .conf?
Practically none in purpose - all are common names for configuration files. .config is most associated with .NET XML configs; .cfg/.ini/.conf are usually key=value/INI text. The extension is just the developer's choice.
I edited a .config and now the program won't start - what do I do?
Restore the backup you made, or delete the .config so the program regenerates a default one (you'll lose custom settings). This is exactly why copying the file before editing matters; broken XML is a common cause for .NET apps.

References

1Microsoft Learn - Configuring apps (App.config/Web.config)learn.microsoft.com
2Microsoft Learn - INI file format (key=value/[section])learn.microsoft.com

Keep exploring

across the database

Top extensions this week

1.AQQAQQ Instant Messenger File
2.CRDOWNLOADChrome Partial Download File
3.MDMarkdown Document
4.BINCD/DVD Disc Image (BIN/CUE)
5.NOMEDIAAndroid No-Media Marker File
6.PARTPartial Download File
7.RPMSGRestricted Permission Message
8.EXEWindows Executable (Portable Executable)
9.AVIFAV1 Image File Format (AVIF)
10.DBSQLite Database File

Related extensions

.DOStata Do-File
.MDMarkdown Document
.HEXIntel HEX File
.XSDXML Schema Definition
.MAPSource Map (JavaScript / CSS)
.NUPKGNuGet Package

Free file tools

An in-browser file identifier and image converter - everything runs on your device.

Open the toolbox

Browse file extensions A-Z