SQL Formatter API
Category: developer
Format, beautify, and minify SQL queries. Supports multiple SQL dialects. Runs entirely in the browser using sql-formatter.
Endpoint
N/A
Browser API (sql-formatter)
No Server API
Response
Content-Type: N/A
This tool formats SQL in the browser using the sql-formatter library. No server-side API is available.
// Browser-only: uses sql-formatter library
cURL Example
# No cURL equivalent — this tool runs in the browser
Code Samples
// SQL formatting using sql-formatter
import { format } from 'sql-formatter';
const formatted = format('SELECT * FROM users WHERE age > 18 ORDER BY name');
console.log(formatted);
# For server-side SQL formatting:
import sqlparse
formatted = sqlparse.format('SELECT * FROM users', reindent=True)
print(formatted)
// For server-side SQL formatting, consider: // - Hibernate's built-in formatter // - JSqlParser for parsing