JS Minifier
Minify JavaScript, TypeScript or JSX in your browser, and turn code or a GitHub Gist into a bookmarklet.
{{ currentSource.help }}
Drop scripts or folders here, or open them above.
JavaScript, TypeScript and JSX files are minified with the options below. node_modules, hidden folders, .min.js and .d.ts files are skipped.
| File |
Size |
Minified |
Saved |
Actions |
|
{{ row.path }}
→ {{ minifiedName(row.path) }}
{{ row.error }}
|
{{ formatBytes(row.inputBytes) }} |
{{ formatBytes(row.outputBytes) }}
|
−{{ Math.max(0, Math.round((1 - row.outputBytes / row.inputBytes) * 100)) }}%
|
|
Drop scripts or folders to add them
{{ gistError }}
{{ gist.description || 'Untitled Gist' }}
by {{ gist.owner }} · {{ gistFileNames.length }} {{ gistFileNames.length === 1 ? 'file' : 'files' }}
{{ check.text }}
{{ error.title }}
{{ error.message }}
{{ error.frame }}
{{ busyText }}
{{ emptyText }}
{{ batchFiles.length.toLocaleString() }} {{ batchFiles.length === 1 ? 'file' : 'files' }}
Input {{ formatBytes(batchTotals.inputBytes) }}
Minified {{ formatBytes(batchTotals.outputBytes) }}
−{{ Math.max(0, Math.round((1 - batchTotals.outputBytes / batchTotals.inputBytes) * 100)) }}%
{{ batchErrorCount }} couldn’t be minified
{{ batchSkipped }} skipped
Sizes appear here.
Input {{ formatBytes(result.inputBytes) }}
Minified {{ formatBytes(result.minifiedBytes) }}
{{ savings >= 0 ? '−' : '+' }}{{ Math.abs(savings) }}%
Gzipped {{ formatBytes(result.gzipBytes) }}
Bookmarklet {{ bookmarklet.length.toLocaleString() }} characters
{{ result.ms }} ms
Some browsers won’t save bookmarks this long. Try the Gist loader instead.
{{ busyText }}
Sizes appear here.
Options
{{ optionsSummary }}