Oracle SQL and PL/SQL formatter

Paste an Oracle query or a PL/SQL block, as copied from SQL Developer, a log or an application, and make it readable: clauses on their own lines, consistent indentation and keywords in the case you choose.

Oracle syntax understood

  • :bind variables, and q-quoted strings such as q'[it's]'
  • Hierarchical queries with CONNECT BY and START WITH, and ROWNUM
  • FETCH FIRST n ROWS ONLY, NVL and DECODE
  • The old (+) outer-join marker, next to ANSI joins

PL/SQL blocks

Anonymous blocks with DECLARE, BEGIN, EXCEPTION and END get one statement per line, SELECT … INTO included, so a block from a script or a log becomes readable.

Old and new syntax

Older queries with (+) joins and ROWNUM, and newer ones with ANSI joins and FETCH FIRST, are both laid out cleanly. Rewriting one into the other? Put both in SQL compare to check that only the syntax changed.

Private: nothing is uploaded

Formatting, checking and comparing all happen in your browser. Your documents are saved in the browser's own storage on this computer, not on a server, so they never leave your device.

With your permission, we count anonymous visits (which pages and tools are used), never what you type. See Privacy.

Questions

Is all of PL/SQL formatted?

Blocks and the statements in them are laid out. Package and type definitions are laid out only roughly, but they keep working: only spaces and line breaks change.

Does it look up my tables?

No database is involved: the text is laid out using Oracle syntax, and names are not looked up anywhere.

Is my data uploaded anywhere?

Your documents aren't: everything runs in your browser, and they are saved on your computer, in the browser's storage for this site. With your permission we count anonymous visits, never their content.

More tools