Is it possible to autoformat / beautify SQL queries using pgAdmin4?

Viewed 19866

I would like to autoformat / beautify my SQL-queries directly in pgAdmin4. I know this feature from Java-developing in Eclipse, where I can beautify the whole code using a simple shortcut.

I only found a command line solution so far that makes my SQL queries pretty: pgFormatter.

5 Answers

Try the following command:

shift+Ctrl+k

In pgAdmin5 on macOS this can be done using Shift + Cmd + K.

Here is where you can find it in the UI: Screenshot

Still not implemented afaict, but an option would be to use some online tool.

I've successfully used: https://sqlformat.org/

Try Shift Shift + ctrl + k

You can use command + Shift + k for SQL code format or beautify.

Related