Choose a version:
13% The original file has 542563 bytes (529.8k) and is available from the project website.
There you can find the official minified version, too, which brings down the size to 72805 bytes (71.1k, 13%).

After GZIP compression these minified files vary in size:
unpkg
  29387 bytes (28.7k)
CDN
Boot
  26032 bytes (25.4k)
CDN
cdnjs
  26032 bytes (25.4k)
CDN
gzip -6 (default)
  25817 bytes (25.2k)
local copy
gzip -9
  25768 bytes (25.2k)
local copy
libdeflate -12
  24984 bytes (24.4k)
local copy
7zip -mx=9 -tgzip
  24831 bytes (24.2k)
local copy
zultra
  24788 bytes (24.2k)
local copy
pigz -11 -n
  24737 bytes (24.2k)
local copy
kzip -s0 -rn -b6
  24671 bytes (24.1k)
local copy
Zopfli
  24622 bytes (24.0k)
local copy

perma-link to the smallest file on my server:
http://minime.stephan-brumme.com/files/lodash/lodash-4.17.20.min.js (or via HTTPS)

You will automatically get the smallest lodash 4.17.20 file, ETag caching is available and
if your browser doesn't support GZIP decompression then the uncompressed version will be sent.

Currently best Zopfli settings

Save 1410 bytes by using my lodash 4.17.20 Zopfli version instead of the best available CDN (5.73% smaller than cdnjs, 24622 vs. 26032 bytes):
You can use my super-compressed files for whatever purpose you like as long as you respect the library's original license agreement.
There are no restrictions from my side - but please avoid hot-linking if you run a high-traffic website.

These command-line settings yielded the best compression ratio so far (Linux version of zopfli-krzymod):
zopfli --i1000000 --mb8 --mls8192 --bsr11 --lazy --ohh

(found August 19, 2020)
Description Value Parameter
iterations 1000000  --i1000000
maximum blocks 8  --mb8
maximum length score 8192  --mls8192
block splitting recursion 11  --bsr11
lazy matching in LZ77 yes  --lazy
optimized Huffman headers yes  --ohh
initial random W for iterations 1  --rw1
initial random Z for iterations 2  --rz2

Verify file integrity

After decompression, my uncompressed files are identical to the original ones:

MD5:
curl --silent --compressed https://raw.githubusercontent.com/lodash/lodash/4.17.20/dist/lodash.min.js --location | md5sum
0215374495c4e2556dc7403bebca89be  -
curl --silent --compressed https://minime.stephan-brumme.com/files/lodash/lodash-4.17.20.min.zopfli.js.gz | md5sum
0215374495c4e2556dc7403bebca89be  -

SHA1:
curl --silent --compressed https://raw.githubusercontent.com/lodash/lodash/4.17.20/dist/lodash.min.js --location | sha1sum
011b1f306759caaccbc1b779915f76379157eef7  -
curl --silent --compressed https://minime.stephan-brumme.com/files/lodash/lodash-4.17.20.min.zopfli.js.gz | sha1sum
011b1f306759caaccbc1b779915f76379157eef7  -

All listed CDNs deliver identical contents:
CDN Size (compressed) MD5 (uncompressed) Timestamp
unpkg 29387 bytes 0215374495c4e2556dc7403bebca89be (invalid)
Boot 26032 bytes 0215374495c4e2556dc7403bebca89be (invalid)
cdnjs 26032 bytes 0215374495c4e2556dc7403bebca89be (invalid)

Note: only the MD5 hashes are shown to keep things simple.

Other Versions

Available lodash versions at minime.stephan-brumme.com:

4.17.21, 4.17.20, 4.17.19, 4.17.18, 4.17.17, 4.17.16, 4.17.15, 4.17.14, 4.17.13, 4.17.12, 4.17.11, 4.17.10, 4.17.9, 4.17.5, 4.17.4, 4.17.3, 4.17.2, 4.17.1, 4.17.0, 4.16.6, 4.16.5, 4.16.4, 4.16.3, 4.16.2, 4.16.1, 4.16.0, 4.15.0, 4.14.2, 4.14.1, 4.14.0, 4.13.1, 4.13.0, 4.12.0, 4.11.2, 4.11.1, 4.11.0, 4.10.0,
4.9.0, 4.8.2, 4.8.1, 4.8.0, 4.7.0, 4.6.1, 4.6.0, 4.5.1, 4.5.0, 4.4.0, 4.3.0, 4.2.1, 4.2.0, 4.1.0, 4.0.1, 4.0.0

The project site contains an overview how well these versions were compressed.
Other interesting projects are AngularJS, BackboneJS, Bootstrap, D3, Dojo, Ember, jQuery, Knockout, React, Socket.IO, ThreeJS, UnderscoreJS and Vue.

Changelog

Best Zopfli parameters so far:
Size Improvement Parameters Found
24622 bytes -3 bytes zopfli --i1000000 --mls8192 --bsr11 --lazy --ohh August 19, 2020 @ 19:01
24625 bytes -2 bytes zopfli --i100000 --mls8192 --bsr11 --lazy --ohh August 19, 2020 @ 14:11
24627 bytes -6 bytes zopfli --i10000 --mls8192 --bsr11 --lazy --ohh August 19, 2020 @ 13:38
24633 bytes -5 bytes zopfli --i1000 --mls8192 --bsr11 --lazy --ohh August 19, 2020 @ 13:15
24638 bytes zopfli --i100 --mls8192 --bsr11 --lazy --ohh August 19, 2020 @ 13:06

If there are multiple parameter sets yielding the same compressed size, only the first one found is shown.

Most recent activity on August 19, 2020 @ 19:01.

Heatmaps

This Zopfli heatmap visualizes how compression changes when modifying the --bsr and --mls parameter.
Cell's contents is the best filesize achieved (in bytes, hover with mouse over cells to see number of iterations).

Good parameters are green, bad are red. The best and worst are bold as well.
The brightness of the blue background color indicates how many iterations were processed:
10,000, 100,000 or 1,000,000.
bsr \ mls
2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768
bsr \ mls
2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768
24748 24746 24731 24742 24740 24731 24776 24716 24720 24734 24724 24738 24773 24728 24734
24672 24661 24659 24677 24674 24678 24672 24671 24696 24672 24671 24670 24660 24653 24671
24658 24670 24714 24661 24658 24657 24657 24710 24661 24661 24660 24715 24649 24718 24703
24714 24664 24713 24706 24696 24707 24695 24694 24703 24707 24701 24702 24699 24721 24708
24706 24665 24718 24707 24725 24701 24705 24699 24702 24709 24718 24710 24681 24710 24698
24668 24683 24710 24704 24720 24701 24699 24693 24717 24707 24706 24719 24685 24689 24706
24676 24674 24724 24653 24653 24642 24700 24641 24651 24646 24639 24713 24652 24709 24705
24654 24658 24662 24648 24633 24641 24645 24639 24660 24647 24651 24646 24622 24658 24665
24651 24653 24655 24657 24642 24644 24648 24640 24662 24653 24644 24655 24644 24647 24658
24647 24704 24652 24637 24651 24643 24646 24644 24648 24647 24643 24703 24653 24647 24718
24723 24667 24716 24702 24639 24659 24696 24673 24664 24700 24701 24705 24703 24709 24703
24638 24660 24709 24640 24647 24641 24700 24651 24658 24654 24639 24646 24641 24661 24659
24644 24668 24709 24640 24639 24643 24705 24701 24704 24707 24697 24706 24696 24711 24697
24641 24652 24654 24634 24639 24650 24650 24643 24641 24654 24703 24707 24649 24656 24702
24633 24653 24656 24640 24644 24643 24652 24634 24654 24657 24645 24651 24647 24657 24657
24635 24664 24646 24645 24637 24635 24701 24636 24648 24656 24639 24644 24634 24651 24652
24644 24667 24657 24644 24650 24635 24704 24641 24657 24660 24643 24649 24646 24660 24659
24669 24656 24709 24651 24627 24698 24697 24637 24664 24663 24645 24704 24702 24655 24701
24663 24663 24711 24697 24634 24652 24702 24697 24702 24696 24655 24700 24691 24699 24715
24667 24654 24659 24648 24641 24645 24642 24643 24656 24649 24710 24653 24637 24655 24700
24638 24637 24654 24634 24639 24642 24643 24644 24664 24649 24639 24698 24651 24658 24662
24634 24655 24651 24639 24638 24635 24653 24638 24663 24711 24704 24650 24690 24696 24650
24648 24651 24659 24637 24647 24647 24646 24641 24641 24652 24640 24705 24642 24654 24708

Due to the Monte Carlo design of my search algorithm, not all parameters have reached the same number of iterations yet:
Iterations Min. Bytes Reduction Coverage
100 24638 bytes 100%
1,000 24633 bytes -5 bytes 100%
10,000 24627 bytes -6 bytes 100%
100,000 24625 bytes -2 bytes 0.58%
1,000,000 24622 bytes -3 bytes 0.29%
10,000,000

KZIP has far less options available for tuning/optimization. I only played around with the number of blocks (parameter -n):
Blocks Min. Bytes Compared To Best Zopfli Compared To Best KZIP
24712 bytes +90 bytes (+0.37%) +41 bytes
24974 bytes +352 bytes (+1.43%) +303 bytes
24828 bytes +206 bytes (+0.84%) +157 bytes
24767 bytes +145 bytes (+0.59%) +96 bytes
24715 bytes +93 bytes (+0.38%) +44 bytes
24710 bytes +88 bytes (+0.36%) +39 bytes
24671 bytes +49 bytes (+0.20%)
24697 bytes +75 bytes (+0.30%) +26 bytes
24708 bytes +86 bytes (+0.35%) +37 bytes

Non-DEFLATE Algorithms

Archivers based on completely different compression algorithms often produce superior results.
Unfortunately, browsers only support gzip compression at the moment.
However, support for Brotli is constantly growing - but your browser doesn't support it.
Algorithm Program Parameters Size Compared To Best Zopfli
ZPAQ (Wikipedia) zpaq zpaq -method 69 20755 bytes -3867 bytes (-15.71%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 21813 bytes -2809 bytes (-11.41%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 21888 bytes -2734 bytes (-11.10%)
Brotli (Wikipedia) brotli brotli -q 11 22950 bytes -1672 bytes (-6.79%)
LZMA2 (Wikipedia) xz xz -9 23380 bytes -1242 bytes (-5.04%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 24180 bytes -442 bytes (-1.80%)
Zstandard (Wikipedia) zstd zstd -19 24401 bytes -221 bytes (-0.90%)

Detailled Analysis

I wrote a DEFLATE decoder in Javascript. Click the button below to start a client-side analysis of the smallest gzipped files (may take a second):


Notes: pigz is a fast open source multi-threaded implementation of gzip written by one of the original authors of gzip.
However, when using compression level 11, pigz actually switches to the slower Zopfli algorithm and isn't multi-threaded anymore.
KrzyMOD's extensions to Zopfli offer the highest level of configuration and is therefore used for my brute-force search.
Ken Silverman wrote the closed-source KZIP compression program and Jonathon Fowler ported it to Linux.
Defluff was created by Joachim Henke; DeflOpt is a tool by Ben Jos Walbeehm.

website made by Stephan Brumme in 2015 and still improving in 2024.
all timestamps are displayed in central european time. see my changelog.
no flash, not even images or external css files - and everything squeezed into a single html file.
which was handsomely compressed before releasing it into the wild internet - obviously.

please visit my homepage and my blog, too.
email: minime (at) stephan-brumme.com

All trademarks are property of their respective owners. You know, the boring legal stuff.