DataToolsLab

Code Formatter Tools

Beautify minified code, shrink a stylesheet or a script for production, check what a CSS selector actually matches, or move a query between MySQL, PostgreSQL and SQLite. Every parser here is written from the language specifications and runs in the page, so nothing you paste is uploaded and the tools keep working offline.

Most popular

Format & Minify

SQL

CSS Analysis

Structure & Utilities

All tools

About Code Formatter Tools

Reading code you did not write is most of the job: a minified bundle, a stylesheet from a template, a query inherited from another team. This category does that work locally — HTML, CSS, SQL, JavaScript, TypeScript, Python, shell and GraphQL are tokenized by hand-written parsers, so a format or a minify pass never touches a string literal, a template literal, a regular expression or a comment that was part of the data. Alongside the formatters are the analysers that answer the harder questions: which CSS selector matches this markup, how does the cascade score it, what does 1.5rem mean at this root size, which prefixes do the browsers you support still need, and what exactly is wrong with this HTML nesting. Nothing is uploaded, no code is evaluated, and every tool works with the network switched off.

Related categories

Frequently asked questions

What is a code formatter?

A formatter rewrites only the layout of a source file — indentation, line breaks, spacing and quoting — without changing what the code does. Minifiers do the opposite: they remove everything the compiler or browser does not need. Both are safe in a strict sense only if the tool understands the language, which is why these pages tokenize instead of pattern-matching.

Is it safe to paste proprietary code into these tools?

The code never leaves your browser: the tokenizers are plain TypeScript running in the page, there is no upload step and no network call. That said, the page is still a web page — if your policy forbids pasting code into websites at all, save the page and use it offline, where it behaves identically.

Why do these tools not use a real compiler or a library like Prettier?

Because a browser-first formatter should not need a build step, and because the honest behaviour matters more than the last few percent of canonical output. Hand-written tokenizers let each page state exactly what it does and does not change — for example that Python line wrapping or JSX reflow are outside scope — instead of quietly rewriting your source through a parser you cannot inspect.

Will minifying break my code?

These minifiers never rename identifiers, reorder statements or remove functions, so the risk is much lower than with a bundler-style minifier. The one genuine hazard is automatic semicolon insertion, which the JavaScript Minifier handles by keeping the newlines that matter (after return/throw/break/continue and before a token that could continue the statement). Re-run your tests against the minified file anyway.

Which SQL dialects and which languages are covered?

SQL formatter and dialect converter: MySQL, PostgreSQL and SQLite. Formatters: HTML, CSS, SQL, JavaScript, TypeScript, Python, shell (sh/bash/zsh) and GraphQL. Comment stripping adds the same set, and the escaping tool covers JavaScript, TypeScript, Python, Java, C#, Go, JSON, SQL and shell.

Online