Open SQL Files Online
An .sql file contains database statements such as CREATE TABLE, INSERT or SELECT. Database dumps and migration scripts are usually shipped this way.
Structured Query Language script · .sql
What you see in the SQL viewer
- Syntax check for MySQL, PostgreSQL, SQLite, SQL Server and more
- Formatting with your preferred keyword case and indentation
- A list of the statements and tables in the file
- Highlighting for keywords, strings and comments
Other ways to open SQL files
Windows
SQL Server Management Studio, DBeaver or any text editor.
macOS
DBeaver, TablePlus or a text editor.
Phone & tablet
The browser is the practical option for reading a script on a phone.
Frequently asked questions
Is my SQL file uploaded?
No. The file is read by your browser and shown on your own device. Nothing is sent to a server, and it is gone when you close the tab.
How do I open an SQL file without installing software?
Drop the .sql file on this page. It opens straight away in the SQL Viewer & Formatter, on Windows, macOS, Linux, Android and iPhone alike.
What if my SQL file doesn't open?
The viewer checks the file's content, not just its name. If it is damaged or not really an SQL file, you'll see an error or can switch to the hex view to look at the raw bytes.
Can I convert SQL to another format?
Yes. The free file converter turns SQL files into other formats in your browser as well, without uploading them.