.sql

What is a .sql file?

SQL files contain database commands — CREATE, INSERT, SELECT, DROP — used for backups, migrations, and sharing database structures.

Use caution
Type Data
By N/A (SQL standard)
MIME application/sql

Drop any file to identify it

No upload. No signup. No sending your file halfway across the internet.
We tell you what it is, right here in your browser.

What is it

You have an SQL file. It's either a database backup, a migration script, a schema definition, or seed data for a development environment. The file itself is plain text containing Structured Query Language statements — instructions that create tables, insert data, define relationships, and query results.

A single SQL file can contain an entire database: tables, indexes, constraints, stored procedures, and data. Tools like mysqldump and pg_dump export complete databases as SQL files that can recreate the entire structure from scratch. This makes SQL files the standard format for database backups, version-controlled migrations, and sharing schemas between developers. The file is harmless text until you execute it against a database — at which point a `DROP TABLE` in the wrong place can ruin your afternoon.

Any text editor opens SQL files. DBeaver (free) and MySQL Workbench (free) provide syntax highlighting and direct execution against a database connection. VS Code with the SQL extension handles highlighting and formatting. Never execute an SQL file you haven't read first — especially if it came from an external source. The commands inside run with whatever permissions your database user has.

Technical details
Full Name
SQL Database File
MIME Type
application/sql
Developer
N/A (SQL standard)
Magic Bytes
N/A
Safety
.sql requires caution. SQL files can contain destructive commands (DROP, DELETE). Review before executing against a database.
What opens it
Any text editor
FREE All
DBeaver
FREE All
MySQL Workbench
FREE All
FAQ
How do I open an SQL file?
Any text editor shows the SQL commands as text. To actually run the queries, use a database client like DBeaver (free), MySQL Workbench, or pgAdmin — or the command line (mysql, psql).
What's the difference between SQL and CSV?
CSV is raw data in rows and columns. SQL is a language — an SQL file contains commands that create tables, insert data, and define relationships. SQL is the instructions; CSV is just the data.
Is SQL a programming language?
It is a query language — designed specifically for talking to databases. It is not general-purpose like Python or JavaScript. You can write complex logic in SQL, but its purpose is data retrieval and manipulation, not building applications.
Related formats