Formatierer & Code
JavaScript / TypeScript Formatter
Kostenloser JavaScript- und TypeScript-Formatter. Prettier's Standardregeln, komplett im Browser ausgeführt — erkennt TypeScript automatisch anhand von Typannotationen. Einfügen, klicken, kopieren.
Anmerkung der Redaktion
Understanding · JS, set to a house style.
Dieses ausführliche Kapitel ist derzeit nur auf Englisch verfügbar. Das Konvertierungstool oben funktioniert in Ihrer Sprache; der lange Erklärtext wurde noch nicht übersetzt.
Häufig gestellte Fragen
Quick answers.
›Does it handle TypeScript?
Yes — the tool auto-detects TypeScript from type annotations (`: string`, `interface Foo`, `type X = ...`) and routes to Prettier's TS parser. You don't have to toggle anything.
›Which Prettier options does it use?
Prettier's out-of-box defaults: 2-space indent, semicolons, double quotes, 80-column print width, trailing commas. These match the vast majority of published codebases.
›Will it change my code's behaviour?
No — Prettier only reformats; it never changes semantics. The output runs identically to the input, byte-for-byte after transpilation.
›Can it minify JavaScript?
No — Prettier is a formatter, not a minifier. For production minification use Terser, esbuild or SWC locally. They produce far smaller output than a whitespace collapser would.
Andere suchten auch nach
Verwandte Tools
More in this room.
- JSON Formatter & ValidatorJSON verschönern, minimieren und validieren — kostenlos, ohne Anmeldung.
- SQL FormatterHässliche SQL-Abfragen verschönern und einrücken.
- XML Formatter & ValidatorXML verschönern, minimieren und validieren — sofort.
- HTML FormatterHTML verschönern und minimieren — Prettier-Standardwerte.
- CSS FormatterCSS-Stylesheets verschönern und minimieren.
- YAML-FormatiererYAML-Einrückung und -Struktur normalisieren.