Skip to content
JS → Size reportDeveloper tools

JavaScript Size Analyzer

See what your JavaScript weighs raw, minified with Terser and gzipped, how long it takes to download, whether it fits your budget, and which functions, strings and imports take the space.

About this tool

About JavaScript Size Analyzer

JavaScript Size Analyzer measures a script the way a visitor receives it and shows where the bytes go. Paste the code, open a .js file or drop one on the box. The code is parsed with Acorn, so a syntax error is reported with its line and column, and the tool tells you whether it is an ES module (import and export) or a classic script. The report gives the file size, its gzipped size, its size after minifying with Terser (two compression passes, shortened names, comments removed, the same minifier many build tools use), and the size after minifying and gzip, which is what visitors really download. Gzip is measured with your browser’s own compressor, not guessed. Set a budget in kilobytes, such as 50 KB for one script, and the result turns green or red. A table shows the download time on slow 3G, slow 4G, 4G and broadband, each with one round trip, both minified and not minified; the phone still has to parse and run the code after that. The Checks tab explains what to fix: console calls, debugger statements, comments taking a large share of the file, licence comments you may need to keep, inlined base64 images or fonts, long strings, imports whose size is added by your bundler, CommonJS require calls, whether the file is already minified, and the budget result. Biggest parts lists the top-level functions, classes and values by size, so you see at once that a big inlined image or one class is most of the file. Imports lists every import, including ones loaded later with import(), and Long strings lists strings over 300 bytes with their line. The Minified code tab shows Terser’s output to copy or download as a .min.js file. Big files are minified a moment after you stop typing. Your code is measured in your browser and never uploaded.

JavaScript Size Analyzer tool

When to measure a script

Faster pages on real phones

Performance work

Check a script before it ships.

Example470 B minified and gzipped.

Choosing a library

Compare two small libraries.

ExamplePaste each build file.

Mobile visitors

Download time on slow 4G.

Example0.15 s on 1.6 Mbit/s.

Finding bloat

Spot inlined images and data.

ExampleA 40 KB base64 icon.

Release checks

No console or debugger left.

Example1 console call found.

Learning about bundles

See what minifying removes.

Example34% smaller.

Script size tips

Less to download, less to run

Move images out

A base64 image is about a third larger than the file and cannot be cached on its own.

Watch the gzipped size

That is what crosses the network; set your budget on it.

Load later what can wait

Use import() for code needed only after a click.

Test on a budget phone

Parsing and running code takes longer than downloading it on slow devices.

Format minified code

Make a .min.js readable.

Open JS Beautifier

Check the CSS too

Stylesheet size and clean-up.

Open CSS Analyzer
Built & tested by

HemantInsights

Senior Software Engineer · Developer of Toolyconvert

Hemant developed JavaScript Size Analyzer and tests it on desktop and mobile with real files. He is a senior software engineer from Dehradun, India, building websites since 2014, and designed and developed Toolyconvert end to end.

Last updated 29 November 2026

Answers and guidanceFrequently Asked Questions
How is the minified size worked out?
The code is minified with Terser, using two compression passes and shortened names, with comments removed; the size of that output is shown.
Is the gzip size real?
Yes. It is measured with your browser’s own gzip compressor.
Why is my ES module much smaller after minifying?
In a module, top-level code that nothing uses can be dropped. A classic script keeps it, because other scripts may use its globals.
Are imported libraries counted?
No. Only the code you paste is measured; the tool lists the imports so you know what your bundler will add.
How are download times calculated?
Size divided by the connection speed, plus one round trip: 0.4, 1.6, 9 and 30 Mbit/s.
What budget should I use?
Many teams aim for well under 170 KB of minified and gzipped JavaScript per page in total; set a share of that per script.
Is my code uploaded?
No. It is measured in your browser.
More tools for your workflowRelated Tools

JavaScript Beautifier

Make minified or messy JavaScript readable as you type, with indent, brace and wrap options and a real syntax check by line. Switch to Minify to shrink it with Terser.

CSS Usage Analyzer

Paste a stylesheet for a full report: real minified and gzip size, specificity, !important, duplicate selectors and declarations, colours, fonts, breakpoints, and the selectors that match nothing on your page.

HTML Minifier

Minify HTML in your browser: remove comments, line breaks and extra spaces between tags, and see the size saved. Copy the result in one click.

Live JavaScript Compiler

Write and run JavaScript in your browser and see console output, warnings and errors instantly. Each run starts in a fresh, sandboxed environment. Free.

1 / 3
Browse all developer tools

Featured on

Toolyconvert is listed on these product directories and launch platforms.