Xepoca
Developer Tools

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

example.js6 lines · 295 B

Settings

Processing options

80 chars
2 spaces

Formatting engine: Prettier standalone

Output

Formatted source

Run the formatter or minifier to generate output.

Processed source will appear here.

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

1

Add your code

Paste source text or load a JavaScript, JSX, TypeScript, TSX, or text file from your device.

2

Choose the engine

Use Format for readable Prettier output or Minify for compressed JavaScript from Terser.

3

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.

Related Xepoca tools

JavaScript Formatter FAQ

Does Xepoca upload or run my JavaScript?+
No. The source is processed locally in your browser and displayed as text. Xepoca does not execute the submitted program.
What does the formatter use?+
Formatting uses Prettier standalone with the Babel, TypeScript, and ESTree plugins loaded locally by the application bundle.
What does the minifier use?+
Minification uses Terser. Compression and name mangling can be switched independently, and advanced controls are available for modules, top-level optimization, function names, and class names.
Can I minify TypeScript or TSX directly?+
No. Format TypeScript here if you want, then compile it to JavaScript with your normal TypeScript or framework build before using a JavaScript minifier.
Is minified code guaranteed to behave identically?+
Safe defaults work well for typical JavaScript, but optimization can expose assumptions in code that relies on global names, function/class names, or unusual runtime behavior. Test your production bundle after minification.