Code Minifier & Beautifier

Minify or beautify JavaScript, CSS, HTML, JSON, XML, SQL, Java, Kotlin, C#, C/C++, Go, Swift, PHP, Python and YAML.

Support
Works Offline
Privacy First
No Login
No API

About the Code Minifier & Beautifier

One tool for compacting or formatting code in JavaScript/TypeScript, CSS, HTML, JSON, XML/SVG, SQL, Java, Kotlin, C#, C/C++, Go, Swift, PHP, Python and YAML. Comments and whitespace are stripped safely around strings and regular expressions, or the code is re-indented with your chosen indent size. Brace languages keep their line breaks so statements stay valid, and indentation-sensitive languages like Python and YAML never have their indentation changed. Language is auto-detected from what you paste or drop, and byte-size savings are shown for every run.

Examples

Minify CSS

CSSbody {
  color: red;
}

Output

CSSbody{color:red}

Beautify JSON

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

Output

JSON{
  "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

Read more

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