Skip to content
Devbench

Text & Code Minifier

Minify text, JSON, CSS, HTML and JavaScript, with automatic language detection.

Input

Language

Processed locally in your browser. Max 1 MB.

Minified output

Nothing to minify yet

Paste something above, or try the sample.

How to use

  1. Paste your text or code — the language is detected automatically, or pick it yourself.
  2. The output updates instantly as you type.
  3. Fine-tune options such as removing empty lines, shortening variable names or keeping license comments.
  4. Copy the minified result or download it as a file.

Frequently asked questions

What does minifying do?

It removes characters that aren't needed — whitespace, line breaks and comments — and, for JavaScript and CSS, rewrites code into a shorter equivalent. The result behaves the same but loads faster.

Which engines are used?

JavaScript is minified with Terser and CSS with CSSO, the same tools used by many build pipelines. JSON is re-serialized without whitespace, and HTML uses a conservative whitespace and comment remover.

Is the HTML minifier safe?

It keeps the content of <pre> and <textarea> intact, preserves conditional comments and only removes whitespace where it cannot affect layout. Always check the result for pages that rely on CSS white-space rules.

Is my code sent to a server?

No. Minification happens entirely in your browser.

CSS

CSS Gradient Generator

Build linear and radial gradients with multiple color stops and copy the CSS.

Image

Image Optimizer

Compress and convert PNG, JPG, WebP, AVIF, GIF and SVG images in your browser.

Text

Text Diff Checker

Compare two texts and see added, removed and changed lines with word-level highlights.

Image

Image to Text (OCR)

Extract text from screenshots, photos and scanned images with OCR, right in your browser.