Kodformatterare
HTML, CSS, JS, SQL
Om det här verktyget
Pretty-print or minify HTML, CSS, SCSS, JavaScript, TypeScript, JSON and SQL using Prettier and sql-formatter - runs entirely in your browser.
The right tool for cleaning up a minified file you got from a bundle, reformatting code copied from a hard-to-read source, prepping snippets for a blog post, or quickly minifying CSS/JS for a one-off deployment. Nothing leaves your machine.
Funktioner
- Prettier-powered formatting for HTML, CSS, SCSS, JS, TS, JSON
- sql-formatter for SQL (multiple dialects)
- Custom minifiers for HTML/CSS/JS
- Switch language with one click
- Configurable indent (2/4 spaces or tabs)
- Browser-only - code never uploaded
- Free and unlimited
- Preserves blank lines between paragraphs when wrapping prose
Så använder du det
- Pick a language.
- Paste code.
- Click Format or Minify.
- Copy the output.
Allt sker i din webbläsare med JavaScript och WebAssembly. Dina filer laddas aldrig upp, lagras aldrig och ses aldrig av oss.
Vanliga frågor
No. Prettier and the minifiers run inside your browser via WebAssembly; nothing leaves your machine. Safe for confidential code.
A recent stable Prettier - formatting matches what `prettier --write` would produce on your machine.
Standard SQL plus PostgreSQL, MySQL, BigQuery, Snowflake and a few others - the same dialects sql-formatter supports natively.
Formatters require valid syntax - they reformat code, they don't fix bugs. If formatting fails, your input has a syntax error to fix first.
No. The text formatter respects existing indentation and won't rewrap inside code-style runs of leading whitespace. For real source code, use a language-specific formatter (Prettier, Black) instead.
Email and plain-text conventions land around 72-80 characters per line. Markdown documents are usually fine at 80-100. Prose for printed pages can go wider. The right number is whatever your downstream destination expects.