Code Formatters

Beautify or minify markup, style sheets, scripts, SQL and config files in over 30 languages.

All tools in Code Formatters

37 tools
XML Formatter Indent XML, SVG and RSS and check that they are well formed. HTML Beautifier Indent HTML so the nesting of tags is easy to follow. SQL Formatter Break long SQL queries into lines and capitalise the keywords. CSS Beautifier Put each CSS rule and property on its own line with even indentation. JavaScript Beautifier Format minified or messy JavaScript with consistent indentation. CSS Minifier Remove comments and whitespace from CSS to make the file smaller. JavaScript Minifier Shrink JavaScript by removing comments, whitespace and line breaks. HTML Minifier Remove comments and extra whitespace from HTML. YAML Formatter Re-indent YAML and make quotes and lists consistent. XML Minifier Remove whitespace between XML tags and comments. SQL Minifier Put an SQL query on one line without comments. TypeScript Formatter Format TypeScript with consistent spacing and line breaks. PHP Formatter Indent PHP code and align braces in the PSR-12 style. Python Formatter Reformat Python code with PEP 8 spacing and line lengths. Java Formatter Indent Java classes and methods and tidy their braces. C# Formatter Format C# code with consistent indentation and brace style. C/C++ Formatter Indent C and C++ source and header files. SCSS Formatter Format SCSS with nested rules on their own lines. LESS Formatter Format LESS style sheets with even indentation. Go Formatter Format Go code the way gofmt does. Swift Formatter Indent Swift code and tidy its spacing. Kotlin Formatter Indent Kotlin code and tidy its spacing. Objective-C Formatter Indent Objective-C source files and align their brackets. Rust Formatter Format Rust code with standard indentation. Dart Formatter Format Dart and Flutter code with standard indentation. Ruby Formatter Indent Ruby code blocks consistently. Perl Formatter Indent Perl scripts and tidy their spacing. Lua Formatter Indent Lua scripts consistently. Shell Script Formatter Indent Bash and sh scripts, loops and functions. GraphQL Formatter Indent GraphQL queries, mutations and schemas. Protobuf Formatter Format .proto files with aligned fields. TOML Formatter Tidy TOML tables and align keys and values. INI Formatter Tidy INI and CFG files: sections, keys and spacing. Nginx Config Formatter Indent nginx configuration blocks and directives. CSV Formatter Fix quoting and line endings so every CSV row has the same number of fields. TSV Formatter Tidy tab-separated data and align its columns for reading. JSON Lines Formatter Check and tidy JSON Lines, one object per line.

Related conversions

Conversions of whole files have their own pages, with the programs that do the same on your computer.

Questions about these tools

Which file formats do these tools work with?

Mostly .html, .svg, .xml, .h, .sql and .js. Each tool page lists the formats it reads and links to the page about each extension.

Do I need to install a program?

No. Open a tool, add your file or text and save the result.