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

After GZIP compression these minified files vary in size:
Boot
  25927 bytes (25.3k)
CDN
cdnjs
  22956 bytes (22.4k)
CDN
gzip -6 (default)
  21891 bytes (21.4k)
local copy
unpkg
  21877 bytes (21.4k)
CDN
jsdelivr
  21832 bytes (21.3k)
CDN
gzip -9
  21828 bytes (21.3k)
local copy
libdeflate -12
  21148 bytes (20.7k)
local copy
7zip -mx=9 -tgzip
  21126 bytes (20.6k)
local copy
kzip -s0 -rn -b4
  21077 bytes (20.6k)
local copy
zultra
  21070 bytes (20.6k)
local copy
pigz -11 -n
  21037 bytes (20.5k)
local copy
Zopfli
  20990 bytes (20.5k)
local copy
Zopfli (defluff)
  20987 bytes (20.5k)
local copy

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

You will automatically get the smallest lodash 4.9.0 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 842 bytes by using my lodash 4.9.0 Zopfli version instead of the best available CDN (4.01% smaller than jsdelivr, 20990 vs. 21832 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 --i100000 --mb8 --mls256 --bsr16 --lazy --ohh

(found April 12, 2016)
Description Value Parameter
iterations 100000  --i100000
maximum blocks 8  --mb8
maximum length score 256  --mls256
block splitting recursion 16  --bsr16
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

Even Smaller Files Thanks To Defluff

Zopfli's output can be further optimized by the defluff tool.
In this particular case, defluff saves 3 more bytes (20987 bytes).

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.9.0/dist/lodash.min.js --location | md5sum
3d1f46f8f2911fcc9f8b1208e5714f04  -
curl --silent --compressed https://minime.stephan-brumme.com/files/lodash/lodash-4.9.0.min.zopfli.js.gz | md5sum
3d1f46f8f2911fcc9f8b1208e5714f04  -

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

These CDNs send you the original file:
CDN Size (compressed) MD5 (uncompressed) Timestamp
unpkg 21877 bytes 3d1f46f8f2911fcc9f8b1208e5714f04 July 11, 2016 @ 16:46
jsdelivr 21832 bytes 3d1f46f8f2911fcc9f8b1208e5714f04 (invalid)

And some CDNs send you a different file:
CDN Size (compressed) MD5 (uncompressed) Comment / Diff Timestamp
Boot 25927 bytes 8736ef9048ae0297b48ca692e8bb6c90 < /**
< * @license
< * lodash 4.9.0 (Custom Build) lodash.com/license | Unders [...]
< * Build: `lodash -o ./dist/lodash.js`
< */
< ;(function(){function t(t,n){return t.set(n[0],n[1]),t}fun [...]
< return true}function i(t,n){for(var r=-1,e=t.length,u=0,o= [...]
< var u=t.length;for(e&&u&&(r=t[--u]);u--;)r=n(r,t[u],u,t);r [...]
< return-1}function y(t,n,r,e){--r;for(var u=t.length;++r<u; [...]
< })}function O(t){return function(n){return t(n)}}function [...]
[...]
May 4, 2016 @ 10:41
cdnjs 22956 bytes 8736ef9048ae0297b48ca692e8bb6c90 < /**
< * @license
< * lodash 4.9.0 (Custom Build) lodash.com/license | Unders [...]
< * Build: `lodash -o ./dist/lodash.js`
< */
< ;(function(){function t(t,n){return t.set(n[0],n[1]),t}fun [...]
< return true}function i(t,n){for(var r=-1,e=t.length,u=0,o= [...]
< var u=t.length;for(e&&u&&(r=t[--u]);u--;)r=n(r,t[u],u,t);r [...]
< return-1}function y(t,n,r,e){--r;for(var u=t.length;++r<u; [...]
< })}function O(t){return function(n){return t(n)}}function [...]
[...]
(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
20990 bytes -4 bytes zopfli --i100000 --mls256 --bsr16 --lazy --ohh April 12, 2016 @ 12:06
20994 bytes -4 bytes zopfli --i10000 --mls256 --bsr16 --lazy --ohh April 12, 2016 @ 09:59
20998 bytes -10 bytes zopfli --i1000 --mls256 --bsr16 --lazy --ohh April 12, 2016 @ 09:52
21008 bytes zopfli --i100 --mls256 --bsr16 --lazy --ohh April 12, 2016 @ 02:56

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

Most recent activity on July 20, 2020 @ 12:55.

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 or 100,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
21030 21034 21038 21051 21053 21049 21051 21056 21055 21054 21048 21034 21045 21044 21040
21001 21006 21005 21006 21020 21005 21010 21007 21006 21010 21014 21003 21023 21020 21018
21016 21012 21014 21020 21011 21016 21009 21010 21004 21024 21031 21011 21016 21023 21031
21015 21016 21008 21008 21002 21006 21005 21004 21009 21020 21003 21012 21025 21012 21007
21007 21004 21007 21007 21020 21004 21004 21002 21011 21010 21003 21004 21006 21007 21009
21020 21005 21021 21010 21005 21007 20998 21006 21009 21012 21022 21019 21018 21019 21007
21007 21008 21008 21011 21006 21005 21005 20998 21011 21002 21013 20997 21005 21043 21007
21005 21006 21007 21008 21020 21019 21003 21002 21012 21007 21013 21005 21003 21040 21008
21012 21020 21004 21008 21005 21005 21003 21003 21005 21003 21003 21007 21008 21004 21007
21005 21007 21005 21022 21004 21006 21004 20997 21012 21013 21005 21002 21006 21012 21013
21007 21008 21008 21008 21005 21004 21003 21004 21009 21000 21010 21004 21002 21011 21007
21004 21005 21004 21006 21003 21008 21003 21004 21017 21018 21012 21005 21003 21015 21008
21006 21006 21005 21017 21002 21004 21006 20990 21007 21003 21009 21007 21005 21019 21007
21003 21007 21006 21017 21005 21007 21007 21000 21006 21012 21013 21009 21010 21009 21007
21002 21006 21005 21019 21004 21003 21003 21009 21007 21004 21005 20997 21008 21015 21008
21004 21006 21005 21018 21005 21005 21004 21003 21008 21014 21006 21003 21007 21016 21009
21005 21009 21000 21006 21006 21008 21003 21008 21007 21002 21008 21002 21007 21006 21006
21004 21009 21002 21003 21004 21007 21004 20999 21000 21005 21013 21005 21008 21017 21008
21004 21004 21001 21001 21022 21005 21004 21002 21006 21011 21006 21005 21009 21009 21008
21003 21005 21006 21018 21005 21004 21005 21005 21015 21005 21003 21018 21006 21018 21007
21005 21005 21005 21004 21002 21006 21004 21002 21006 21017 21006 21017 21007 21019 21008
21007 21006 21008 21010 21004 21005 21006 21011 21002 21007 21005 21006 21008 21008 21009
21005 21006 21002 21007 21005 21006 21004 20998 21014 21003 21004 21003 21023 21024 21008

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 21008 bytes 100%
1,000 20998 bytes -10 bytes 100%
10,000 20994 bytes -4 bytes 100%
100,000 20990 bytes -4 bytes 0.29%
1,000,000
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
21090 bytes +100 bytes (+0.48%) +13 bytes
21152 bytes +162 bytes (+0.77%) +75 bytes
21079 bytes +89 bytes (+0.42%) +2 bytes
21091 bytes +101 bytes (+0.48%) +14 bytes
21077 bytes +87 bytes (+0.41%)
21088 bytes +98 bytes (+0.47%) +11 bytes
21112 bytes +122 bytes (+0.58%) +35 bytes
21134 bytes +144 bytes (+0.69%) +57 bytes
21162 bytes +172 bytes (+0.82%) +85 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 17853 bytes -3137 bytes (-14.95%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 18152 bytes -2838 bytes (-13.52%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 18452 bytes -2538 bytes (-12.09%)
Brotli (Wikipedia) brotli brotli -q 11 19795 bytes -1195 bytes (-5.69%)
LZMA2 (Wikipedia) xz xz -9 20268 bytes -722 bytes (-3.44%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 20415 bytes -575 bytes (-2.74%)
Zstandard (Wikipedia) zstd zstd -19 20909 bytes -81 bytes (-0.39%)

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.