Skip to main content

SQL Formatter

Format, beautify, and export SQL. · It never leaves your device.

Input SQL

Formatted Output

Output will appear here as you type.

Formatting options

Layout & Spacing
Case

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