Media tools are next. Everything ships the same way: it runs in your tab, or it does not ship.
Formatters & validators
Pretty-print and validate JSON, XML, YAML and SQL in one paste. Broken input gets the exact line, column and character marked instead of a shrug. Formatting happens in your browser tab, so an API response full of customer data never leaves your machine.
4 tools. All in your browser.
Nothing you paste is uploaded, and once a tool has loaded it keeps working offline. Free, no signup.
Data and config formats
3 tools
All three parse before they print, so a broken file gets an error with line, column and a code frame rather than a red cross. The YAML and XML formatters work over the document tree instead of parse-and-dump, which is why your comments, anchors, CDATA sections and the DOCTYPE are still there afterwards. Most competing tools lose them.
For the one-line query you pulled out of a slow-query log or an ORM debug output. There is no dialect to pick: Postgres casts, MySQL backticks and BigQuery structs are recognised from the query text, and a query that will not tokenise one way is retried the others.
The parsers ship with the page, so a tool keeps working after you go offline.
Instant, as you type
Every tool runs the moment you type. No run button, no waiting, nothing to install.
Free forever, no signup
No account, no paywall, no trial that expires. All 70+ tools, free for everyone.
Why the error message matters more than the indentation
You rarely paste a file into a formatter because the whitespace offends you. You paste it because something is wrong and the wall of text will not say where. Browsers do not even agree on how to phrase the problem: Chrome reports at position 412, Firefox reports at line 12 column 7, Safari reports neither. Our formatters read all of those shapes and work out the missing half themselves, so the error looks the same wherever you are.
Editor plugin or web page?
For files inside a project, Prettier in a pre-commit hook wins, because it also settles the argument about style. A web page wins for everything that is not in a project: a webhook payload from Stripe, a config a client mailed you, a response copied out of the network tab. Nothing to install, and it keeps working after you disconnect the wifi.
Formatting questions that outlive one file
What is the difference between a formatter, a linter and a validator?
A formatter only changes how the text looks and never what it means; a validator answers whether the document is well-formed or matches a schema; a linter judges style and likely mistakes, which is a matter of opinion. The order in a pipeline is usually validate, then format, then lint, because a linter that runs before formatting reports failures that formatting was going to fix anyway. Prettier and gofmt are formatters, jsonlint and xmllint do validation, ESLint and sqlfluff are linters that happen to also rewrite.
How do I format JSON, XML or SQL in VS Code?
Shift+Alt+F on Windows and Linux, Shift+Option+F on macOS, which runs the Format Document command with whatever formatter is registered for that language. JSON, JSONC and HTML ship with the editor. XML and SQL do not: they need an extension, and the SQL ones disagree on keyword casing so it is worth pinning one in .vscode/extensions.json for the repo. If nothing happens, the status bar language mode is usually set to Plain Text.
Does Prettier support YAML, XML and SQL?
YAML yes, since Prettier 1.14, and it is enabled by default for .yaml and .yml. XML and SQL both need community plugins (@prettier/plugin-xml and prettier-plugin-sql), which are not part of the core install and have to be listed in the plugins array of your Prettier config. That gap is why teams that format everything else automatically still reformat query files by hand.
Why did formatting change what my YAML means?
Because the tool parsed the file into plain data and printed it back out, which is the normal way to implement a formatter and the reason comments, anchors and merge keys disappear: none of them exist in the parsed data. The same round trip re-resolves scalars, so a value that was quoted because it had to be can come back unquoted and turn into a boolean or a number. A formatter that edits the document tree rather than the parsed value keeps them, which is what ours do.
How do I check that a huge file is valid without opening it?
Use a validator that streams instead of an editor that loads: jq empty file.json exits non-zero and prints the first parse error, xmllint --noout file.xml does the same for XML, and yq eval . file.yaml covers YAML. All three read the file rather than rendering it, so a 2 GB export costs memory proportional to one document, not to the file. In CI that is also the right shape, since the exit code is the whole result you need.