Code tools

Beautify HTML, CSS, JavaScript, GraphQL, SQL and XML, minify JavaScript and HTML, and turn curl and docker run commands into code. Nothing is uploaded.

Web 6

Data & markup 2

HTML 4

Convert 1

DevOps 1

Formatting code you did not write

A one-line minified script, a SQL query copied from a log, or HTML exported by a CMS is hard to read and harder to review. The formatters on this page give it the layout a person expects. The JavaScript Formatter, HTML Formatter, CSS Formatter and GraphQL Formatter use Prettier, the same formatter many teams run in their editor and in CI, so the result matches what your project would produce. The HTML formatter also formats the CSS and JavaScript inside <style> and <script>.

The SQL Formatter asks for a dialect, because dialects differ in what the formatter must recognize: SQL Server quotes names with [brackets], MySQL with backticks, and placeholders may be written $1, ?, @p1 or :name. Pick the database the query runs on. The XML Formatter checks that the document is well-formed as well as indenting it, and keeps comments, CDATA sections and the order of attributes.

Minifying, and checking what it saves

The JavaScript Minifier runs Terser and shows two sizes: the minified file and the same file after gzip, which is roughly what a browser downloads from a server that compresses its responses. The second number is the one that matters for page speed. The HTML Minifier only removes whitespace that the browser would not render: the content of <pre> and <textarea> is kept byte for byte, and inline scripts and styles are left alone unless you ask to minify them too.

Turning one format into another

Developers copy commands and markup between tools all day, and rewriting them by hand invites mistakes. cURL to Code turns a curl command, for example one copied from the browser’s network panel with Copy as cURL, into JavaScript fetch, Node.js axios, Python requests or Go, with the same headers, body and redirect behavior. Docker Run to Compose turns a long docker run line into a compose.yaml you can commit.

For HTML content, HTML to Markdown gives you text you can paste into a README or a wiki, HTML to Text keeps only what a reader sees, with paragraphs and lists still laid out, and HTML Table to CSV pulls the tables out of a page as CSV, TSV or JSON.

Your code stays on your machine

Source code is often under an agreement that forbids sharing it, and a query may contain table names or values that should stay inside the company. These formatters run in the page: Prettier, Terser and the SQL formatter are loaded into your browser, and the code you paste is never sent anywhere.