Code formatters and validators
6 tools · free · no sign-up
Paste messy or minified code and get it back readable, with consistent indentation, or compress it to the smallest size for production. The JSON formatter also validates, and points to the exact line and column of an error. The Markdown editor shows the rendered page as you type.
The code you paste is handled in your browser. That is useful when it contains API responses, configuration or customer data that should not be posted to a stranger's server.
- JSON Formatter & ValidatorFormat, validate and minify JSON in your browser. Shows the exact line and column of any error.
- HTML Formatter & MinifierBeautify messy HTML with clean indentation, or minify it to cut file size. Runs in your browser.
- CSS Formatter & MinifierBeautify CSS with consistent indentation, or minify it to reduce size. Reports CSS syntax problems. Runs in your browser.
- JavaScript Formatter & MinifierBeautify JavaScript with clean indentation, or minify it with a real compressor. Shows syntax errors with line and column.
- SQL Formatter & MinifierFormat SQL queries for MySQL, PostgreSQL, SQL Server and more, or minify them. Runs in your browser.
- Markdown Editor & Live PreviewWrite Markdown with a live preview, toolbar and shortcuts, then copy or download it as Markdown or HTML.
Frequently asked questions
What is the difference between formatting and minifying?
Formatting (beautifying) adds line breaks and indentation so that people can read the code. Minifying removes what a computer does not need, such as spaces and comments, to make the file smaller.
Will formatting change what my code does?
Formatting changes whitespace and layout, not the meaning. It should be safe, but run your tests after minifying code before you ship it.
Is the code I paste sent anywhere?
No. The formatting is done in your browser, so your code is not sent to our server.
Why does my JSON show an error?
Common causes are a trailing comma, single quotes instead of double quotes, or a missing bracket. The JSON formatter shows the line and column where parsing stopped.