Formatador de SQL
Indente instruções SQL sem conectar nem executar nenhum banco de dados.
Entrada
Dica: pressione Ctrl + Enter para executar
Configurações salvas
Por enquanto, a ajuda detalhada abaixo está disponível apenas em inglês.
Sobre esta ferramenta
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.
Como usar
- 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.
Como o cálculo funciona
The text is processed by the sqlparse library with reindent and uppercase keywords. Comments and literals are preserved.
Exemplo prático
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.
Limitações
- Up to 50,000 characters.
- Formatting only; no validation or execution.
- Style options (indent width, keyword case) are fixed.
Última atualização:
Perguntas frequentes
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.
Solução de problemas
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.
Privacidade & Uso gratuito
Meus dados são armazenados?
Esta ferramenta envia arquivos ou dados ao nosso processador isolado. Os arquivos de trabalho são excluídos após a tarefa. Não envie material sensível ou confidencial.
Esta ferramenta é gratuita?
Sim. Não é preciso cadastro nem pagamento.
Veja também
Próximos passos úteis
Formatador e validador de JSON
Valide, formate ou minifique JSON localmente. Dados inválidos nunca são enviados a um servidor.
Desenvolvimento e SEOConversor de CSV para JSON
Converta cabeçalhos e registros CSV em JSON, com suporte a delimitadores entre aspas e quebras de linha.
Desenvolvimento e SEOConversor de JSON para CSV
Converta uma lista plana de objetos em CSV. Textos parecidos com fórmulas recebem um prefixo de proteção para planilhas.
Desenvolvimento e SEO