Use this when a user pastes messy or minified SQL and wants it pretty-printed into a readable, canonical layout, or wants keyword casing normalized.
Use this when a user pastes messy or minified SQL and wants it pretty-printed into a readable, canonical layout, or wants keyword casing normalized. Deterministic: same input, same output. Each clause keyword (SELECT, FROM, WHERE, GROUP BY, ...) goes on its own line with its arguments indented beneath it, commas break columns onto new lines, JOIN/AND/OR start fresh lines, and short parenthesised groups stay inline. Optional dialect hint affects identifier quoting (e.g. tsql [brackets]); indent is a spaces count or "tab" (default 2); keywordCase is upper/lower/preserve (default upper). Example: "select id from t" -> formatted "SELECT\n id\nFROM\n t". Returns an error for empty or oversized (>200000 chars) input.
Request
- Base URL: https://api.clean.tools
- URL: https://api.clean.tools/v1/format_sql
- Auth: none declared
Request body
Response
Structured tool result.
Changes
No recorded changes to this operation across all 1 revision of this API.