SQL 格式化
格式化 SQL
在浏览器中运行 · 无需上传
此工具及本页说明目前仍为英文。功能完全相同:一切都在你的浏览器中运行。
你的浏览器版本过旧,无法运行此工具。请更新浏览器,或使用最新版的 Chrome、Edge、Firefox 或 Safari。
- 任何内容都不会离开你的设备
- 服务器不限制文件大小
- 无需注册,无水印
- 免费
How to format SQL
- Paste your SQL, open a .sql file, or try the example.
- Choose your database's dialect, the keyword case and the indentation.
- Copy or download the formatted SQL.
Good to know
- Only spacing, line breaks and letter case change. Your query does exactly the same thing.
- The dialect matters for things like quoting (`backticks` in MySQL, [brackets] in SQL Server) and special syntax.
- The SQL is never run and no database is contacted, so table and column names aren't checked.
- Several statements separated by ; are formatted one after the other.
常见问题
Why does formatting fail?
Usually because of an unclosed bracket or quote, or syntax from a different database. Try choosing the right dialect.
Is my SQL uploaded?
No. Everything happens in your browser, and the page is blocked from uploading anything.