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

After GZIP compression these minified files vary in size:
Boot
  37763 bytes (36.9k)
CDN
cdnjs
  31030 bytes (30.3k)
CDN
gzip -6 (default)
  21216 bytes (20.7k)
local copy
unpkg
  21183 bytes (20.7k)
CDN
Yandex
  21141 bytes (20.6k)
CDN
jsdelivr
  21141 bytes (20.6k)
CDN
gzip -9
  21137 bytes (20.6k)
local copy
7zip -mx=9 -tgzip
  20498 bytes (20.0k)
local copy
libdeflate -12
  20497 bytes (20.0k)
local copy
zultra
  20426 bytes (19.9k)
local copy
kzip -s0 -rn -b4
  20414 bytes (19.9k)
local copy
pigz -11 -n
  20366 bytes (19.9k)
local copy
Zopfli
  20335 bytes (19.9k)
local copy

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

You will automatically get the smallest lodash 4.5.1 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 806 bytes by using my lodash 4.5.1 Zopfli version instead of the best available CDN (3.96% smaller than jsdelivr, 20335 vs. 21141 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 --mls32 --bsr15 --lazy --ohh

(found April 13, 2016)
Description Value Parameter
iterations 100000  --i100000
maximum blocks 8  --mb8
maximum length score 32  --mls32
block splitting recursion 15  --bsr15
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.5.1/dist/lodash.min.js --location | md5sum
535efc6f629419bff5516efbbb58fbec  -
curl --silent --compressed https://minime.stephan-brumme.com/files/lodash/lodash-4.5.1.min.zopfli.js.gz | md5sum
535efc6f629419bff5516efbbb58fbec  -

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

These CDNs send you the original file:
CDN Size (compressed) MD5 (uncompressed) Timestamp
unpkg 21183 bytes 535efc6f629419bff5516efbbb58fbec July 11, 2016 @ 16:46
Yandex 21141 bytes 535efc6f629419bff5516efbbb58fbec February 1, 2019 @ 15:45
jsdelivr 21141 bytes 535efc6f629419bff5516efbbb58fbec (invalid)

And some CDNs send you a different file:
CDN Size (compressed) MD5 (uncompressed) Comment / Diff Timestamp
Boot 37763 bytes e35b41ebee1edb99c3fade76283347c2 < /**
< * @license
< * lodash 4.5.1 (Custom Build) lodash.com/license | Unders [...]
< * Build: `lodash -o ./dist/lodash.js`
< */
< ;(function(){function n(n,t){return n.set(t[0],t[1]),n}fun [...]
< return true}function i(n,t){for(var r=-1,e=n.length,u=-1,o [...]
< var u=n.length;for(e&&u&&(r=n[--u]);u--;)r=t(r,n[u],u,n);r [...]
< return-1}function y(n,t,r,e,u){return u(n,function(n,u,o){ [...]
< return r}function k(n,t){for(var r=n.length;r--&&-1<d(t,n[ [...]
[...]
(invalid)
cdnjs 31030 bytes e35b41ebee1edb99c3fade76283347c2 < /**
< * @license
< * lodash 4.5.1 (Custom Build) lodash.com/license | Unders [...]
< * Build: `lodash -o ./dist/lodash.js`
< */
< ;(function(){function n(n,t){return n.set(t[0],t[1]),n}fun [...]
< return true}function i(n,t){for(var r=-1,e=n.length,u=-1,o [...]
< var u=n.length;for(e&&u&&(r=n[--u]);u--;)r=t(r,n[u],u,n);r [...]
< return-1}function y(n,t,r,e,u){return u(n,function(n,u,o){ [...]
< return r}function k(n,t){for(var r=n.length;r--&&-1<d(t,n[ [...]
[...]
(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
20335 bytes -1 byte zopfli --i100000 --mls32 --bsr15 --lazy --ohh April 13, 2016 @ 16:52
20336 bytes -1 byte zopfli --i100000 --mls1024 --bsr16 --lazy --ohh April 13, 2016 @ 16:17
20337 bytes -2 bytes zopfli --i10000 --mls1024 --bsr16 --lazy --ohh April 13, 2016 @ 10:11
20339 bytes -2 bytes zopfli --i10000 --mls64 --bsr19 --lazy --ohh April 12, 2016 @ 17:56
20341 bytes -5 bytes zopfli --i10000 --mls128 --bsr19 --lazy --ohh April 12, 2016 @ 10:45
20346 bytes -5 bytes zopfli --i1000 --mls128 --bsr19 --lazy --ohh April 12, 2016 @ 10:39
20351 bytes zopfli --i100 --mls128 --bsr19 --lazy --ohh April 12, 2016 @ 03:09

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:50.

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
20368 20368 20369 20390 20389 20392 20392 20389 20388 20383 20379 20359 20369 20362 20386
20346 20342 20343 20346 20348 20351 20348 20349 20342 20360 20357 20364 20361 20351 20357
20341 20339 20354 20347 20340 20348 20339 20343 20351 20350 20349 20359 20371 20341 20351
20345 20340 20342 20341 20339 20339 20339 20342 20342 20347 20365 20361 20343 20362 20351
20346 20338 20338 20342 20340 20337 20340 20342 20344 20338 20342 20345 20341 20339 20350
20342 20349 20344 20344 20339 20354 20340 20344 20342 20346 20342 20362 20341 20345 20350
20341 20342 20341 20345 20346 20345 20341 20342 20342 20359 20342 20365 20363 20364 20349
20340 20340 20340 20342 20339 20339 20339 20343 20341 20347 20342 20344 20341 20364 20349
20344 20339 20343 20341 20338 20337 20340 20342 20342 20348 20348 20362 20346 20344 20349
20344 20343 20345 20343 20339 20335 20341 20340 20343 20340 20362 20344 20359 20344 20350
20341 20340 20343 20341 20343 20338 20340 20340 20342 20340 20341 20339 20340 20342 20351
20341 20342 20340 20340 20335 20339 20339 20342 20342 20360 20343 20345 20344 20344 20353
20342 20340 20342 20341 20344 20338 20340 20341 20339 20336 20361 20365 20361 20342 20348
20345 20343 20342 20342 20343 20337 20338 20343 20340 20360 20345 20338 20361 20364 20352
20341 20344 20340 20339 20341 20339 20339 20339 20344 20359 20344 20343 20345 20341 20352
20344 20342 20346 20340 20344 20339 20341 20339 20341 20360 20348 20341 20343 20342 20348
20344 20342 20342 20339 20339 20343 20340 20341 20342 20359 20342 20362 20361 20345 20349
20344 20339 20346 20341 20338 20340 20340 20339 20343 20360 20341 20347 20341 20345 20353
20343 20342 20343 20343 20343 20339 20340 20340 20341 20360 20342 20363 20343 20345 20351
20345 20339 20338 20340 20340 20338 20340 20342 20340 20359 20344 20362 20341 20343 20351
20345 20341 20341 20342 20340 20339 20340 20342 20341 20341 20362 20340 20341 20363 20353
20345 20345 20343 20341 20343 20340 20340 20342 20341 20360 20349 20362 20360 20345 20350
20343 20340 20341 20341 20338 20342 20340 20342 20339 20361 20347 20359 20342 20343 20351

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 20351 bytes 100%
1,000 20341 bytes -10 bytes 100%
10,000 20336 bytes -5 bytes 100%
100,000 20335 bytes -1 byte 0.87%
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
20430 bytes +95 bytes (+0.47%) +16 bytes
20490 bytes +155 bytes (+0.76%) +76 bytes
20420 bytes +85 bytes (+0.42%) +6 bytes
20430 bytes +95 bytes (+0.47%) +16 bytes
20414 bytes +79 bytes (+0.39%)
20421 bytes +86 bytes (+0.42%) +7 bytes
20444 bytes +109 bytes (+0.54%) +30 bytes
20462 bytes +127 bytes (+0.62%) +48 bytes
20478 bytes +143 bytes (+0.70%) +64 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 17303 bytes -3032 bytes (-14.91%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 17567 bytes -2768 bytes (-13.61%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 18685 bytes -1650 bytes (-8.11%)
Brotli (Wikipedia) brotli brotli -q 11 19162 bytes -1173 bytes (-5.77%)
LZMA2 (Wikipedia) xz xz -9 19616 bytes -719 bytes (-3.54%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 19673 bytes -662 bytes (-3.26%)
Zstandard (Wikipedia) zstd zstd -19 20240 bytes -95 bytes (-0.47%)

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.