{ } tools.dcln.me

tools / code

Code tools.

Beautify or minify code locally — JavaScript, TypeScript, CSS, HTML, JSON, SCSS, LESS, Markdown, YAML, GraphQL, Vue, SQL. Powered by prettier, sql-formatter, terser, and csso.

Format code with consistent whitespace and quotes. Powered by prettier (JS/TS/CSS/HTML/Markdown/YAML/GraphQL/Vue) and sql-formatter (SQL).

FAQ

Why is the JS minifier so big?
Terser is ~400KB minified — the price of a real AST-based minifier with dead-code elimination, name mangling, and the parser to support modern JavaScript. We lazy-load it, so it only downloads when you actually run Minify on JS or TS. Faster shallow alternatives exist but they don't produce competitive output.
Does the TypeScript minifier strip types?
No — terser doesn't speak TypeScript. We treat .ts input as JS, which works for files where types have already been stripped, or for TS-flavoured JS that happens to be valid both ways. To minify real TypeScript, transpile first with tsc, swc, or esbuild, then paste the JS output here.
Is my code uploaded anywhere?
No. Prettier, terser, csso and sql-formatter all run in your browser. Open the network tab while you format — you'll see one-time downloads of the relevant language parsers when you first use them, then nothing else.
Can I configure prettier options?
Right now you can set indent (2 or 4 spaces). The rest is prettier's defaults. We can expose more (printWidth, quote style, semicolons, etc.) if there's demand — open an issue on GitHub.
Why is HTML minify so cautious?
We use a small regex-based collapser instead of html-minifier-terser, which would add another ~200KB. It strips comments and collapses inter-tag whitespace while leaving <pre>, <textarea>, <script>, and <style> contents alone. That's safe but conservative — for maximum compression, run html-minifier-terser at build time.