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

After GZIP compression these minified files vary in size:
Boot
  26001 bytes (25.4k)
CDN
cdnjs
  23031 bytes (22.5k)
CDN
cdnhttps
  22868 bytes (22.3k)
CDN
gzip -6 (default)
  21970 bytes (21.5k)
local copy
unpkg
  21957 bytes (21.4k)
CDN
gzip -9
  21899 bytes (21.4k)
local copy
jsdelivr
  21896 bytes (21.4k)
CDN
libdeflate -12
  21208 bytes (20.7k)
local copy
7zip -mx=9 -tgzip
  21190 bytes (20.7k)
local copy
kzip -s0 -rn -b4
  21101 bytes (20.6k)
local copy
pigz -11 -n
  21091 bytes (20.6k)
local copy
Zopfli
  21059 bytes (20.6k)
local copy
Zopfli (defluff)
  21058 bytes (20.6k)
local copy

perma-link to the smallest file on my server:
http://minime.stephan-brumme.com/files/lodash/lodash-4.10.0.min.js

You will automatically get the smallest lodash 4.10.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 837 bytes by using my lodash 4.10.0 Zopfli version instead of the best available CDN (3.97% smaller than jsdelivr, 21059 vs. 21896 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 --mls512 --bsr12 --lazy --ohh

(found April 12, 2016)
Description Value Parameter
iterations 100000  --i100000
maximum blocks 8  --mb8
maximum length score 512  --mls512
block splitting recursion 12  --bsr12
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 1 more byte (21058 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.10.0/dist/lodash.min.js --location | md5sum
23449007c0557114d9443b17e923ae64  -
curl --silent --compressed http://minime.stephan-brumme.com/files/lodash/lodash-4.10.0.min.zopfli.js.gz | md5sum
23449007c0557114d9443b17e923ae64  -

SHA1:
curl --silent --compressed https://raw.githubusercontent.com/lodash/lodash/4.10.0/dist/lodash.min.js --location | sha1sum
6e41c21db6b6c6946f17842a80944cf215dd2f78  -
curl --silent --compressed http://minime.stephan-brumme.com/files/lodash/lodash-4.10.0.min.zopfli.js.gz | sha1sum
6e41c21db6b6c6946f17842a80944cf215dd2f78  -

These CDNs send you the original file:
CDN Size (compressed) MD5 (uncompressed) Timestamp
unpkg 21957 bytes 23449007c0557114d9443b17e923ae64 July 11, 2016 @ 16:46
jsdelivr 21896 bytes 23449007c0557114d9443b17e923ae64 (invalid)

And some CDNs send you a different file:
CDN Size (compressed) MD5 (uncompressed) Comment / Diff Timestamp
Boot 26001 bytes ac2eeeb2cce3aa1e211c05d100a2f3f2 < /**
< * @license
< * lodash 4.10.0 (Custom Build) lodash.com/license | Under [...]
< * 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:40
cdnjs 23031 bytes ac2eeeb2cce3aa1e211c05d100a2f3f2 < /**
< * @license
< * lodash 4.10.0 (Custom Build) lodash.com/license | Under [...]
< * 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)
cdnhttps 22868 bytes ac2eeeb2cce3aa1e211c05d100a2f3f2 < /**
< * @license
< * lodash 4.10.0 (Custom Build) lodash.com/license | Under [...]
< * 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 [...]
[...]
November 22, 2016 @ 16:35

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

Other Versions

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

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
21059 bytes -1 byte zopfli --i100000 --mls512 --bsr12 --lazy --ohh April 12, 2016 @ 10:01
21060 bytes -2 bytes zopfli --i100000 --mls512 --bsr16 --lazy --ohh April 12, 2016 @ 09:51
21062 bytes -5 bytes zopfli --i10000 --mls512 --bsr16 --lazy --ohh April 12, 2016 @ 09:22
21067 bytes -1 byte zopfli --i1000 --mls512 --bsr16 --lazy --ohh April 12, 2016 @ 09:19
21068 bytes -2 bytes zopfli --i1000 --mls128 --bsr22 --lazy --ohh April 12, 2016 @ 09:19
21070 bytes -3 bytes zopfli --i1000 --mls128 --bsr4 --lazy --ohh April 12, 2016 @ 09:18
21073 bytes zopfli --i100 --mls2048 --bsr11 --lazy --ohh April 12, 2016 @ 02:53

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

Most recent activity on November 22, 2016 @ 16:35.

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
21096 21096 21102 21111 21115 21116 21116 21116 21111 21111 21105 21102 21088 21099 21103
21080 21083 21074 21078 21084 21084 21069 21085 21075 21069 21080 21071 21084 21081 21086
21060 21075 21070 21075 21088 21088 21081 21075 21096 21074 21077 21076 21093 21093 21075
21077 21071 21071 21072 21085 21079 21070 21081 21069 21065 21086 21085 21083 21083 21082
21073 21086 21070 21068 21077 21071 21070 21070 21084 21069 21072 21073 21085 21081 21086
21075 21070 21069 21079 21082 21093 21070 21104 21065 21064 21090 21077 21081 21082 21080
21081 21072 21073 21084 21074 21073 21075 21074 21071 21068 21082 21072 21086 21072 21082
21076 21076 21075 21068 21081 21076 21083 21085 21076 21069 21066 21084 21086 21099 21081
21078 21074 21072 21067 21073 21078 21067 21083 21059 21078 21077 21072 21084 21071 21080
21072 21083 21069 21075 21070 21074 21086 21081 21072 21079 21085 21084 21086 21084 21078
21078 21068 21069 21074 21071 21079 21066 21080 21076 21084 21078 21071 21068 21080 21077
21072 21076 21070 21073 21076 21071 21071 21070 21066 21077 21085 21071 21083 21081 21080
21076 21077 21073 21074 21077 21077 21069 21067 21060 21064 21071 21074 21084 21082 21077
21072 21074 21070 21074 21076 21069 21066 21068 21068 21070 21071 21073 21082 21083 21082
21080 21075 21072 21067 21070 21080 21077 21079 21067 21069 21084 21069 21069 21067 21080
21072 21071 21069 21077 21070 21072 21086 21082 21076 21076 21071 21071 21086 21083 21078
21078 21075 21073 21073 21070 21078 21065 21088 21066 21069 21064 21071 21067 21081 21077
21072 21064 21072 21065 21072 21065 21069 21079 21083 21072 21083 21074 21086 21075 21083
21075 21074 21081 21066 21068 21079 21066 21076 21076 21064 21072 21072 21069 21096 21082
21081 21072 21078 21069 21072 21071 21068 21083 21083 21070 21071 21070 21084 21069 21080
21075 21071 21067 21082 21070 21073 21070 21069 21059 21070 21077 21073 21086 21081 21080
21077 21069 21078 21069 21070 21082 21067 21072 21077 21067 21072 21084 21084 21070 21080
21067 21077 21066 21076 21081 21082 21072 21068 21064 21071 21066 21072 21084 21082 21085

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 21073 bytes 100%
1,000 21067 bytes -6 bytes 100%
10,000 21062 bytes -5 bytes 100%
100,000 21059 bytes -3 bytes 3.19%
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
21148 bytes +89 bytes (+0.42%) +47 bytes
21209 bytes +150 bytes (+0.71%) +108 bytes
21137 bytes +78 bytes (+0.37%) +36 bytes
21149 bytes +90 bytes (+0.43%) +48 bytes
21101 bytes +42 bytes (+0.20%)
21110 bytes +51 bytes (+0.24%) +9 bytes
21132 bytes +73 bytes (+0.35%) +31 bytes
21153 bytes +94 bytes (+0.45%) +52 bytes
21182 bytes +123 bytes (+0.58%) +81 bytes

Non-DEFLATE Algorithms

Archivers based on completely different compression algorithms often produce superior results.
Unfortunately, browsers only support gzip compression at the moment.
Algorithm Program Parameters Size Compared To Best Zopfli
ZPAQ (Wikipedia) zpaq zpaq -method 69 17876 bytes -3183 bytes (-15.11%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 18199 bytes -2860 bytes (-13.58%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 18504 bytes -2555 bytes (-12.13%)
Brotli (Wikipedia) brotli brotli -q 11 19792 bytes -1267 bytes (-6.02%)
LZMA2 (Wikipedia) xz xz -9 20324 bytes -735 bytes (-3.49%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 20436 bytes -623 bytes (-2.96%)
ZSTD (Wikipedia) zstd zstd -19 20969 bytes -90 bytes (-0.43%)

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 2018.
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