Advertisement

SQLite Formatter

Paste a SQLite query and get tidy formatting with uppercase keywords and indented subqueries. Recognizes SQLite specifics like GLOB, AUTOINCREMENT, WITHOUT ROWID and PRAGMA statements.

SQLite

Paste a SQLite query below.

Advertisement

How the SQLite formatter works

Strings, quoted identifiers and comments are masked first, then SQLite keywords such as GLOB, AUTOINCREMENT, PRAGMA and WITHOUT ROWID are uppercased. Clauses break onto separate lines, AND and OR stack vertically, and subqueries indent by parenthesis depth.

Made for app developers

SQLite powers mobile apps, desktop tools and embedded devices. Formatted queries make on-device SQL easier to read in code reviews and simpler to debug when a query built with string concatenation misbehaves.

SQLite Formatter FAQs

Does it format PRAGMA statements?
Yes. PRAGMA is a recognized keyword, so statements like PRAGMA journal_mode=WAL are uppercased and kept on one clean line.
Is GLOB treated like LIKE?
GLOB is in the keyword list and uppercased, but unlike LIKE it is not forced onto a new line, so WHERE title GLOB 'todo*' keeps its natural flow.
Can it format CREATE TABLE with AUTOINCREMENT?
Yes. AUTOINCREMENT, INTEGER PRIMARY KEY and WITHOUT ROWID are recognized, so table definitions format with consistent keyword casing.
Does it validate the query?
No, it only reformats. SQLite is forgiving about some syntax, so test the formatted query in your app or with the sqlite3 shell before shipping.
Is my SQL uploaded anywhere?
No. Everything runs in your browser with JavaScript, so queries containing user data or schema details stay on your device.
Advertisement