Paste your JavaScript code to minify.
Removes /* comments */ and // lines.

🚀 Unlock Bulk Processing

Process up to 500 files at once with a Pro subscription!

Upgrade Now
📁

Drop CSV file here or click to browse

Maximum 10 rows per file

Required columns: js_input

-
File Name
-
Rows
-
File Size
0%

JavaScript Minifier Compress and optimize your JavaScript code instantly. Remove unnecessary whitespace, comments, and line breaks to reduce file size and improve website loading speed. Quick Start

Paste your JavaScript code into the text area Check the options - Enable "Remove Comments" to strip out all comments Click "Minify JavaScript" to compress your code Copy the result - Your minified code is ready to use!

Features Free Features

Instant Minification - Compress JavaScript code in milliseconds Comment Removal - Strip out single-line and multi-line comments Whitespace Optimization - Remove unnecessary spaces and line breaks ES5/ES6 Support - Works with modern JavaScript syntax Size Statistics - See exactly how much space you saved Direct Copy - Copy minified code with one click

Pro Features

Bulk Processing - Minify up to 500 files at once via CSV upload History Tracking - Access your previous minifications anytime Advanced Statistics - Detailed compression analytics API Access - Integrate minification into your workflow Priority Support - Get help when you need it

How to Use Single File Minification

Open the JavaScript Minifier tool Paste or type your JavaScript code into the input area Choose whether to remove comments (recommended for production) Click the "Minify JavaScript" button View the compression statistics showing size reduction Copy the minified code using the "Copy Code" button Use the minified code in your production website

Bulk Minification (Pro)

Prepare a CSV file with a column named "js_input" Add your JavaScript code in each row Upload the CSV file to the bulk processor Wait for processing to complete Download results in CSV or JSON format

FAQ Q: Will minification break my JavaScript code? A: No. Minification only removes formatting and comments while preserving functionality. However, always test minified code before deploying to production. Q: Does this work with ES6/ES2015 syntax? A: Yes! The minifier supports modern JavaScript including arrow functions, template literals, destructuring, and other ES6+ features. Q: What's the difference between minification and obfuscation? A: Minification reduces file size by removing whitespace and comments. Obfuscation makes code harder to read by renaming variables. This tool focuses on minification for performance optimization. Q: Can I minify multiple files at once? A: Yes! Pro users can upload CSV files containing multiple JavaScript snippets and process them in bulk - up to 500 files per batch. Q: Will removing comments affect my code? A: No. Comments are for developers and are not needed for code execution. Removing them reduces file size without affecting functionality. Q: How much can I reduce file size? A: Typical compression ranges from 20-60% depending on your code's formatting and comment density. Well-commented code with lots of whitespace will see the highest reduction. Examples Example 1: Basic Function Minification Input: javascriptfunction calculateTotal(price, quantity) { // Calculate the total price const total = price quantity; return total; } Output: javascriptfunction calculateTotal(price,quantity){const total=pricequantity;return total;} Savings: ~40% reduction Example 2: Object with Comments Input: javascriptconst config = { // API endpoint apiUrl: 'https://api.example.com', // Timeout in milliseconds timeout: 5000 }; Output: javascriptconst config={apiUrl:'https://api.example.com',timeout:5000}; Savings: ~35% reduction Example 3: Complex Function Input: javascriptfunction processData(data) { if (!data || data.length === 0) { return []; } return data.map(item => { return { id: item.id, name: item.name.toUpperCase() }; }); } Output: javascriptfunction processData(data){if(!data||data.length===0){return[];}return data.map(item=>{return{id:item.id,name:item.name.toUpperCase()};});} Savings: ~45% reduction CSV Format for Bulk Processing For bulk minification, create a CSV file with this format: csvjs_input "function test() { console.log('hello'); }" "const x = 5; // comment" "function add(a, b) { return a + b; }" The CSV must have a header row with "js_input" column. Each row should contain JavaScript code in quotes if it contains commas or special characters. Troubleshooting Problem: Minified code doesn't work Solution: Check for syntax errors in your original code. The minifier assumes valid JavaScript input.

Problem: CSV upload fails Solution: Ensure your CSV has the correct header "js_input" and doesn't exceed row limits (10 for free, 500 for Pro).

Problem: Processing takes too long Solution: Large files may take a few seconds. For files over 10KB, consider splitting into smaller chunks.

Problem: Getting "Daily limit reached" error Solution: Free accounts have a daily limit. Sign in or upgrade to Pro for unlimited access. Best Practices

Always test minified code before deploying to production Keep original source files - minified code is for production only Use version control - Commit original files, not minified versions Minify before deployment - Include minification in your build process Combine with gzip - Use both minification and server compression for best results

Technical Details

Algorithm: Uses rjsmin for accurate ES5/ES6-compatible compression Character Limit: 50,000 characters per file Processing Speed: Typically under 100ms per file Supported Syntax: ES5, ES6, ES2015+, JSX (basic)

Usage Limits

Plan Daily Limit Best For