How it works
Formats JavaScript indentation and line breaks with Prettier's Babel and ESTree plugins at a 100-column print width. It does not run the code.
Format JavaScript code without running it.
const total=1+2
const total = 1 + 2;
Formats JavaScript indentation and line breaks with Prettier's Babel and ESTree plugins at a 100-column print width. It does not run the code.
Paste compact source, run the formatter, and copy the laid-out result for review or sharing.
The source must parse as JavaScript. Formatting is not type checking or runtime validation. If parsing fails, inspect brackets, quotes, and missing input.
No. It only formats source text.
The input area shows the accepted format and available controls for this tool.
No. Your input is handled in the browser you are using. Privacy