Omnikit
DevFilesMoneyAll tools
Ctrl K
Dev toolsFile toolsMoney calculatorsAll tools
HomeDeveloper toolsJavaScript Beautifier & Minifier
EnglishالعربيةবাংলাDeutschEspañolFrançaisPolskiPortuguêsРусский

JavaScript Beautifier & Minifier

dev

Beautify JavaScript, or minify it and see how many bytes went

Runs in your browser. Nothing you type is sent anywhere. Updated on 24 Oct 2026.

Formatting JavaScript indents it and puts statements where they can be read; minifying strips names and spaces for production. The bytes removed are shown, so the saving on a 50 KB bundle is visible before you ship. Your code is parsed in the browser and never uploaded.

Next:
  • HTML Formatter & Minifier Indent messy HTML, or minify it and see the bytes you saved
  • CSS Beautifier & Minifier Tidy a stylesheet or minify it, with the size saved shown

How to beautify or minify JavaScript

1

Paste JavaScript or JSX into the box, or press Try an example; TypeScript is not supported.

2

Keep Beautify to reformat it with Prettier, or pick Minify to shrink it with terser.

3

Set Indent, Wrap at, Semicolons and Single quotes for Beautify, or the options shown for Minify.

4

Press Copy or Download to take the result.

About the JavaScript Beautifier & Minifier

This JavaScript formatter does the two things people want from a script file. Beautify runs Prettier over it and returns the same code laid out your way: two spaces, four spaces or a tab, semicolons or not, single or double quotes, and a line width you choose. Minify runs terser and returns the smallest equivalent file, with the size before, the size after and the percentage saved.

It suits the small jobs that interrupt a day. A snippet copied from an answer online uses a style your project does not. A file you inherited has three statements per line. You need to see roughly how big a helper will be once it ships, before deciding to write it yourself. And sometimes you need the opposite: a minified bundle expanded enough to work out what a third-party script is doing.

Minify has two switches. Renaming local variables to single letters is where most of the saving comes from and changes nothing you can observe from outside. Keeping function names costs a few bytes but leaves stack traces and anything that reads a function's name readable, which matters if you send errors to a monitoring service.

The tool reads plain JavaScript and JSX. TypeScript is not supported: if you paste it, the parse error would be useless, so the page checks first and tells you which TypeScript construct it found, such as a type alias or a typed parameter. Everything runs in your browser, so unreleased code and anything with a key in it never leaves your device.

Frequently asked questions

Is this JavaScript minifier free?

Yes. No signup, no size limit and no cap on how many files you run through it. The page is paid for by a few ads shown outside the tool, and nothing is inserted into your code.

Is my code uploaded to a server?

No. Both Prettier and terser run in your browser. Unreleased code, internal endpoints or an API key sitting in a config object never leave your device, and nothing is stored once you close the tab.

Does it support TypeScript?

No. It reads plain JavaScript and JSX. If you paste TypeScript, the page tells you which construct it found, such as a type alias or a typed parameter, instead of showing a parse error that explains nothing. Strip the types first, or use a TypeScript-aware editor.

How much smaller does minified JavaScript get?

Readable source with comments usually drops 40 to 60 percent, and much more when it has long variable names and blank lines. Code that is already minified barely changes. The exact byte counts are shown, so you can compare.

What does mangle mean in a JS minifier?

Mangling renames local variables and function arguments to single letters. Nothing outside the file can see those names, so behaviour is unchanged, and it is usually the biggest single saving. Exported names and object properties are left alone.

Can I unminify JavaScript back to the original?

You can get the layout back, not the names. Beautify adds line breaks, indentation and spacing so the code is readable, but a minifier discards the original variable names and comments, and no tool can recover them.

Still stuck? Ask about JavaScript Beautifier & Minifier and anybody who knows can answer. No account needed.

Common uses

  • JS MinifierShrink a JavaScript file with terser and see the size saved
  • JavaScript BeautifierReformat JavaScript with Prettier, in the indent style you use
  • Unminify JavaScriptExpand minified JavaScript into something you can read

Same job, other tools: JSON Minifier – Strip whitespace from JSON for production · HTML Minifier – Strip comments and spare whitespace from HTML and see the saving · CSS Minifier – Compress a stylesheet and see exactly how many bytes you saved.

On the related tools: GraphQL Validator – Check a GraphQL query or schema for errors, optionally against your own SDL.

Related tools

All developer tools
Hex Viewer (xxd online)See any file as an xxd hex dump with offsets and text, or turn a hex dump back into a fileGraphQL FormatterFormat, minify and validate GraphQL queries and schemas, with errors by line and columnJSONL Viewer and ValidatorCheck JSON Lines and NDJSON line by line, view records as a table, convert to a JSON arrayJSON Formatter & ValidatorFormat, validate, minify and sort JSON with exact error positionsSQL FormatterFormat and beautify SQL for PostgreSQL, MySQL, SQL Server and moreMarkdown PreviewWrite Markdown and see it rendered live, with tables, task lists and codeHTML Formatter & MinifierIndent messy HTML, or minify it and see the bytes you savedCSS Beautifier & MinifierTidy a stylesheet or minify it, with the size saved shown

In the collection Code Formatters and Minifiers.

Was this tool helpful?
Omnikit

Small jobs, done in your browser. Free, fast and private. Files are never uploaded.

Files

  • Compress Image
  • Image to PDF
  • Merge PDF
  • Compress PDF
  • PDF to Word
  • Word to PDF

Dev

  • JSON Formatter & Validator
  • Base64 Encode & Decode
  • JWT Decoder, Verifier & Encoder
  • Password Generator
  • UUID Generator
  • Unix Timestamp Converter

Money

  • SIP Calculator
  • EMI Calculator
  • GST Calculator
  • FD Calculator
  • PPF Calculator
  • Lumpsum Calculator
EnglishالعربيةবাংলাDeutschEspañolFrançaisPolskiPortuguêsРусский
GuidesQuestionsAboutHow we checkLaw library (beta)PrivacyTermsDisclosureContactMore: Exam practice (UGC NET Paper 1)Runs in your browser. Nothing is uploaded. © 2026 Omnikit (theomnikit.com)