app.config to appsettings.json
Convert app.config, web.config and the files split out of them (connections.config, appSettings.config) into appsettings.json for modern .NET: appSettings, connection strings, IIS CORS, mail settings and custom sections. Anything without a direct equivalent is listed with a hint.
How it converts
Every <add key value> in appSettings becomes a property (colons create nested objects, as IConfiguration reads them). Connection strings go in ConnectionStrings, without providerName. IIS CORS becomes Cors (Enabled, FailUnlistedOrigins, Origins with credentials, headers and methods). smtp and network become a single Smtp object. Custom sections become objects.
What it does not do
ASP.NET Core does not read Cors and Smtp on its own: a few lines in Program.cs (WithOrigins, SmtpClient or MailKit) read these values; with FailUnlistedOrigins a request from an unlisted origin simply gets no headers. It does not know the section handler types: it converts the shape, not the meaning. WCF, system.web and binding redirects are listed but must be rewritten.
Where your data goes
The conversion runs in your browser: the file is not sent to any server. The share link only holds the options, never the file.
How to use it
- Paste app.config or web.config, or a file with a single fragment (connections.config, appSettings.config, cors, mailSettings), or drop it.
- Choose how to nest keys (colon, dot or none) and whether appSettings goes at the top or in an AppSettings section.
- Read the warnings and the "To migrate by hand" list: those are the parts the converter cannot translate.
- Copy or download appsettings.json. Remove the passwords before committing it, or turn on "Mask passwords and keys".
Frequently asked questions
What does it convert?
appSettings, connectionStrings, IIS CORS (system.webServer/cors), mail (system.net/mailSettings/smtp), the applicationSettings and userSettings that Visual Studio generates and the custom sections declared in configSections. Files holding a single fragment, like connections.config, work too.
What happens to system.web, WCF and binding redirects?
They have no direct equivalent in modern .NET: they stay out of the JSON but appear in the "To migrate by hand" list, with a hint for each.
How do I read the connection strings?
With Configuration.GetConnectionString("Name"), which reads the ConnectionStrings section. providerName is not needed: the provider is chosen in code (UseSqlServer, UseNpgsql…).
Is the file sent to a server?
No: the conversion runs in your browser and the share link never contains the file.
Privacy
The file stays in your browser: it is not sent to any server or saved.