LINQPad 9

LINQPad 9 needs .NET 8 or later to start up.
Your scripts can target .NET 6.NET 10.
(For .NET Framework support, run LINQPad 5 side-by-side.)

Release Candidate Builds

Download LINQPad 9 for Windows
X64 + X86 + ARM64
Download LINQPad 9 for macOS Apple Silicon

Latest Beta Builds

Download LINQPad 9 for Windows
X64 + X86 + ARM64
Download LINQPad 9 for macOS Apple Silicon

See beta release notes

Release Notes

LINQPad 9 is a major update that unifies the Windows and macOS codebases, with dozens of new features, a revamped UI, and a brand-new advanced AI agent. The product is currently in the release candidate phase. If you encounter any bugs or issues, please use the Report Bug feature on the Help menu, or report it on the LINQPad Forum.

LINQPad 9 supports C# 14. Your scripts can target .NET 6 → .NET 10.

User Interface
  • The dark theme has been completely redesigned in LINQPad 9 and extends to virtually all aspects of the UI. You can also customize the black point in Settings, General to optimize for low ambient light and OLED displays.
  • There's now a unified feature-search to search all commands, help and settings in LINQPad (Ctrl+Q). Open documents are also now searchable (Alt+W or Ctrl-Command-W).
  • The Settings dialog is brand-new and is fully searchable.
  • All commands are now centralized, and can have their keyboard shortcuts customized. Customizations are written to a file that's friendly to manual editing and can be shared between computers. Go to Settings, Keyboard to configure, or press Ctrl+F6 or Command-F6.
  • LINQPad now includes a native trackpad handler. This is designed for both Windows and macOS and brings smooth pixel scrolling to every element in the LINQPad UI. On macOS, there's a checkbox in Settings to optimize for an old-school scrollwheel.
  • LINQPad now implements per-monitor DPI scaling, so text remains sharp when you move LINQPad across monitors with different scaling factors.
  • The Data Grid visualizer has been completely rewritten, and now uses a glitch-free in-process UI backed by a high-performance IPC data feed. The interface for editing database tables has improved, and the limit for editable text fields has increased from 60K to 2.5MB. The grid also now supports Util.Merge.
  • You can now organize your connections into groups in the Schema Explorer tree. Just click the Organize button above the TreeView.
  • Console.ReadLine and Util.ReadLine now accept multi-line text.
  • LINQPad is now better at handling non-.linq files. There's a "New text document" option on the File menu for creating new text files, .cs files, or files with json/xml/html/css highlighting. Text files can be saved and opened with any extension.
  • You can now scale the entire UI in LINQPad's Settings dialog (as well as via the OS).
New AI Features
All AI features in LINQPad are opt-in. You can also request a license that entirely blocks the use of AI, should company policy prohibit it.

New Provider Model

  • You can now configure any number of AI providers and models in LINQPad's Settings dialog, and switch between them on the fly via dropdowns in the Agent and Chat interfaces. You can also tune the level of reasoning on the fly with a slider.
  • LINQPad is now fully integrated with OpenRouter. OpenRouter lets you access any LLM with a single pay-per-use account - including the latest Sonnet, Gemini, Grok and GPT Reasoning models, without requiring ID validation. Simply go to Settings, AI and click Add New Provider. LINQPad will walk you through sign-up and will automatically generate an API key.
  • The list of supported providers also includes OpenAI, Anthropic, Azure OpenAI, and Azure Foundry, as well as custom OpenAI- or Anthropic-compatible endpoints.

Smart Agent

LINQPad now lets you ask a question or give a coding instruction directly from the editor: just press Ctrl+I / Command-I. This tool uses a smart agent, allowing the model to dynamically gain context and automatically correct its output. It's also able to interact with LINQPad to learn about LINQPad-specific APIs and fetch relevant code samples. Additionally:

  • The tool works both when starting from a blank script, and when making changes to existing code. Changes are shown as red/green diffs that you can accept or reject together or individually, and are applied optimistically so you can test them before accepting. LINQPad uses an advanced bespoke diffing engine for reliable fuzzy matching.
  • LINQPad uses its compiler to check C# output for errors, and feeds any errors back to the model to fix before posting.
  • If you check Include Connection Schema, the model is able to query portions of the schema, allowing it to write queries that work first time.
  • If you check Write Unit Tests, LINQPad will instruct the model to emit xUnit tests when writing code. Should the tests fail, LINQPad generates a link to automatically feed the failed test results back to the model. This provides an easy and efficient process to ensure runtime correctness with AI-generated code.
  • You can set the provider and model with each request, and tune the level of reasoning with a slider. Reasoning/thinking models such as Claude Sonnet and GPT 5 Reasoning give the best results. Both models are available on OpenRouter.
  • Any current compilation or runtime errors are also available to the model. Pressing Ctrl+Shift+I / Shift-Command-I will ask the model to explain or fix the current errors.
  • The model is able to add NuGet package references (with your approval) and using directives as needed.
  • The model can switch between Statements and Program modes as needed.
  • SQL scripts are also supported; the model knows when to emit SQL rather than C#.
Examples:

These demos usually give correct results first time with Sonnet 4.5, thinking enabled:

Show me how to parse HTML in C#

The model will import the most popular NuGet package for HTML (with your permission) and write some working demo code along with an explanation.

Write a query showing the bestselling loss leaders, and how much we're losing. Chart the data and export it to Excel.

(Assuming the script has a database connection), the model will automatically request the schema for the tables it needs, the LINQPad samples on charting and exporting, and will use this info to write a script that works first time.

Does C# support extension properties?

The model will talk privately with LINQPad to learn about C# 14 features, then emit a working demo of extension properties.

Update this code to use System.Text.Json

(Assuming you have code that uses Newtonsoft.Json), the model will refactor the code to use System.Text.Json.

Write unit tests to expose the bugs in this code

The model will use its knowledge of xUnit integration in LINQPad to write tests. This is a great way to validate and improve existing code. If any tests fail, you can feed the results back to the model with a single click.

AI Chat Improvements

LINQPad AI Chat window has also been improved:

  • You can choose the provider, model and reasoning level before submitting.
  • There's a new Enable Refactoring switch. When enabled, this updates the system prompt with instructions for the model to output diffs when suggesting code changes. When a diff is emitted, LINQPad inserts an Apply Diff link to apply the changes to the editor, using the same red/green diffing engine as the AI Agent. There are also a restore checkpoint link.
  • Markup in responses is now rendered.
  • NuGet package references and using directives in responses are parsed and processed.
  • There's now a Get Second Opinion button - this allows you to play models off against each other.
  • When you clone a script, the AI Chat panel is now cloned with it.

As before, all LINQPad-specific interventions are optional in the AI Chat window. If you choose the Open Conversation prompt (or leave the System prompt blank), you will have a direct and clean connection to the model which you can use a prompt engineering tool, or a general front-end for AI APIs.

AI Completion Improvements

The AI Completion engine has been upgraded with a new code outlining algorithm, better prompts, and better output cleansing. It also now interacts with member completion lists and has an optional automatic mode. Automatic mode uses a low-cost model by default (Gemini 2.5 Flash or GPT mini; this is configurable). To enable, go to Settings > AI.

SQL to LINQ conversion

An AI-based SQL to LINQ conversion tool is currently in early testing and is expected to ship late November.

New Editor Features

LINQPad 9 has a new editor that supports diagnostic scrollbar indicators, modification indicators, and asynchronous completion. Additionally:

  • Dozens of new C# Code Fixes and Code Refactorings are now supported, including Convert to Raw String, Convert to Interpolated String, Convert anonymous type to record, Introduce Local Variable, and Convert foreach to LINQ. You can access these by pressing Alt+Enter, Ctrl+. or Option-Enter when the screwdriver icon appears in the margin.
  • The editor can now show whitespace characters (Settings > Editor). This feature activates automatically when you write a raw string literal with malformed indentation.
  • Support for multiple cursors has improved significantly, with the following new commands (all consistent with Visual Studio):
    • Ctrl+Alt+click / Command-Option-click to add a cursor
    • Shift+Alt+. / Option-Command-. to add a cursor at the next match
    • Shift+Alt+/ / Option-Command-/ to move the last cursor to the next match
    • Shift+Alt+, / Option-Command-, to remove the last cursor
    • Shift+Alt+; / Option-Command-; to add cursors at all matches
    The commands for making rectangular selections continue to work as before (also consistent with Visual Studio):
    • Alt+drag / Option-drag to make a rectangular selection with the mouse
    • Alt+Shift+arrow to start a rectangular selection with the keyboard (Windows only)
    All gestures can easily be found with LINQPad's global feature search Ctrl+Q.
  • There's now an option in Settings, File Management to automatically save files as you type.

The editor also supports dozens of less-commonly used commands such as transpose characters or Move to visible bottom. These are available via the command search or global feature search, and can be assigned custom keyboard shortcuts.

File-based Apps

LINQPad 9 supports the #:project and #:package directives, so you can create, edit and run file-based apps in C# 14.

To create a file-based app, go to File, New... and choose C# file-based app. This creates a script which saves with a .cs extension instead of a .linq extension, so you can run it with dotnet run after saving it. You can also take an existing (statements-based) .linq file and choose File, Save As... to save it with a .cs extension. Here's a sample script:

// Reference a project:
#:project ../MyProject/MyProject.csproj      // Reference a project

// Reference the latest Humanizer package:
#:package Humanizer.Core@*

using Humanizer;

Console.WriteLine (1234567.ToWords());
The #:project and #:package directives are also supported in normal LINQPad scripts. The (only) reason to use a .cs extension is so you can also feed your script to dotnet run (or share code between LINQPad and a project). When working with .cs files, your script is locked in C# Statements mode.

Under dotnet run, you won't be able to access LINQPad features such as .Dump() or #load (or an automatic data context).

However, you can do the following:

#:package System.Reactive@*

using System.Reactive;
using System.Reactive.Linq;

var observable = Observable.Interval (TimeSpan.FromSeconds (0.5)).Take (10);

// When running under LINQPad, call Dump; otherwise manually subscribe to the observable:
#if LINQPAD
	observable.Dump();
#else
	observable.Subscribe (i => Console.WriteLine (i));
	Console.ReadLine();
#endif
New Database Querying Features
  • LINQPad 9 includes a brand-new custom scaffolder for PostgreSQL, capable of handling enum and timestamptz columns. These types are supported both programmatically and in the DataGrid. To enable, go to the Connection Properties dialog.
  • All database drivers in LINQPad now support object filtering. You can write include/exclude filters for schemas, tables/views, and (in the case of SQL Server) stored procedures and functions. This speeds up schema retrieval, reduces clutter, and can be useful in avoiding naming conflicts.
  • The LINQ-to-SQL driver now uses the Microsoft.Data.SqlClient library by default for new connections. For backwards compatibility, there's a checkbox in the connection dialog to enable the legacy System.Data.SqlClient library.
  • The LINQ-to-SQL driver now includes a .WithQueryHints extension method for injecting query hints, such as 'OPTIMIZE FOR UNKNOWN' or 'HASH GROUP'.
  • LINQPad's EF Core Driver now supports Universal Authentication with SQL Server.
Other New Features
  • All stored secrets now use LINQPad's centralized Password Manager, which integrates with Windows Data Protection API or macOS Keychain. This includes passwords for connections and NuGet sources, API keys, OAuth refresh tokens and data accessed with Util.GetPassword. This creates less friction when using the same scripts across multiple machines.
  • Most of LINQPad's settings are now stored in a configurable folder, making it easy to synchronize settings between machines. The default is My Documents/LINQPad Settings under Windows and ~/LINQPad/Settings under macOS.
  • You can now execute JavaScript more easily by calling Util.JS.Eval. Simply pass in the JavaScript, and a string is returned. If you don't need a return value, call Util.JS.Run instead. LINQPad's HTML controls also support Eval and Run methods.

Licensing

To enable paid features of LINQPad 9, you will need to upgrade your license to Version 9 if you purchased an older major version. A LINQPad 9 license also works for all previous versions of LINQPad.

LINQPad 9 Beta Release Notes

The latest beta incorporates minor bug fixes.


Download LINQPad 9 Beta for Windows

Download LINQPad 9 Beta for macOS

Current beta version: 9.3.15

LINQPad 9 betas automatically update when a newer beta is released.