# Code formatter & minifier — beautify or minify, no upload

> Format (pretty-print) or minify code and markup in your browser — beautify JS, CSS, HTML, and more. Nothing is uploaded; the code stays in the tab.

Beautify messy code or minify it for shipping, across common languages and markup, right in the tab. Your source is processed in the browser and never sent to a server.

Inconsistent formatting makes code hard to read and diffs noisy. A quick beautify pass normalizes indentation and spacing so you can actually see the logic, while minifying does the reverse for shipping smaller assets.

For JSON specifically, the JSON toolkit adds validation and a tree view; for SQL, the SQL formatter understands query structure.

## How to

1. **Paste code.** Paste the code or markup you want to reformat.
2. **Choose format or minify.** Pretty-print for readability or minify to shrink it.
3. **Copy the result.** Copy the formatted output back into your project.

## FAQ

### What's the difference between formatting and minifying?

Formatting adds consistent indentation and spacing for readability; minifying strips whitespace and comments to make the file as small as possible for production.

### Which languages are supported?

Common web languages and data formats — the tool detects structure and applies sensible spacing so JS, CSS, HTML, and similar all tidy up.

### Is my code uploaded?

No. Formatting runs entirely in the browser, so proprietary code stays on your machine.


## Related tools

- [JSON toolkit](https://www.safepaper.app/dev/json-toolkit)
- [SQL formatter](https://www.safepaper.app/dev/sql-formatter)
- [YAML formatter](https://www.safepaper.app/dev/yaml-formatter)
- [Text diff](https://www.safepaper.app/dev/text-diff)

---

Canonical HTML: https://www.safepaper.app/dev/code-formatter
Markdown: https://www.safepaper.app/dev/code-formatter.md

There is no upload endpoint — your files are processed in this browser tab. Open your network tab and check.
