Code Formatter
Format or minify JSON, JavaScript, TypeScript, HTML, CSS, XML, YAML, SQL, or Markdown. Choose a language, set indent style and size below, then paste code. Invalid input will show an error.
Format or minify JSON, JavaScript, TypeScript, HTML, CSS, XML, YAML, SQL, or Markdown. Choose a language, set indent style and size below, then paste code. Invalid input will show an error.
Consistent formatting makes code easier to read, review, and maintain. You paste minified JSON from an API response, or messy SQL before sharing it with a teammate, and the formatter cleans it up. You skip the style arguments. Nine languages in one tool.
Pick the language from the dropdown, paste your code, and it formats instantly. You can switch between spaces and tabs, adjust indent size, or minify instead of prettifying. If there's a syntax error, the tool shows you where it is. Works great for JSON validation too - paste in a blob and the formatter will either clean it up or tell you exactly what's wrong.
JSON, JavaScript, TypeScript, HTML, CSS, XML, YAML, SQL, and Markdown. Each language uses a parser tuned for that syntax, so you get accurate formatting and useful error messages. JSON formatting also doubles as a validator. SQL formatting handles most common dialects.