JavaScript Formatter & Minifier
Beautify JavaScript, JSX, TypeScript, and TSX with Prettier, or compress JavaScript with Terser. Your source stays in your browser.
Private browser processing
Xepoca does not upload, execute, or store the code you paste here. Prettier and Terser run locally in the browser after the page loads.
Source
Paste or upload code
Drop a source file here
.js, .mjs, .cjs, .jsx, .ts, .tsx, .txt · up to 2 MB
Settings
Processing options
Formatting engine: Prettier standalone
Output
Formatted source
Run the formatter or minifier to generate output.
Input
295 B
6 lines
Output
—
Process code first
Reduction
—
Shown for minified output
Source signals
3 fn
0 comments · 0 imports
Prettier formatting
Use Prettier's browser build for deterministic JavaScript, JSX, TypeScript, and TSX formatting with familiar style controls.
Terser minification
Compress and optionally mangle JavaScript with a dedicated ES6+ minifier instead of treating whitespace removal as production minification.
Local by design
Source stays in the browser. The tool never executes the submitted program and does not need a server-side formatting API.
How to format or minify JavaScript
Add your code
Paste source text or load a JavaScript, JSX, TypeScript, TSX, or text file from your device.
Choose the engine
Use Format for readable Prettier output or Minify for compressed JavaScript from Terser.
Review and export
Check errors and size statistics, then copy the result or download the generated source file.
Formatting and minification are different jobs
Formatting parses the program and reprints it consistently for people to read. Prettier intentionally makes many style choices for you while still exposing practical options such as quotes, print width, tabs, semicolons, and trailing commas.
Minification targets smaller production JavaScript. Terser can compress expressions, eliminate some redundant code, and mangle eligible names. Aggressive options such as top-level optimization can change assumptions in scripts that expose globals, so test production behavior after minifying.
TypeScript and TSX contain syntax that browsers and Terser do not consume directly. Xepoca can format them, but your normal compiler or bundler should turn them into JavaScript before minification.