Search and jump to any tool. Type to filter; use arrow keys to move and Enter to select.
The JS minifier shrinks JavaScript by removing comments, whitespace and line breaks.
The JS minifier shrinks JavaScript by removing comments, whitespace and line breaks. It reads the code as tokens, so strings, template literals and regular expressions are left untouched, and it keeps a line break wherever automatic semicolon insertion depends on it. It does not rename variables or restructure code, which makes it a safe fit for bookmarklets, inline snippets and tracking tags.
// fetch the page
const url = 'https://example.com/a';
const n = total / count; // average
function show(x) {
return `Value: ${x}`;
}
show(url)const url='https://example.com/a';const n=total/count;function show(x){return`Value: ${x}`;}show(url)Good to know. There is no full parser behind this, so a slash after a closing parenthesis is always read as division, which misreads the rare case of a regular expression right after an if condition. For a production bundle, use a build-time minifier and treat this page as a quick helper.