$ terser --pretty
JavaScript Formatter
Pretty-print or minify JavaScript source code online, entirely in your browser.
Input
Output
Best-effort formatter (not a full JS parser) — avoid relying on ASI edge cases like a bare newline after return. Runs entirely in your browser.