GraphQL Formatter
Format and validate GraphQL queries, mutations, fragments, and schemas (SDL) with syntax highlighting.
Turn long, one-line SQL queries and ORM logs into clean, indented, syntax-highlighted SQL, or minify them. Free, private, and 100% in your browser.
Queries copied from application logs, ORMs, and monitoring tools usually arrive as one very long line. The formatter breaks them into clauses, indents subqueries and CASE expressions, and lists columns and conditions one per line, so you can see what the query actually does.
select id, email from users where active = 1 and created_at > ? order by id
SELECT
id,
email
FROM
users
WHERE
active = 1
AND created_at > ?
ORDER BY
idEach clause (SELECT, FROM, WHERE, GROUP BY…) starts a new line, columns and conditions are listed one per line, and subqueries, CASE expressions, and long column lists are indented.
Keywords, functions, strings, numbers, placeholders, and comments are colored so you can scan the query at a glance.
PostgreSQL ($1, ::casts, JSON operators, $$ bodies), MySQL (backticks, ON DUPLICATE KEY UPDATE), SQL Server ([brackets], @params), and SQLite.
Uppercase, lowercase, or keep keywords as written. Identifiers, strings, and comments are never changed.
Unclosed strings, quoted identifiers, comments, and unbalanced parentheses are reported with the exact line and column.
Queries are formatted in your browser and never uploaded, so table names and data in your logs stay private.
The formatter understands standard SQL plus the syntax of PostgreSQL, MySQL and MariaDB, SQL Server (T-SQL), SQLite, and most cloud warehouses. Dialect-specific features like quoted identifiers, placeholders, casts, and dollar-quoted strings are kept exactly as written.
Yes. That is what the tool is made for: ORMs log each query as a single long line. Paste it, and placeholders such as ?, $1, :name, and @p0 are kept and highlighted.
No. Only whitespace and, if you choose, the case of keywords change. Identifiers, string literals, numbers, and comments are left untouched. Minify removes comments.
It checks the syntax it needs to format safely: strings, quoted identifiers, comments, and parentheses must be closed. It does not check table or column names or the full grammar of every database.
Format and validate GraphQL queries, mutations, fragments, and schemas (SDL) with syntax highlighting.
Write Markdown with a live GitHub-style preview: tables, task lists, code blocks, and alerts. Ideal for README files.
Beautify, minify, and validate JSON instantly with exact line and column error reporting.
Compare two JSON documents side by side and see every added, removed, and changed value.