Format & Minify

Formatters and minifiers paired by language: HTML, CSS, JS, JSON, SQL, XML and YAML each have a version that indents and one that strips whitespace and comments. JSON adds recursive key sorting for diffing two payloads whose fields came back in a different order. Invalid input reports the error position instead of silently emitting broken output.

14 online toolsAll tools
JSON Formatter

JSON Formatter

Uses the browser's native JSON API to format and minify, with optional key sorting and custom indentation. Everything runs locally.

CSS Minifier

CSS Minifier

Strip CSS comments and whitespace, or format with 4-space indentation. Everything runs locally in your browser.

HTML Formatter

HTML Formatter

Formats HTML with the js-beautify library and configurable indentation. Everything runs locally in your browser.

HTML Minifier

HTML Minifier

Removes HTML comments, whitespace between tags and redundant spaces. Everything runs locally in your browser.

JavaScript Formatter

JavaScript Formatter

Formats JavaScript with js-beautify. Your code is never executed and never leaves the browser.

JavaScript Minifier

JavaScript Minifier

Removes JS comments and redundant whitespace. Basic minification only — variables are not renamed. Everything runs locally.

JSON Key Sorter

JSON Key Sorter

Recursively sorts every JSON key in ascending order, including nested objects and arrays. Everything runs locally.

JSON Minifier

JSON Minifier

Removes every space and newline while validating: malformed JSON errors instead of producing broken output.

SQL Formatter

SQL Formatter

Formats SQL with the sql-formatter library, supporting several dialects. Everything runs locally in your browser.

SQL Minifier

SQL Minifier

Compresses SQL onto one line and strips comments while leaving string literals untouched.

XML Formatter

XML Formatter

Detects XML nesting and indents it, 2 spaces by default. Everything runs locally in your browser.

XML Minifier

XML Minifier

Removes whitespace between XML tags and collapses redundant spaces. Everything runs locally.

YAML Formatter

YAML Formatter

Normalises YAML indentation and alignment while keeping comments and key order.

YAML Minifier

YAML Minifier

Removes YAML comments and blank lines while keeping the content. Everything runs locally in your browser.

Other categories

All tools