Configurable Prettier
JavaScript formatting supports print width, indentation, semicolons, quotes, trailing commas, bracket spacing, and arrow parens.
width 80 / 2 spaces / semicolons / double quotes / trailing es5 / bracket spaces / arrows always
Input
Output
Formatted output will appear here.
Paste or import JavaScript above and click Prettify to reformat it with consistent indentation and spacing — free, in your browser, with nothing uploaded to a server. Powered by Prettier.
JavaScript formatting supports print width, indentation, semicolons, quotes, trailing commas, bracket spacing, and arrow parens.
This is formatting, not linting or execution. Syntax must parse as JavaScript before Prettier can rewrite it.
Need to convert Markdown instead? Try the free Markdown to Word/HTML/PDF converter.
Need to run some numbers? Try the free online calculators.
Paste your code, adjust Prettier options if needed, then click Prettify to reformat spacing, quotes, semicolons, trailing commas, and arrow parens.
Yes — pasting a minified one-liner and prettifying it will expand it back into readable, indented code.
No. The formatter runs entirely in your browser.
JSON formatter · TypeScript formatter · CSS formatter · YAML formatter · C formatter · C++ formatter · VBScript formatter
We use cookies to show ads via Google AdSense. See our Privacy Policy for details.