SQL Formatter (MySQL, PostgreSQL, BigQuery…)
Pretty-print SQL across 13 dialects: MySQL, PostgreSQL, SQLite, BigQuery, Snowflake, Redshift, MS SQL, Oracle, DB2… UPPERCASE keywords, custom indent.
Pretty-print SQL with sql-formatter. Supports MySQL, PostgreSQL, SQLite, BigQuery, Snowflake, MS SQL, Oracle... Runs 100% in your browser.
When to format SQL
- Code reviews: 100-line ORM-dumped query on one line — unreadable.
- Slow query debugging: format before
EXPLAINto trace JOINs/WHEREs. - Committing to git: consistent formatting → cleaner diffs.
- Learning SQL: formatted queries are easier to understand.
- Docs / blog posts: paste pretty SQL into markdown.
13 supported dialects
- MySQL / MariaDB: backtick identifiers, LIMIT syntax.
- PostgreSQL: double-quote identifiers, JSON operators (
->,->>). - SQLite: lightweight, used for mobile and local apps.
- BigQuery: dataset.table backticks, ARRAY/STRUCT.
- Snowflake: warehouse.database.schema, FLATTEN.
- Redshift: AWS data warehouse.
- MS SQL Server (T-SQL):
[bracketed]identifiers, TOP. - Oracle PL/SQL: ROWNUM, sequences.
- DB2, Hive, Trino: enterprise databases.
Tips
- UPPERCASE keywords: standard convention (SELECT, FROM, WHERE…) — easier to read, separates keywords from identifiers.
- 2 vs 4 indent: team preference. 2 is common for web dev, 4 for DBAs.
- Minify: collapse SQL to one line — handy when embedding in code (ORM strings, logs).
- Privacy: runs 100% in your browser. Production queries are NOT uploaded.
Who this is for
Content writers, editors, SEO specialists, devs handling text/markdown — URL slugs, char counts, regex testing, SQL formatting.
FAQ
Does this support Vietnamese diacritics?
Yes. All text tools fully support Vietnamese Unicode, including modern diacritic rules.
Is my pasted text saved?
No. Text only exists in the current tab. Refresh or close = gone. TopDev stores nothing.
Related tools
See all tools →Regex Tester
Test regex live with match highlighting. 7 ready presets including Vietnamese.
NEWRemove Vietnamese diacritics
Strip diacritics for slugs, filenames, usernames, identifiers. Optional đ → d.
NEWURL Slug Generator
Title → SEO-clean URL slug. Strip diacritics, lowercase, custom separator.
NEWChar / Word / Line Counter
Real-time char/word/line/paragraph count + SEO meta (60/160) and tweet (280) meters.