Skip to content
Guide · Other databases online

SQL Server Online: Free Ways to Run T-SQL

No T-SQL engine runs inside a web browser, so the editor above runs SQLite for standard SQL practice. The rest of this page covers the free ways to run real Microsoft SQL Server, on your own machine or online, and the T-SQL syntax that differs.

No T-SQL engine runs inside a web browser, so this editor runs SQLite for standard SQL practice. T-SQL features such as TOP, DECLARE @variables, stored procedures and system views will not work here. The page below lists free ways to run real SQL Server.

Examples:
Sample data: tables and columns

Loads with the engine.

Facts on this page checked 8 October 2026 against the official documentation. Versions covered: sql.js 1.14.2 (SQLite 3.49.1) in the panel; SQL Server 2025 (17.x); Azure SQL Database free offer. Next review due April 2027. The playground runs entirely in your browser; nothing you type or open is sent to CodeWithSQL.
Short answer
  • The panel is not SQL Server. It runs SQLite in your browser, so TOP, DECLARE @variable, stored procedures and system views fail here.
  • SQL Server 2025 Express is free for development and production, with limits such as 50 GB per database.
  • SQL Server 2025 Developer editions are free with all features, licensed for development and test only. The Docker image runs Developer edition by default.
  • Online, the Azure SQL Database free offer gives up to 10 databases per subscription, each with a monthly allowance of compute and 32 GB of data.
How we know: Written from the playground's own code and Microsoft's official pages (Microsoft Learn and the SQL Server downloads page), checked on 8 October 2026. We have not installed SQL Server or created Azure databases for this page.

What the SQL Server online editor on this page runs

SQL Server is a server program that you install or run in a container, and no T-SQL engine runs inside a web browser. The editor above therefore runs SQLite (compiled to WebAssembly by sql.js) on your device, with a shop and an HR sample database. Use it for the SQL that T-SQL shares with other databases: joins, grouping, subqueries, CTEs and window functions.

Press Run or Ctrl+Enter (Cmd+Enter on a Mac); results show up to 1,000 rows, and Download CSV saves the last one. Sample data switches between the shop tables (customers, products, orders, order_items) and the HR tables (departments, employees), and Reset data restores them. Copy share link puts the query in the URL after #q=; nothing is stored on a server, and the link fills the editor without running it.

Standard SQL (runs here and on SQL Server): revenue by country, returned orders excluded
SELECT c.country, COUNT(*) AS orders, SUM(o.total) AS revenue
FROM orders o
JOIN customers c ON c.customer_id = o.customer_id
WHERE o.status <> 'returned'
GROUP BY c.country
HAVING COUNT(*) > 1
ORDER BY revenue DESC;

T-SQL vs this SQLite editor

T-SQL and SQLite syntax differences (from Microsoft Learn and sqlite.org)
TaskSQL Server (T-SQL)SQLite (this editor)
First n rowsSELECT TOP (3) ... ORDER BY ...... ORDER BY ... LIMIT 3
PagingORDER BY ... OFFSET 10 ROWS FETCH NEXT 10 ROWS ONLYLIMIT 10 OFFSET 10
Join stringsa + b (or CONCAT(a, b))a || b
VariablesDECLARE @n INT = 3;Not available

Free ways to run real SQL Server

SQL Server Express

Microsoft describes Express as the entry-level, free database, and its download page says it is suitable for development and production for desktop, web and small server applications. The SQL Server 2025 limits are 50 GB per database, the lesser of 1 socket or 4 cores, and 1,410 MB of buffer pool memory. Our SQL Server Express guide covers installation.

Developer editions

SQL Server 2025 has two free Developer editions, Standard Developer and Enterprise Developer, with the features of Standard and Enterprise but licensed for development and test, not production. See SQL Server Express vs Developer to choose.

Docker

Microsoft's quickstart pulls the SQL Server 2025 Linux image mcr.microsoft.com/mssql/server:2025-latest and, by default, creates a container with the Developer edition. You accept the licence with ACCEPT_EULA=Y and set the sa password with MSSQL_SA_PASSWORD; Microsoft's quickstart has the full command.

Azure SQL Database free offer

For SQL Server online without installing anything, the Azure SQL Database free offer gives each database 100,000 vCore seconds of compute, 32 GB of data and 32 GB of backup storage free per month, for the lifetime of the subscription, with up to 10 General Purpose databases per subscription. Details are in our Azure SQL Database free tier page.

Privacy

The editor on this page runs entirely in your browser. Your queries and results are not sent to CodeWithSQL or to Microsoft, and everything resets when you reload. A share link contains the query text, so anyone with the link can read it.

Practise with the SQL exercises or follow the SQL beginner course. To connect to a real server, see our SSMS review.

Frequently asked questions

Can I run T-SQL online for free?

Yes, with the Azure SQL Database free offer. Azure SQL Database is a managed service that accepts T-SQL: Microsoft's T-SQL reference pages, such as the one for TOP, list it as a product they apply to. The editor on this page runs standard SQL only, not T-SQL.

Is SQL Server Express free for production?

Yes. Microsoft describes Express as ideal for development and production for desktop, web and small server applications, within its size and resource limits.

Why does SELECT TOP fail here?

TOP is T-SQL. The editor runs SQLite, which uses LIMIT at the end of the query instead.

Can I host a SQL Server database online for free?

The Azure SQL Database free offer is the free option Microsoft documents: up to 10 databases per subscription, each with 32 GB of data storage and a monthly compute allowance.

Sources

Checked 8 October 2026.

How we research tool pages: our editorial method. The engines are open-source projects credited on each page.

Want structured practice?

Work through real problems with hints and solutions, or follow the beginner course.