inyourbrowser.com

MySQL Formatter

Format MySQL queries with the correct indentation, keyword casing, and line breaks for the MySQL dialect. Paste minified SQL and get a readable version back. All formatting runs in your browser.

Dialect:

Formatting runs entirely in your browser.

How it works

The tool uses the sql-formatter library, a dialect-aware SQL pretty-printer that runs entirely in your browser. It parses your query and re-emits it with consistent indentation and capitalisation. No server required.

Processing runs in your browser

All formatting happens locally in your browser tab. Our servers are not involved at any point.

Related operations

For inspecting JSON returned by queries, try the JSON formatter. To validate identifier patterns in your SQL, use the regex tester. For converting query results into structured rows, see CSV to JSON.

Frequently asked questions

Which MySQL syntax features are supported?

Standard SELECT, INSERT, UPDATE, DELETE, and JOIN forms, plus MySQL-specific constructs like backtick-quoted identifiers, LIMIT/OFFSET, and ON DUPLICATE KEY UPDATE.

Does formatting change query behaviour?

Formatting only adjusts whitespace and capitalisation. The execution plan, result set, and semantics of the query stay identical.

Can I format multiple statements at once?

Yes. Separate statements with semicolons and paste them together. Each one is formatted independently.

Is my SQL sent to a server?

All formatting runs in your browser using JavaScript. Our servers are not involved at any point.

Related tools

JSON formatter
Pretty-print, minify, validate, and sort JSON keys. Instant output.
Regex tester
Test regular expressions with live match highlighting, replace, and split modes.