Transform multiple JavaScript files in one operation. Upload .js files, choose a processing mode, and download results. Format beautifies code while preserving comments. Optimize removes comments but keeps formatting. Purify strips console statements and debugger keywords, then compresses output. Minify applies maximum compression by shortening variable names for production. The processor handles each file independently, shows real-time progress, and displays combined statistics including total size reduction across all files.
Drag and drop JS files here
or click to browse
Click the upload area to open a file browser, or drag JavaScript files directly onto the drop zone. The tool accepts any .js file regardless of size or current formatting. Use Ctrl+click to select individual files or Shift+click to select a range in the file dialog. Each selected file appears in the list with its name and original size. Remove individual files by clicking the X button next to each entry, or clear all files with the Clear button at the bottom.
Four processing modes serve different stages of the development workflow. Format expands compressed or messy code into readable form with proper indentation while preserving all comments—useful for debugging minified third-party libraries or reviewing inherited codebases. Optimize removes all comments but keeps formatting and structure intact, creating clean code without documentation overhead. Purify strips debugging artifacts including console.log, console.warn, console.error, debugger keywords, and alert calls, then compresses the output—suitable for staging environments where debugging code should be removed. Minify applies maximum compression by removing whitespace, comments, and shortening local variable names, producing the smallest possible file for production deployment.
After selecting files and a processing mode, click the Process Files button. A progress bar appears showing real-time status as each file is processed. Large files take longer, especially with minification. The tool processes files sequentially to maintain browser responsiveness. All processing happens locally in your browser—no code uploads to external servers. If an error occurs with a specific file, processing continues with remaining files and the error is reported in the final summary.
When processing completes, the Download All button becomes active. Click it to receive all processed files as individual downloads. Each file retains its original name—the tool does not add prefixes or suffixes. Your browser may request permission to download multiple files; approve this request to receive all outputs. Files download one after another with a brief delay between each to prevent browser throttling. Statistics below the buttons show total files processed, combined original size, combined processed size, and overall size reduction percentage.
Format may increase file size by adding whitespace for readability. Optimize typically reduces size 5-15% by removing comments. Purify compresses output after removing debugging code, often reducing size 20-40%. Minify produces the largest reductions, often 40-60% smaller than original code. The size reduction percentage accounts for all files combined, so results with mixed increases and decreases show the net effect. Files that fail to process do not count toward statistics.
Invalid JavaScript syntax causes processing to fail for that specific file. Common issues include missing semicolons in object literals, unclosed string literals, and syntax errors from copy-paste operations. The tool reports which files failed and continues processing valid files. Fix syntax errors in a code editor before reprocessing. Template syntax from frameworks like Jinja2 or Django may cause issues during minification—remove template tags before processing or use Format mode which attempts to preserve them.