SQLFormatter
FormatterConvertPricingDocsGet Pro
Beautifier · SQLite

Beautify SQLite SQL online

Beautify minified, single-line SQLite SQL into clean, readable, properly indented queries. Turn crushed output from logs, ORMs or dbt into something you can read, diff and review.

1Paste your SQLite query into the editor.
2Press Format — or ⌘↵.
3Copy clean, highlighted SQL.
Open formatter
before
SELECT n.id,n.title,(SELECT count(*) FROM tags t WHERE t.note_id=n.id)tags FROM notes n WHERE n.deleted=0 AND json_extract(n.meta,'$.pinned')=1 ORDER BY n.updated_at DESC LIMIT 50;
SQLite
SELECT
  n.id,
  n.title,
  (
    SELECT
      count(*)
    FROM
      tags t
    WHERE
      t.note_id = n.id
  ) tags
FROM
  notes n
WHERE
  n.deleted = 0
  AND json_extract(n.meta, '$.pinned') = 1
ORDER BY
  n.updated_at DESC
LIMIT
  50;

Why beautify SQLite?

SQLite powers apps and scripts, so its queries often get generated inline and logged as one string. Beautifying that minified SQL into indented lines makes it readable without pulling it into a heavyweight tool.

Because SQLite is untyped and forgiving, a readable layout is your main defence against silently wrong logic — you can see the json_extract paths and subqueries clearly.

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