Run code instantly
Write an expression, a few statements or a whole program, and press F5. No solution, project file or Main method.
For C# developers and everyone learning to code
QPad is a scratchpad for C#. Try out an idea, query your database with LINQ or explore data – without creating a single project.
Enumerable.Range(1, 5)
.Select(n => new { n, Square = n * n })
.Dump("Squares");
| # | n | Square |
|---|---|---|
| 0 | 1 | 1 |
| 1 | 2 | 4 |
| 2 | 3 | 9 |
| 3 | 4 | 16 |
| 4 | 5 | 25 |
Features
One tool that does one thing well: gets you answers fast.
Write an expression, a few statements or a whole program, and press F5. No solution, project file or Main method.
Lists, objects, dictionaries and nested structures become tidy tables. Stop guessing with Console.WriteLine.
Connect to your database and your tables are available in code. The schema tree shows tables, columns and relationships, and you drag them straight into the editor.
The SQL tab shows what your LINQ query turned into. Handy when you want to understand, debug or fine-tune a query.
Search nuget.org and your own package sources, including private Azure DevOps feeds, and add packages with all their dependencies. Your own DLLs work too.
Code completion, parameter info and errors as you type, from Roslyn – the compiler behind C#. Ctrl+K, Ctrl+D formats the code, as in Visual Studio.
Every script runs in its own process. An infinite loop? Press Stop and carry on as before.
Work on several queries at once. Save them as .qpad files in folders under My qPads, and get your tabs back just as you left them.
The interface follows the Windows theme, or you pick light or dark yourself. The syntax colors are tuned for both.
QPad is a Windows app built on .NET 10, with support for SQL Server, PostgreSQL and SQLite. Scripts are written in C# and compiled with Roslyn.
How it works
Open QPad and write C#. Choose Expression for a single expression, Statements for a series of statements or Program for a whole file.
Press F5. The code compiles in a blink and runs in a separate process, so your editor never hangs.
Results are shown as tables, and the SQL tab shows the queries that ran. Tweak the code and run it again – each round takes seconds.
Use cases
Whenever you think “I just need to try this quickly”, open QPad.
Get the package from NuGet, call its methods and see what they actually return – before you decide to use it.
Ask your database questions with LINQ: group, filter and compare. The answers come back as tables you can read right away.
Sketch business rules, calculations or an algorithm, and see that it works before it lands in the big code base.
Find out “how does this actually behave?” in seconds, instead of digging through documentation or guessing.
Tidy up files, convert data or run a one-off job against the database without setting up a whole project.
Save a query as a .qpad file and share it with colleagues, or keep it in the repository as living documentation.
For developers
Every time you open an IDE, create a project and wait for the build just to answer one small question, you lose your flow. QPad removes everything between the question and the answer.
You get faster answers, a better understanding of your data and a safe place to experiment – without test code ending up in your real projects.
From idea to answer in seconds. No projects to create and nothing to set up – just code and results.
.Dump() makes objects, lists and nested structures readable. It beats digging in the debugger or printing line by line.
Write LINQ and see the SQL that actually runs. You catch inefficient queries before they reach production.
Scripts run isolated from the editor and can be stopped with one click. Try whatever you like – you can always cancel.
Use NuGet packages and your own DLLs straight from the script. The same language and libraries as the rest of your code.
Save useful queries and scripts as files, and share them with your team as documentation or tools.
For those learning to code
Learning to program is about trying, seeing what happens and trying again. QPad makes that loop as short and clear as possible.
No project templates, no folders and no configuration to learn first. Open the app and write your first line of C#.
Every value, list and object becomes a table. It becomes concrete what a dictionary, a list or a LINQ expression really is.
Make a mistake and it is underlined as you type. When you press F5, you get a message with line and column – click it to jump straight to the spot in your code.
Write a LINQ query and see the SQL it becomes. That way you learn both – and see how they fit together.
You can't break anything by trying. Change, run, undo – and learn from what happens.
Every example is complete and runs as it is. Paste it in, press F5 and start changing things.
Students don't have to set up an IDE before the first class. Share exercises as small files, let them run the examples themselves, and use the dark or light theme depending on what works best in the room.
Try it yourself
Paste them into QPad, press F5 and start changing things.
Group words by their first letter and see the result as a table.
var words = new[] { "apple", "banana", "apricot", "avocado", "blueberry" };
words.GroupBy(w => w[0])
.Select(g => new { Letter = g.Key, Count = g.Count() })
.Dump();Find every phone number in a text, without digging through the documentation.
using System.Text.RegularExpressions;
var text = "Call 555-0142 or 555-0199";
Regex.Matches(text, @"\d{3}-\d{4}")
.Select(m => m.Value)
.Dump("Phone numbers");Add Newtonsoft.Json under “References…” and use it right away.
using Newtonsoft.Json;
var json = JsonConvert.SerializeObject(
new { Name = "Kari", Age = 29 });
json.Dump();
JsonConvert
.DeserializeObject<Dictionary<string, object>>(json)
.Dump();Connect to a database and drag a table into the editor. “Customers” is an example – use your own tables.
Customers
.Where(c => c.Name.StartsWith("A"))
.OrderBy(c => c.Name)
.Take(10)
.Dump();
// The SQL tab shows the query that ranGet started
Download QPad, install it just for you without administrator rights, and press F5 on the example that is ready and waiting.