WHAT IT DOES
Put modern JavaScript into a readable shape.
Format JavaScript locally with the bundled Prettier Babel parser. Async functions, modules, optional chaining, nullish coalescing, classes, arrow functions, template literals, and destructuring are handled as source text, never executed code.
Why use it?
Use it to make JavaScript source consistent for reading and review without executing the program.
How to use this tool
- Paste JavaScript source and choose indentation.
- Format the source or use the available compact-output action, then inspect the result and any parser errors.
- Run your project's type checker and tests separately. Formatting does not resolve imports, prove correctness, or replace a production bundler.
Details and limitations
- Choose two spaces, four spaces, or tabs from the shared picker; the formatter keeps the setting outside the source so the result is deterministic.
- The visible formatter uses the Babel JavaScript parser and reports parser errors with a line and column where available; it does not expose a TypeScript mode.
- JSX is intentionally not advertised in this first version; use the plain JavaScript parser for supported ECMAScript syntax and a project formatter for framework-specific transforms.