PostgreSQL Formatter
Format PostgreSQL queries, casts and CTEs cleanly.
Input
Waiting for input
Output
or press ⌘/Ctrl + EnterYour result appears here.
- Runs in your browser
- Nothing is uploaded
- Free, no sign-up
How to use it
- Paste one or more SQL statements.
- Pick the dialect (plain SQL works for most queries) and keyword case.
- Copy the formatted result.
Why Tool Dock
- FastEverything runs on your own device, so there is no queue and no waiting for uploads.
- PrivateYour files and text never leave the browser. Close the tab and they are gone.
- Batch friendlyDrop several files at once and download each result, or all of them together.
Questions
Does the formatter change what my query does?
No. It only changes whitespace, line breaks and keyword case. Identifiers, strings and values are left untouched.
Why choose a dialect?
Dialects differ in keywords and syntax, for example T-SQL's TOP, PostgreSQL's :: casts or BigQuery's backticks. The right dialect formats those correctly; plain SQL is a safe default.
Is it safe to paste production queries?
Formatting runs entirely in your browser and nothing is sent to a server. Still, the share-link feature warns before you share text that contains credentials.
Related tools
- HTML FormatterBeautify HTML, CSS and JavaScript with consistent indentation.
- JSON Formatter & ValidatorFormat, validate, repair and explore JSON in a real editor, with a tree view and the exact line of any error.
- XML FormatterPretty-print or minify XML and see mistakes at a glance.
- Base64 DecodeTurn Base64 back into text, images or files, right in your browser.
- Base64 EncodeTurn text or any file into Base64, right in your browser.
- BIMI CheckerCheck whether your brand logo can show next to your emails: BIMI record, logo, certificate and DMARC.