How to use it
Paste code into the left compartment, drop a file on it, or press Sample to cycle through examples in every language. With Format on paste on, pasted code is formatted straight away; otherwise press Format or Ctrl + Enter. Changing an option re-formats the current code. Download saves the result with the right extension, using the opened file's name when there is one.
Language notes
- JavaScript, JSX, TypeScript and TSX
- Prettier's Babel and TypeScript parsers. TypeScript is parsed without JSX so
<T>value casts work; pick TSX for components.
- JSON
- Prettier's JSON printer keeps key order and comments. If the JSON is actually broken (single quotes, trailing commas, missing brackets), JSONMender repairs it first.
- HTML, Vue and Markdown
- Scripts, styles and fenced code blocks inside them are formatted too, with the plugin for their language.
- SQL and XML
- Formatted with sql-formatter (standard SQL, upper-case keywords) and FormatBento's own lossless XML printer. Their pages add dialects, keyword case, minifying and attribute wrapping.