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

After GZIP compression these minified files vary in size:
Boot
  28715 bytes (28.0k)
CDN, direct link
cdnjs
  25594 bytes (25.0k)
CDN, direct link
unpkg
  24269 bytes (23.7k)
CDN, direct link
gzip -6 (default)
  24222 bytes (23.7k)
local copy
jsdelivr
  24161 bytes (23.6k)
CDN, direct link
gzip -9
  24157 bytes (23.6k)
local copy
7zip -mx=9 -tgzip
  23348 bytes (22.8k)
local copy
libdeflate -12
  23321 bytes (22.8k)
local copy
kzip -s0 -rn -b3
  23250 bytes (22.7k)
local copy
pigz -11 -n
  23213 bytes (22.7k)
local copy
Zopfli
  23176 bytes (22.6k)
local copy

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

You will automatically get the smallest lodash 4.17.4 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 985 bytes by using my lodash 4.17.4 Zopfli version instead of the best available CDN (4.25% smaller than jsdelivr, 23176 vs. 24161 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 --mls2048 --bsr11 --lazy --ohh

(found January 2, 2017)
Description Value Parameter
iterations 1000000  --i1000000
maximum blocks 8  --mb8
maximum length score 2048  --mls2048
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.4/dist/lodash.min.js --location | md5sum
c8515f131f3194c32a3670c8e274fab6  -
curl --silent --compressed http://minime.stephan-brumme.com/files/lodash/lodash-4.17.4.min.zopfli.js.gz | md5sum
c8515f131f3194c32a3670c8e274fab6  -

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

These CDNs send you the original file:
CDN Size (compressed) MD5 (uncompressed) Timestamp
unpkg 24269 bytes c8515f131f3194c32a3670c8e274fab6 January 2, 2017 @ 11:59
jsdelivr 24161 bytes c8515f131f3194c32a3670c8e274fab6 (invalid)

And some CDNs send you a different file:
CDN Size (compressed) MD5 (uncompressed) Comment / Diff Timestamp
Boot 28715 bytes 4d210086bed42894d3b1e61b919d73af < /**
< * @license
< * Lodash lodash.com/license | Underscore.js 1.8.3 undersc [...]
< */
< ;(function(){function n(n,t){return n.set(t[0],t[1]),n}fun [...]
< return n}function o(n,t){for(var r=-1,e=null==n?0:n.length [...]
< return n}function h(n,t,r,e){var u=-1,i=null==n?0:n.length [...]
< --r;for(var e=n.length;++r<e;)if(n[r]===t){n=r;break n}n=- [...]
< return n}function k(n,t){for(var r,e=-1,u=n.length;++e<u;) [...]
< return"\\"+Tn[n]}function L(n){var t=-1,r=Array(n.size);re [...]
[...]
(invalid)
cdnjs 25594 bytes 4d210086bed42894d3b1e61b919d73af < /**
< * @license
< * Lodash lodash.com/license | Underscore.js 1.8.3 undersc [...]
< */
< ;(function(){function n(n,t){return n.set(t[0],t[1]),n}fun [...]
< return n}function o(n,t){for(var r=-1,e=null==n?0:n.length [...]
< return n}function h(n,t,r,e){var u=-1,i=null==n?0:n.length [...]
< --r;for(var e=n.length;++r<e;)if(n[r]===t){n=r;break n}n=- [...]
< return n}function k(n,t){for(var r,e=-1,u=n.length;++e<u;) [...]
< return"\\"+Tn[n]}function L(n){var t=-1,r=Array(n.size);re [...]
[...]
(invalid)

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

Other Versions

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

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 and UnderscoreJS.

Changelog

Best Zopfli parameters so far:
Size Improvement Parameters Found
23176 bytes -1 byte zopfli --i1000000 --mls2048 --bsr11 --lazy --ohh January 2, 2017 @ 20:42
23177 bytes -1 byte zopfli --i1000000 --mls4 --bsr23 --lazy --ohh January 2, 2017 @ 18:58
23178 bytes -1 byte zopfli --i100000 --mls4 --bsr23 --lazy --ohh January 2, 2017 @ 14:08
23179 bytes -2 bytes zopfli --i10000 --mls4 --bsr23 --lazy --ohh January 2, 2017 @ 13:22
23181 bytes -1 byte zopfli --i10000 --mls1024 --bsr22 --lazy --ohh January 2, 2017 @ 12:58
23182 bytes -1 byte zopfli --i10000 --mls1024 --bsr18 --lazy --ohh January 2, 2017 @ 12:56
23183 bytes -2 bytes zopfli --i1000 --mls1024 --bsr22 --lazy --ohh January 2, 2017 @ 12:52
23185 bytes zopfli --i100 --mls1024 --bsr22 --lazy --ohh January 2, 2017 @ 12:02

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

Most recent activity on January 25, 2017 @ 15:25.

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
23234 23235 23232 23231 23228 23232 23221 23224 23223 23228 23232 23226 23230 23236 23232
23203 23222 23218 23252 23219 23203 23203 23205 23202 23204 23205 23207 23201 23231 23204
23206 23186 23189 23202 23194 23192 23195 23198 23197 23183 23187 23198 23187 23192 23197
23200 23184 23184 23195 23184 23195 23202 23202 23202 23195 23184 23192 23202 23191 23192
23190 23193 23191 23189 23206 23195 23190 23205 23204 23194 23180 23193 23193 23203 23190
23192 23191 23207 23189 23184 23191 23191 23202 23196 23193 23193 23192 23194 23201 23216
23191 23191 23197 23193 23205 23200 23194 23203 23201 23202 23207 23192 23183 23196 23190
23191 23181 23184 23189 23198 23206 23194 23206 23190 23194 23176 23192 23191 23190 23205
23191 23186 23190 23212 23193 23192 23192 23191 23191 23194 23186 23191 23193 23200 23190
23209 23193 23204 23201 23191 23193 23208 23204 23203 23181 23192 23193 23194 23203 23191
23215 23194 23191 23191 23191 23193 23194 23195 23195 23194 23191 23191 23192 23199 23187
23194 23191 23193 23192 23200 23195 23203 23204 23193 23191 23180 23193 23202 23181 23192
23205 23200 23204 23208 23210 23196 23189 23201 23188 23194 23184 23197 23192 23196 23190
23190 23192 23202 23195 23186 23195 23186 23196 23193 23193 23184 23193 23192 23204 23190
23205 23190 23195 23189 23190 23195 23184 23210 23195 23181 23197 23192 23193 23192 23193
23193 23181 23197 23191 23202 23193 23202 23201 23191 23198 23195 23193 23193 23203 23190
23192 23190 23194 23191 23193 23194 23195 23202 23195 23194 23182 23207 23193 23209 23190
23194 23193 23194 23229 23193 23193 23192 23195 23197 23203 23184 23192 23193 23203 23189
23207 23191 23204 23198 23197 23196 23195 23191 23193 23180 23188 23192 23193 23190 23189
23190 23177 23194 23204 23192 23205 23196 23203 23190 23194 23181 23194 23194 23191 23190
23192 23192 23191 23243 23201 23197 23195 23205 23204 23180 23184 23210 23190 23201 23191
23190 23180 23195 23190 23203 23195 23195 23193 23193 23198 23184 23194 23192 23200 23189
23190 23193 23193 23214 23205 23195 23191 23192 23195 23197 23184 23194 23193 23204 23191

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 23185 bytes 100%
1,000 23183 bytes -2 bytes 100%
10,000 23179 bytes -4 bytes 100%
100,000 23178 bytes -1 byte 4.93%
1,000,000 23176 bytes -2 bytes 0.58%
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
23274 bytes +98 bytes (+0.42%) +24 bytes
23434 bytes +258 bytes (+1.11%) +184 bytes
23311 bytes +135 bytes (+0.58%) +61 bytes
23250 bytes +74 bytes (+0.32%)
23268 bytes +92 bytes (+0.40%) +18 bytes
23274 bytes +98 bytes (+0.42%) +24 bytes
23269 bytes +93 bytes (+0.40%) +19 bytes
23286 bytes +110 bytes (+0.47%) +36 bytes
23316 bytes +140 bytes (+0.60%) +66 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 19435 bytes -3741 bytes (-16.14%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 20101 bytes -3075 bytes (-13.27%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 20923 bytes -2253 bytes (-9.72%)
Brotli (Wikipedia) brotli brotli -q 11 21675 bytes -1501 bytes (-6.48%)
LZMA2 (Wikipedia) xz xz -9 22184 bytes -992 bytes (-4.28%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 22469 bytes -707 bytes (-3.05%)
ZSTD (Wikipedia) zstd zstd -19 23038 bytes -138 bytes (-0.60%)

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