About this tool
Build ADO.NET and JDBC SQL Server connection strings with instance names, encryption, timeouts and correct value escaping.
This builder produces matched SQL Server connection strings in the two dominant formats: ADO.NET SqlClient (Server=host\INSTANCE,1433;Database=...;Encrypt=True;...) and the Microsoft JDBC driver URL (jdbc:sqlserver://host:1433;databaseName=...;encrypt=true;...). It handles named instances, SQL versus Windows/Integrated authentication, encryption and TrustServerCertificate flags, timeouts and application names — and applies each format's escaping rules, double-quoting ADO.NET values containing semicolons and brace-escaping JDBC values.
Open SQL Server Connection String Builder on AltFTool — it loads instantly in your browser.
Paste your code or data sample into the workspace.
Pick the format, conversion, or analysis you need.
Copy the polished result straight back into your project.
ADO.NET and JDBC output side by side from one set of inputs, with per-format property names.
Semicolons and quotes in passwords are double-quoted for ADO.NET and brace-escaped for JDBC automatically.
Named instances, explicit ports or SQL Browser resolution — the Server value is assembled correctly.
For .NET: Server=myhost\MYINSTANCE,1433;Database=mydb;User Id=me;Password=secret;Encrypt=True; — key=value pairs separated by semicolons. For Java: jdbc:sqlserver://myhost:1433;databaseName=mydb;user=me;password=secret;encrypt=true;. The default TCP port for a default instance is 1433.
Put the instance after a backslash: Server=myhost\SQLEXPRESS in ADO.NET, or instanceName=SQLEXPRESS in JDBC. Without an explicit port, the client asks the SQL Server Browser service (UDP 1434) which port the instance is listening on; specifying host\INSTANCE,port skips that lookup and works when UDP 1434 is blocked.
It makes the client accept the server's TLS certificate without validating it, so the connection is encrypted but not protected against man-in-the-middle attacks. It exists for dev machines and self-signed certificates; in production, install a certificate the client trusts and keep the flag False. Since Microsoft.Data.SqlClient 4.0, Encrypt defaults to True, which is why untrusted-certificate errors became common after upgrading.
Integrated Security=SSPI (JDBC: integratedSecurity=true) authenticates with the Windows or domain identity of the running process, so no password appears in the string; SQL authentication sends an explicit User Id and Password stored on the server. Integrated auth is generally preferred on Windows domains because credentials never live in configuration files.