SQL formatter

Format SQL for PostgreSQL, MySQL, BigQuery, Snowflake, and other dialects.

Runs in browser

Use from your agent

Streamable HTTP at https://benchline.fabwaseem.com/mcp. No key. The tool name is format_sql.

mcp.jsonjson
1{
2 "mcpServers": {
3 "benchline": {
4 "url": "https://benchline.fabwaseem.com/mcp"
5 }
6 }
7}
tools/calljson
1{
2 "jsonrpc": "2.0",
3 "id": 1,
4 "method": "tools/call",
5 "params": {
6 "name": "format_sql",
7 "arguments": {
8 "sql": "example",
9 "dialect": "postgresql",
10 "keywordCase": "upper",
11 "indent": 2
12 }
13 }
14}

How it works

Free SQL formatter. Pick a dialect, choose upper, lower, or preserved keywords, and indent with 2 or 4 spaces. Formatting runs in the browser.

  1. 01

    Paste a query

    Drop a SELECT, an INSERT, or a longer script into the editor.

  2. 02

    Pick a dialect

    Keyword rules differ. PostgreSQL and BigQuery are both in the list.

  3. 03

    Copy the formatted SQL

    Choose keyword case and indent, then copy or download the result.

FAQ