Skip to main content

Editor only — SQL is not executed here

Online SQL Editor

A quiet place to compose a query: keywords, string literals, comments and identifiers highlighted properly while you get the joins and grouping right. There is no database connection, which is exactly why it is safe to draft a destructive statement here before it goes anywhere near production.

Open the SQL editorFree · no sign-up · your files stay in your browser

Can you run SQL here? No — and that is deliberate.

AltF Code writes and highlights SQL; it does not connect to a database and cannot execute a query. Nothing here touches your data. Copy the finished statement into your own client — psql, MySQL Workbench, DBeaver, a cloud console — to run it.

A browser can execute only HTML, CSS and JavaScript. Everything else on AltF Code is a full editing surface — real highlighting, real editing, real files — and this page says so instead of advertising a compiler that does not exist.

SQL in the editor

A file named main.sql is highlighted with the sql grammar — the same grammar Visual Studio Code uses.

SELECT
    c.country,
    COUNT(*)        AS orders,
    SUM(o.total)    AS revenue
FROM orders o
JOIN customers c ON c.id = o.customer_id
WHERE o.created_at >= DATE '2026-01-01'
GROUP BY c.country
HAVING COUNT(*) > 10
ORDER BY revenue DESC
LIMIT 20;

What you can do with SQL here

  • Draft and reshape a long query with real keyword highlighting instead of writing it in a chat box.
  • Read a migration or a stored procedure that arrived as plain text, with proper colouring.
  • Keep a scratch file of queries in your browser and download it as .sql when you are done.

SQL in this editor — the specifics

File extension.sql
Syntax grammarMonaco "sql" — bundled, no download
Code intelligenceSyntax highlighting, bracket matching, comment toggling and word-based suggestions — no type checking
Runs in this pageNo — editing and highlighting only
Run it locally withpsql -f query.sql (or your database client)
Cost / accountFree, no sign-up; files stay in your browser

SQL editor — common questions

Can I run SQL queries here?
No. There is no database connection of any kind — the editor cannot reach your data and never will. Run the finished query in psql, MySQL Workbench, DBeaver, SSMS or your cloud console.
Which SQL dialect does it highlight?
Generic SQL keyword highlighting, which covers PostgreSQL, MySQL, SQLite, SQL Server and BigQuery syntax well. Dialect-specific validation is your database's job.
Is it free and private?
Yes. No account, no upload, and no connection to any data source. Files are saved only in your browser's local storage.
Is it safe to write DELETE or DROP statements here?
The editor cannot execute anything, so writing the statement here does nothing at all. It becomes real only when you paste it into a client that is connected to a database — check the target twice at that point.

Start writing SQL

The editor opens with a blank file and a cursor. Nothing to install, nothing to sign up for, and your work is saved in your own browser.

Open AltF Code