Code Minifier & Beautifier

Minify or beautify JavaScript, CSS, HTML, JSON, XML and SQL.

Support
Works Offline
Privacy First
No Login
No API

Drop a file here

or choose a code file — it is processed in your browser

Conservative transforms: comments and whitespace are removed or re-indented, but nothing is renamed, tree-shaken, or restructured. Always test minified output before shipping it.

Input

Minified output

function greet(name){console.log('Hello, '+name)}
Before
74 B
After
49 B
Saved
33.8%

About the Code Minifier & Beautifier

One tool for compacting or formatting code in JavaScript/TypeScript, CSS, HTML, JSON, XML/SVG and SQL. Comments and whitespace are stripped safely around strings and regular expressions, or the code is re-indented with your chosen indent size. Language is auto-detected from what you paste or drop, and byte-size savings are shown for every run.

Examples

Minify CSS

body {
  color: red;
}

Output

body{color:red}

Beautify JSON

{"a":1,"b":[2,3]}

Output

{
  "a": 1,
  "b": [2, 3]
}

Keyboard shortcuts

  • Copy the main outputCtrl / ⌘ + Shift + C
  • Download the resultCtrl / ⌘ + S
  • Share this toolCtrl / ⌘ + Shift + S
  • Reset the inputsAlt + R
  • Open the tool search paletteCtrl / ⌘ + K

Related tools

Frequently asked questions

Version 2.0.0 · Updated 2026-08-21 · Runs entirely in your browser