Code Formatter & Minifier
Use the online code formatter to format or minify HTML, CSS, JavaScript, SQL and XML as you type, turn JSON samples and curl commands into code, and get cron schedules, color codes and gradients right.
Share this page
Code Formatter & Minifier: all 14 tools
Format or minify HTML, CSS and JavaScript
Formatters turn one-line or messy code into indented code you can read and edit, and minifiers do the reverse before you publish. The HTML Formatter keeps inline tags in the text and leaves pre and textarea alone, while the HTML Minifier strips comments and whitespace and shows how much smaller the page got. The CSS Formatter indents nested @media rules, and the CSS Minifier keeps license comments and shortens colors like #ffffff to #fff. The JavaScript Formatter reads strings, template literals and regular expressions correctly, and the JavaScript Minifier removes only comments and whitespace.
SQL, XML and JSON
The SQL Formatter puts each clause and column on its own line for MySQL, PostgreSQL, SQL Server, Oracle and SQLite, with keywords in the case you pick. The XML Formatter checks sitemaps, RSS feeds, SVG and config files with your browser's XML parser and points to the line and column of any error. JSON to Code turns a JSON sample into TypeScript, Java, Go, Python, C#, PHP, Kotlin or Swift types.
APIs, cron jobs and colors
cURL to Code rewrites a curl command as Python, JavaScript, PHP, Go, Java or C#, and the HTTP Request Tester sends GET, POST and other requests to a public API and shows the status, headers and body. The Cron Expression Generator builds and explains schedules and lists the next 10 run times. The Color Converter moves between HEX, RGB, HSL, HSV and CMYK with WCAG contrast checks, and the CSS Gradient Generator writes linear, radial and conic gradients.
What runs where
Every tool on this page except the HTTP Request Tester runs entirely in your browser. Your code is never uploaded, there's no sign-up or daily limit, and the tools keep working offline once the page has loaded. The HTTP Request Tester sends your request from our server when you click, only to public addresses, and stores nothing. It doesn't use your daily tasks, though each visitor has an hourly allowance.