ApplicationText-based

application/sql

SQL

Reference for application/sql, the MIME type for SQL query files and database scripts used in relational databases.

MIME Type Detector

Drop a file to detect its MIME type — no upload, runs in your browser

📄

Drop any file here or click to choose

Expected extensions: .sql

HTTP Content-Type Header

HTTP Header
Content-Type: application/sql; charset=utf-8

Associated File Extensions

.sql

Quick Facts

MIME Typeapplication/sql
CategoryApplication
TypeText-based (human-readable)
Extensions.sql

Common Usage

SQL files contain database queries, schema definitions, migrations, and seed data. This MIME type is used by database management tools, migration frameworks, and API endpoints that accept raw SQL.

It is relevant to MySQL, PostgreSQL, SQLite, SQL Server, and other RDBMS.

Code Examples

HTML
<!-- Link or embed with explicit type -->
<link rel="stylesheet" href="file.sql" type="application/sql">

<!-- Or for script/media elements -->
<script type="application/sql" src="file.sql"></script>
Node.js
// Express.js
app.get('/file', (req, res) => {
  res.type('application/sql');
  res.send(data);
});

// Node.js http
res.writeHead(200, { 'Content-Type': 'application/sql' });
nginx
# nginx.conf — add to types block or use default
types {
    application/sql  sql;
}

# Or set for a specific location
location /api/ {
    default_type application/sql;
}

Related MIME Types

More Application MIME Types

Other application types in the Application family

Related Tools

Explore More MIME Types

Browse our complete reference of 185 MIME types with usage examples, HTTP headers, and code snippets.