Format JavaScript
Format valid JavaScript with two-space indentation.
Local processing · Nothing is uploaded · 1 MB input limit
Input & settings
Ready. Enter your input to begin.
How to use this tool
Paste your source, choose the supported options, then process. Inspect or download the complete result.
Limits and behavior
Parses JavaScript as an ECMAScript module. JSX and TypeScript are not supported. No code is evaluated. Maximum total input 1 MB, output 3 MB, JSON nesting 64 levels. Processing stays in your browser worker. Input is limited to 1 MB and output to 3 MB. No input content is saved by CraftAI.
Prettify JavaScript code
Format valid JavaScript syntax into readable indented code for reviewing and debugging.
Will formatting correct invalid JavaScript automatically?
No. Syntax must be valid; the tool does not rewrite program logic or repair arbitrary errors.
Related tools: minify javascript · format json