Formater SQL
Indentez SQL sans connexion ni exécution en base.
Données
Astuce : Ctrl + Entrée pour lancer
Réglages enregistrés
L’aide détaillée ci-dessous n’est pour l’instant disponible qu’en anglais.
À propos de cet outil
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.
Mode d’emploi
- Paste one or more SQL statements.
- Confirm the server-side processing and run the formatter.
- Copy the formatted SQL back into your editor or ticket.
- Review it; formatting does not validate syntax for your specific database.
Fonctionnement du calcul
The text is processed by the sqlparse library with reindent and uppercase keywords. Comments and literals are preserved.
Exemple détaillé
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.
Limites
- Up to 50,000 characters.
- Formatting only; no validation or execution.
- Style options (indent width, keyword case) are fixed.
Dernière mise à jour:
Questions fréquentes
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.
Dépannage
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.
Confidentialité & Utilisation gratuite
Mes données sont-elles stockées ?
Cet outil transmet fichiers ou données au processeur isolé. Fichiers supprimés après traitement. Évitez les données sensibles.
Cet outil est-il gratuit ?
Oui. Aucune inscription ni paiement requis.
Voir aussi
D’autres outils utiles
Formateur et validateur JSON
Validez, formatez ou réduisez le JSON localement, sans envoi.
Développement et SEOConvertisseur CSV en JSON
Convertissez CSV en JSON avec séparateurs et sauts de ligne entre guillemets.
Développement et SEOConvertisseur JSON en CSV
Convertissez un tableau d’objets en CSV. Les chaînes de type formule reçoivent un préfixe protecteur.
Développement et SEO