Skip to content
OnlineToolStudio

SQL Editor

runs in your browserno sign-upfree

Edit SQL queries in a full-page editor with syntax checking, formatting for 8 dialects and minifying.

Checking…

About this tool

This SQL editor gives you one large editor with syntax highlighting for queries and scripts. Choose your dialect — MySQL, PostgreSQL, SQL Server, SQLite, Oracle PL/SQL, MariaDB, BigQuery or standard SQL — and it checks the syntax as you type, formats queries with upper-case keywords and minifies them onto one line. Strings and quoted names are never changed. Everything runs in your browser; queries are never run against a database.

How to use

  1. Paste or type SQL into the editor, or open a .sql file from your computer.
  2. Watch the status line under the editor: it shows the first syntax error with its line and column, and marks it in the code.
  3. Press Format to tidy the code or Minify to make it as small as possible. Pick your SQL dialect first for the best results.
  4. Use Full screen for more space, and fold or unfold blocks to focus on one part.
  5. Copy the code or download it as a .sql file.

FAQ

Does the editor run my queries?

No. It only reads the SQL to check, format or minify it. Nothing is sent to or run on a database.

How thorough is the syntax check?

It catches errors such as an unclosed bracket or quote and tokens in the wrong place. It does not know your tables, so it cannot tell you that a column does not exist.

What does Minify do?

It removes comments and extra whitespace so the query fits on one line. MySQL /*! … */ hints are kept, and text inside quotes is never changed.

Can I undo Format or Minify?

Yes. Press Ctrl + Z (⌘ + Z on Mac) in the editor to undo it, just like a normal edit.

Is my code sent to a server?

No. Editing, checking, formatting and minifying all run in your browser. Your last code is only saved in this browser so it is still there when you come back. Press Clear to remove it.

Related tools

All tools