DevToolsHub Free · Fast · 100% in your browser

Connection String Builder

Build connection strings for SQL Server, PostgreSQL, MySQL, SQLite, MongoDB and Redis, with appsettings.json and environment variable snippets.

Connection string
Server=localhost;Database=MyDb;User Id=sa;Password=;TrustServerCertificate=True;
appsettings.json
{
  "ConnectionStrings": {
    "DefaultConnection": "Server=localhost;Database=MyDb;User Id=sa;Password=;TrustServerCertificate=True;"
  }
}
Environment variable
ConnectionStrings__DefaultConnection="Server=localhost;Database=MyDb;User Id=sa;Password=;TrustServerCertificate=True;"

Nothing is sent anywhere. Avoid committing real passwords; prefer user secrets, environment variables or a key vault.

About this connection string builder

Build correct connection strings for SQL Server, PostgreSQL (Npgsql), MySQL, SQLite, MongoDB and Redis (StackExchange.Redis) without looking up the keyword names. You also get a ready-to-paste appsettings.json section and an environment variable using the ConnectionStrings__Name convention used by ASP.NET Core.

How to use the Connection String Builder

  1. Choose the database type.
  2. Enter host, port, database and credentials.
  3. Copy the connection string, appsettings.json or environment variable.

Example

Server=localhost;Database=MyDb;User Id=sa;Password=…;TrustServerCertificate=True;

Frequently asked questions

Why do I need TrustServerCertificate=True for SQL Server?

Microsoft.Data.SqlClient 4+ encrypts by default. Local servers often use a self-signed certificate, so you must trust it or install a valid certificate.

How do I override a connection string in Docker or Azure?

Set an environment variable named ConnectionStrings__DefaultConnection. ASP.NET Core maps the double underscore to the : separator.

Is my data safe?

Yes. The tool runs entirely in your browser using WebAssembly. Nothing you type or upload is sent to a server, logged or stored.

Is it free?

Yes, completely free with no sign-up, no limits and no watermarks. It also works offline once the page has loaded.

An unhandled error has occurred. Reload ✕