SQL Formatter
Format, beautify, and export SQL. · It never leaves your device.
Dialect
Preset
Output
Input SQL
Formatted Output
Output will appear here as you type.Formatting options
Layout & Spacing
Case
Oracle SQL*Plus / SQLclWhen enabled, prepends COLUMN … FORMAT … directives so SQL*Plus / SQLcl render the result with fixed column widths.
About this tool
SQL Formatter cleans up and standardizes SQL code for reading, sharing, or embedding in documentation. Paste any SQL, choose a dialect and output format, and copy the result as plain SQL, a Markdown fenced code block, or an HTML snippet ready for Prism or Highlight.js. Supported dialects: Oracle (PL/SQL), PostgreSQL, SQL Server, MySQL, MariaDB, SQLite, and generic SQL.
Your SQL never leaves your device. All formatting runs entirely in your browser using JavaScript. Nothing is transmitted to a server, stored, or logged — not even for analytics. Safe to use with confidential or production SQL.
Powered by sql-formatter