Choose a version:
14% The original file has 539595 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 73121 bytes (71.4k, 14%).

After GZIP compression these minified files vary in size:
Boot
  29178 bytes (28.5k)
CDN
cdnjs
  25881 bytes (25.3k)
CDN
unpkg
  24412 bytes (23.8k)
CDN
gzip -6 (default)
  24378 bytes (23.8k)
local copy
gzip -9
  24310 bytes (23.7k)
local copy
7zip -mx=9 -tgzip
  23487 bytes (22.9k)
local copy
libdeflate -12
  23475 bytes (22.9k)
local copy
kzip -s0 -rn -b3
  23398 bytes (22.8k)
local copy
pigz -11 -n
  23353 bytes (22.8k)
local copy
Zopfli
  23319 bytes (22.8k)
local copy

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

You will automatically get the smallest lodash 4.17.5 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 1093 bytes by using my lodash 4.17.5 Zopfli version instead of the best available CDN (4.69% smaller than unpkg, 23319 vs. 24412 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 --mls8 --bsr8 --lazy --ohh

(found February 5, 2018)
Description Value Parameter
iterations 1000000  --i1000000
maximum blocks 8  --mb8
maximum length score 8  --mls8
block splitting recursion 8  --bsr8
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.5/dist/lodash.min.js --location | md5sum
3b37864847459979b900d7ba3e9f6114  -
curl --silent --compressed http://minime.stephan-brumme.com/files/lodash/lodash-4.17.5.min.zopfli.js.gz | md5sum
3b37864847459979b900d7ba3e9f6114  -

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

These CDNs send you the original file:
CDN Size (compressed) MD5 (uncompressed) Timestamp
unpkg 24412 bytes 3b37864847459979b900d7ba3e9f6114 (invalid)

And some CDNs send you a different file:
CDN Size (compressed) MD5 (uncompressed) Comment / Diff Timestamp
Boot 29178 bytes 4476bd01863a68c7bdfe2fde84749d4d < * Lodash lodash.com/license | Underscore.js 1.8.3 undersc [...]
> * Lodash <https://lodash.com/>
> * Copyright JS Foundation and other contributors <https:/ [...]
> * Released under MIT license <https://lodash.com/license>
> * Based on Underscore.js 1.8.3 <http://underscorejs.org/L [...]
> * Copyright Jeremy Ashkenas, DocumentCloud and Investigat [...]
< ;(function(){function n(n,t,r){switch(r.length){case 0:ret [...]
< return true}function i(n,t){for(var r=-1,e=null==n?0:n.len [...]
< return r}function s(n,t,r,e){var u=null==n?0:n.length;for( [...]
< --r;for(var u=n.length;++r<u;)if(e(n[r],t))return r;return [...]
[...]
(invalid)
cdnjs 25881 bytes 4476bd01863a68c7bdfe2fde84749d4d < * Lodash lodash.com/license | Underscore.js 1.8.3 undersc [...]
> * Lodash <https://lodash.com/>
> * Copyright JS Foundation and other contributors <https:/ [...]
> * Released under MIT license <https://lodash.com/license>
> * Based on Underscore.js 1.8.3 <http://underscorejs.org/L [...]
> * Copyright Jeremy Ashkenas, DocumentCloud and Investigat [...]
< ;(function(){function n(n,t,r){switch(r.length){case 0:ret [...]
< return true}function i(n,t){for(var r=-1,e=null==n?0:n.len [...]
< return r}function s(n,t,r,e){var u=null==n?0:n.length;for( [...]
< --r;for(var u=n.length;++r<u;)if(e(n[r],t))return r;return [...]
[...]
(invalid)

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
23319 bytes -2 bytes zopfli --i1000000 --mls8 --bsr8 --lazy --ohh February 5, 2018 @ 19:52
23321 bytes -3 bytes zopfli --i10000 --mls8 --bsr8 --lazy --ohh February 5, 2018 @ 14:06
23324 bytes -1 byte zopfli --i1000 --mls8 --bsr14 --lazy --ohh February 5, 2018 @ 13:43
23325 bytes -6 bytes zopfli --i1000 --mls8 --bsr12 --lazy --ohh February 5, 2018 @ 13:42
23331 bytes zopfli --i100 --mls8 --bsr18 --lazy --ohh February 5, 2018 @ 13:39

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

Most recent activity on February 6, 2018 @ 00:44.

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
23369 23370 23369 23361 23365 23365 23359 23359 23360 23363 23370 23352 23359 23381 23362
23353 23354 23353 23363 23364 23348 23358 23356 23355 23358 23353 23352 23347 23347 23334
23354 23345 23352 23340 23348 23341 23342 23340 23350 23336 23337 23342 23335 23359 23345
23336 23334 23373 23342 23337 23357 23357 23369 23355 23335 23336 23332 23344 23334 23345
23335 23334 23319 23356 23343 23345 23341 23351 23357 23338 23336 23342 23339 23331 23347
23354 23325 23355 23372 23354 23363 23346 23355 23337 23324 23355 23333 23342 23350 23349
23336 23339 23334 23361 23338 23343 23349 23341 23354 23337 23343 23336 23325 23333 23332
23348 23349 23356 23354 23359 23360 23355 23354 23334 23335 23353 23336 23352 23355 23342
23333 23328 23325 23358 23342 23337 23340 23344 23327 23334 23334 23343 23351 23332 23334
23352 23350 23360 23354 23341 23343 23356 23353 23341 23341 23347 23341 23337 23348 23344
23340 23320 23323 23373 23341 23342 23366 23342 23342 23332 23337 23345 23345 23359 23345
23335 23327 23343 23357 23358 23340 23357 23341 23357 23337 23337 23335 23342 23335 23344
23350 23349 23340 23333 23335 23341 23346 23340 23343 23335 23326 23336 23346 23350 23345
23337 23334 23334 23373 23358 23356 23342 23338 23341 23336 23354 23346 23336 23358 23338
23336 23333 23324 23358 23339 23343 23352 23354 23335 23338 23332 23331 23339 23335 23344
23350 23334 23355 23358 23359 23355 23341 23339 23332 23331 23338 23332 23344 23350 23344
23337 23334 23341 23342 23344 23342 23343 23341 23333 23332 23337 23332 23332 23332 23331
23352 23334 23333 23356 23341 23342 23344 23338 23355 23337 23339 23337 23324 23332 23346
23335 23333 23355 23359 23359 23341 23342 23337 23334 23335 23333 23341 23346 23359 23332
23337 23334 23333 23341 23343 23342 23351 23346 23355 23334 23335 23335 23336 23334 23331
23338 23334 23334 23353 23345 23345 23348 23344 23359 23338 23335 23351 23336 23351 23334
23325 23333 23341 23342 23343 23343 23352 23340 23336 23337 23339 23336 23336 23358 23332
23350 23350 23332 23340 23359 23344 23345 23348 23343 23337 23337 23336 23334 23334 23334

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 23331 bytes 100%
1,000 23324 bytes -7 bytes 100%
10,000 23321 bytes -3 bytes 100%
100,000 23321 bytes 0.87%
1,000,000 23319 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
23421 bytes +102 bytes (+0.44%) +23 bytes
23578 bytes +259 bytes (+1.11%) +180 bytes
23452 bytes +133 bytes (+0.57%) +54 bytes
23398 bytes +79 bytes (+0.34%)
23416 bytes +97 bytes (+0.42%) +18 bytes
23422 bytes +103 bytes (+0.44%) +24 bytes
23416 bytes +97 bytes (+0.42%) +18 bytes
23440 bytes +121 bytes (+0.52%) +42 bytes
23459 bytes +140 bytes (+0.60%) +61 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 19570 bytes -3749 bytes (-16.08%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 20215 bytes -3104 bytes (-13.31%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 21018 bytes -2301 bytes (-9.87%)
Brotli (Wikipedia) brotli brotli -q 11 21772 bytes -1547 bytes (-6.63%)
LZMA2 (Wikipedia) xz xz -9 22312 bytes -1007 bytes (-4.32%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 22561 bytes -758 bytes (-3.25%)
ZSTD (Wikipedia) zstd zstd -19 23185 bytes -134 bytes (-0.57%)

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