SQL Formatters
Make SQL readable in the dialect you actually use. Formattr formats queries for Standard SQL, MySQL, MariaDB, PostgreSQL, SQL Server, Oracle PL/SQL, SQLite, BigQuery, Snowflake, Spark, Redshift and Trino, with your choice of keyword case, indentation and comma style — and minifies them back to one line when a config field or log needs it.
Common tasks
About sql tools
SQL gets its own category because dialect matters. Quoting rules, parameter placeholders and keywords differ between databases, and a formatter that treats every query as generic SQL will mangle backtick identifiers, PostgreSQL casts or SQL Server brackets. Formattr uses the sql-formatter library with a real tokenizer per dialect, and hints when your query looks like it belongs to a different one.
Comments are preserved, placeholders such as ?, :name, $1 and @p stay untouched, and multiple statements separated by semicolons are formatted with the blank lines you choose. When the tokenizer cannot parse something it tells you where, suggests a fix for common keyword typos like FORM instead of FROM, and offers a best-effort format anyway.
Queries copied from slow-query logs, ORMs and BI dashboards are the typical input. Your SQL stays in your browser — table names and literal values never reach a server.
Frequently asked questions
Which SQL dialects are supported?
Standard SQL, MySQL, MariaDB, PostgreSQL, SQL Server (T-SQL), Oracle PL/SQL, SQLite, BigQuery, Snowflake, Spark, Redshift, Trino and DB2.
Does the formatter check my query is valid?
It tokenizes the query, so it catches unterminated strings and unknown syntax, but it does not check tables or columns exist — that needs your database.
Is it safe to paste production queries?
Yes. Formatting happens in an isolated frame in your browser that cannot make network requests, so table names, customer identifiers and literal values in your SQL are never sent anywhere or logged.
Are comments kept?
Yes, both -- line comments and /* block */ comments are preserved in formatted output. The minifier removes them unless you choose to keep them.
More categories
- Text FormattingClean up text copied from Word, PDFs, email and chat, and convert identifiers between naming styles. Remove invisible characters, extra spaces and broken line breaks; switch between camelCase, snake_case, kebab-case and Title Case; convert line endings; and strip Markdown down to plain text — all in your browser.
- Date, Time & Number FormattingConvert Unix timestamps, build date format patterns, convert time zones and durations, and format numbers with separators, currency and Indian lakh/crore grouping. Every tool shows its result live as you type and gives you the code to produce the same output in JavaScript, Python, Java or SQL.