Formatters
19 free tools · 100% client-side
One-click code formatters for JSON, JSON5, XML, HTML, YAML, JavaScript, TypeScript, CSS, GraphQL, Markdown, and more.
Start here
Most-used Formatters
C# Formatter
Instant structural beautification for C# — paste any fragment, get readable indentation back.
Java Formatter
Fast structural beautification for Java — braces aligned, nesting indented, readable in one click.
SQL Formatter
Turn one-line query soup into clause-aligned, review-ready SQL — dialect-aware for MySQL, Postgres, T-SQL and SQLite.
All 19 Formatters
JavaScript Formatter
The formatter your CI runs, in a browser tab — prettier-consistent JavaScript in one click.
JSBeautifier
The classic js-beautify engine — the fastest way to make minified JavaScript readable again.
TypeScript Formatter
Prettier for TypeScript — generics, decorators and annotations formatted the way your repo expects.
Babel Formatter
Prettier's Babel parser — the most syntax-tolerant way to format modern and experimental JavaScript.
Flow Formatter
Prettier with the Flow parser — annotations and Flow-specific syntax formatted without a fight.
GraphQL Formatter
Canonical GraphQL style for queries, mutations, fragments and full SDL schemas.
Markdown Formatter
Canonical CommonMark style — lists, headings, emphasis and tables normalized in one pass.
MDX Formatter
Markdown prose and JSX components formatted together — the docs-site author's cleanup pass.
Angular Formatter
Template-aware formatting for Angular — *ngFor, bindings, pipes and @if blocks handled as syntax, not text.
Vue JS Formatter
Single-file components formatted block by block — template, script setup, and style each by the right engine.
Glimmer JS Formatter
Canonical .hbs formatting — mustaches, block helpers and angle-bracket components, the Ember way.
LWC Formatter
Lightning Web Component templates formatted with their own parser — directives and bindings understood.
PHP Formatter
PSR-flavored PHP formatting in the browser — classes, closures, arrays and match expressions done right.
Java Formatter
Fast structural beautification for Java — braces aligned, nesting indented, readable in one click.
C# Formatter
Instant structural beautification for C# — paste any fragment, get readable indentation back.
SQL Formatter
Turn one-line query soup into clause-aligned, review-ready SQL — dialect-aware for MySQL, Postgres, T-SQL and SQLite.
LESS Formatter
Prettier for LESS — @variables, mixins and nested rules in canonical style.
SCSS Formatter
Prettier for SCSS — the formatting your Sass codebase's CI expects, in a browser tab.
TOML Formatter
Validate TOML with exact error positions and your comments intact, or normalize it into a canonical layout — the two are deliberately different modes.
Learn more
Real engines, not regex tricks
Every formatter on this hub is backed by the engine the ecosystem actually uses: prettier for JavaScript, TypeScript, CSS, GraphQL, Markdown and framework dialects (Vue, Angular, Glimmer, LWC, MDX), js-beautify for forgiving beautification of minified or partial code, php-prettier for PHP, sql-formatter for SQL dialects, smol-toml for TOML, plus native parsers for JSON, JSON5, XML and YAML. Output here matches what your repo's tooling would produce — formatted snippets drop into a codebase without style churn.
Because formatting requires parsing, every formatter doubles as a syntax checker with exact line/column errors. That makes the paste-format-read loop the fastest way to triage code from logs, chat, Stack Overflow, or a decompiler: either it formats — readable — or it tells you precisely where it breaks.
Formatter or beautifier?
Two philosophies, both available: formatters (prettier-based) parse fully and emit one canonical style — strict, consistent, ideal for code you'll commit. Beautifiers (js-beautify-based) work token-by-token and tolerate code that doesn't fully parse — ideal for unminifying production bundles, trimming fragments, and dialects strict parsers reject. The JavaScript family offers both so you can pick per situation; most other languages get the strict treatment by default.
Help
Frequently asked questions
Everything you need to know about the Formatters.
01Will a formatter ever change what my code does?
No — formatting rewrites whitespace, line breaks, and stylistic punctuation while preserving the parse tree. The formatted program is semantically identical; that guarantee is why teams auto-format entire codebases on every commit.
02Why do you offer both a JavaScript Formatter and JSBeautifier?
Different jobs: the Formatter (prettier) enforces canonical style but requires valid syntax; JSBeautifier re-indents nearly anything, including minified bundles and partial fragments mid-debugging. Strict for committing, forgiving for reading.
03Can I set indentation and style options?
Each formatter exposes the options that matter for its language — indent width (2/3/4/tab), and per-language toggles like keyword case for SQL. Deliberately minimal: the value of canonical formatters is fewer decisions, not more.
Learn the format
Guides for formatters
TOML vs YAML vs JSON: Choosing a Configuration Format
TOML, YAML and JSON compared for configuration files: comments, types, nesting, dates, tooling and the ecosystems that chose each — with a decision guide and conversions.
6 min readGuide · Developer ToolsHow to Escape a Single Quote in SQL
How to escape a single quote in SQL: the ANSI doubling rule, MySQL backslashes, Postgres dollar quoting, Oracle q-strings, LIKE patterns and binding.
9 min readGuide · Developer ToolsEscaping vs Parameterised Queries
Why escaping quotes does not stop SQL injection: numeric contexts, LIKE, identifiers, second-order attacks, and how prepared statements close the hole.
8 min readGuide · Developer ToolsFreeFormatter Alternatives (2026): Where Its Tools Went
FreeFormatter.com has been retired and its tool pages now return 404. A verified map of where each formatter, validator, escaper and encoder moved.
6 min readGuide · Web & APIsSass vs SCSS vs LESS vs Stylus: Choosing a CSS Preprocessor
How Sass, SCSS, LESS and Stylus differ in syntax and modules, what native CSS nesting and custom properties replaced, and how to migrate between dialects.
9 min readTutorial · Data FormatsHow to Convert CSV to JSON in JavaScript, Python and the Browser
Tested CSV to JSON code for Node (papaparse) and Python (csv.DictReader), plus type inference, nested output, streaming, and the trip back to CSV.
7 min read