How the Code Formatter Works
AnyTool formats code with Prettier (the prettier/standalone browser entry plus per-language parser plugins) for AST-correct output across JavaScript, TypeScript, JSX, CSS, SCSS, LESS, HTML, JSON, JSONC, YAML, Markdown, and GraphQL, and adds dedicated engines for SQL and XML. The language is auto-detected from the input or file extension, options like indent, quotes, semicolons, and print width are configurable, and a js-beautify fallback handles minified or messy code that Prettier would reject, with brace-style control. Plugins load on demand per language.
- Prettier-based formatting across many languages
- SQL and XML via dedicated engines
- Auto-detect language plus manual override
- js-beautify fallback for minified/messy code
- Lazy per-language plugin loading, runs in a Web Worker
