Code Formatter
Tidy up code
Language
Indent with
Formatted
The formatted code appears here.Questions
How do I format messy code online?
Choose the language, paste your code and it is tidied straight away. Change the indent, line width or trailing commas and the result updates.
Which languages can it format?
JavaScript, TypeScript, HTML, CSS, Python and SQL. For SQL you can also choose the dialect, such as PostgreSQL, SQL Server or SQLite.
Will it tell me if my code has a mistake?
It flags syntax problems it can find, with the line number, so you can fix them. It formats code; it does not run it.