JavaScript Beautifier
Your workspaceProcessed on your device
A few things to know.
Input can contain up to 1,000,000 UTF-16 code units. Local files must be valid UTF-8 and at most 4 MiB. Uses the Babel parser and Prettier formatting rules. Output uses LF line endings. Print width guides wrapping and long tokens can exceed it.
- Paste JavaScript or choose a local source file.
- Choose the indentation and preferred print width, then select Format JavaScript.
- Read the formatted source and copy it or download formatted.js.