SQLFormatter
FormatterConvertPricingDocsGet Pro
Formatter · SQLite

Format SQLite SQL online

Reformat SQLite queries against SQLite's own grammar: consistent indentation, aligned clauses and uppercase keywords. Paste one-line or ORM-generated SQL and get structured, reviewable output.

1Paste your SQLite query into the editor.
2Press Format — or ⌘↵.
3Copy clean, highlighted SQL.
Open formatter
before
select id,title,strftime('%Y',created_at) as yr from notes where deleted=0 and title like '%todo%' order by created_at desc limit 100;
SQLite
SELECT
  id,
  title,
  strftime('%Y', created_at) AS yr
FROM
  notes
WHERE
  deleted = 0
  AND title like '%todo%'
ORDER BY
  created_at DESC
LIMIT
  100;

Why format SQLite?

SQLite's grammar is compact but has its own quirks — AUTOINCREMENT, flexible typing, and functions like strftime and json_extract. The formatter formats to SQLite's rules so these read cleanly.

Great for the ad-hoc queries you run against a local .db file or an app's embedded database.

All SQL formatters & beautifiers

Format PostgreSQLBeautify PostgreSQL
Format MySQLBeautify MySQL
Format T-SQLBeautify T-SQL
Format SQLiteBeautify SQLite
Format BigQueryBeautify BigQuery
Format OracleBeautify Oracle
Format SnowflakeBeautify Snowflake
Format RedshiftBeautify Redshift