GlobaleGratuito

Formattatore SQL

Indenta istruzioni SQL senza connetterti a un database né eseguirle.

Questo strumento carica file o dati sul nostro processore isolato. I file di lavoro vengono eliminati al termine. Non inviare materiale sensibile o riservato.

Dati

Suggerimento: premi Ctrl + Enter per eseguire

Il tuo risultato

Il risultato apparirà qui.

Per ora la guida dettagliata qui sotto è disponibile solo in inglese.

Informazioni su questo strumento

Queries copied from logs, ORMs or one-line scripts are hard to read and review. This formatter re-indents SQL statements, puts major clauses (SELECT, FROM, WHERE, JOIN, ORDER BY) on their own lines and uppercases keywords, making the structure obvious before you debug or share a query.

It only reformats text. It does not connect to any database, check that tables exist, or execute anything.

Come si usa

  1. Paste one or more SQL statements.
  2. Confirm the server-side processing and run the formatter.
  3. Copy the formatted SQL back into your editor or ticket.
  4. Review it; formatting does not validate syntax for your specific database.

Come funziona il calcolo

The text is processed by the sqlparse library with reindent and uppercase keywords. Comments and literals are preserved.

Esempio pratico

The one-line query "select id, name from users where active = 1 order by name;" becomes SELECT id, name on the first lines, then FROM users, WHERE active = 1 and ORDER BY name on separate lines, with keywords in capitals.

Limiti

  • Up to 50,000 characters.
  • Formatting only; no validation or execution.
  • Style options (indent width, keyword case) are fixed.

Ultimo aggiornamento:

Domande frequenti

Which SQL dialects are supported?

It formats common SQL used by PostgreSQL, MySQL, SQLite and SQL Server. Very dialect-specific syntax may be formatted imperfectly.

Does it fix syntax errors?

No. It reformats what you give it; invalid SQL stays invalid.

Is my query stored?

It is processed in a temporary job on the server and not kept after the request.

Risoluzione dei problemi

The result looks odd around a vendor-specific clause.

The parser may not recognize it. Format that part by hand.

Nothing happens when I run it.

Tick the processing confirmation box; server tools need it.

Sensitive data is in the query.

Replace real values with placeholders before formatting queries that contain personal data.

Privacy & Gratuito

I miei dati vengono salvati?

Questo strumento carica file o dati sul nostro processore isolato. I file di lavoro vengono eliminati al termine. Non inviare materiale sensibile o riservato.

Questo strumento è gratuito?

Sì. Non servono registrazione né pagamento.

Elaborazione sul server

Passi successivi utili