Web Dev

JS Minifier

Minify or beautify JavaScript code.

How to use it

  1. Open Devly from the wrench in your menu bar, or press ⌃⌥⌘D. Press ⌘P, type JS Minifier and press Return.
  2. Choose Minify or Beautify at the top.
  3. Paste or type your text into Input.
  4. Adjust the Options on the right if you need to. The defaults are listed below.
  5. Press Minify, or ⌘↵.
  6. To go the other way, press Swap or ⌘S. The output moves into the input.
  7. Use Copy or ⇧⌘C to copy the result. ⌘L clears everything.

Options

OptionValuesDefault
Indent SpacesIndentation for beautify mode1–82
Remove commentsStrip JavaScript commentsOn or offOn
Remove console.logRemove console.log statementsOn or offOff

Example

Real output from Devly, with the default options.

Input
function greet(name) {
  // Say hello
  const message = `Hello, ${name}!`;
  console.log(message);
  return message;
}

greet('Devly');
function greet(name){const message=`Hello, ${name}!`;console.log(message);return message;}greet('Devly');

From Terminal

With the free command-line tool installed:

Terminal
devly js --path input.txt
# or pipe text in
pbpaste | devly js

Quick Switch also finds it by: javascript, js, minify, beautify, compress, uglify.

More Web Dev tools