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

After GZIP compression these minified files vary in size:
Boot
  27290 bytes (26.7k)
CDN
cdnjs
  24249 bytes (23.7k)
CDN
gzip -6 (default)
  23078 bytes (22.5k)
local copy
unpkg
  23063 bytes (22.5k)
CDN
jsdelivr
  23019 bytes (22.5k)
CDN
gzip -9
  23016 bytes (22.5k)
local copy
libdeflate -12
  22327 bytes (21.8k)
local copy
7zip -mx=9 -tgzip
  22282 bytes (21.8k)
local copy
zultra
  22281 bytes (21.8k)
local copy
kzip -s0 -rn -b4
  22263 bytes (21.7k)
local copy
pigz -11 -n
  22235 bytes (21.7k)
local copy
Zopfli
  22188 bytes (21.7k)
local copy

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

You will automatically get the smallest lodash 4.14.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 831 bytes by using my lodash 4.14.1 Zopfli version instead of the best available CDN (3.75% smaller than jsdelivr, 22188 vs. 23019 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 --mls256 --bsr21 --lazy --ohh

(found July 29, 2016)
Description Value Parameter
iterations 1000000  --i1000000
maximum blocks 8  --mb8
maximum length score 256  --mls256
block splitting recursion 21  --bsr21
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.14.1/dist/lodash.min.js --location | md5sum
4836716efb8c406b7a67499c93076339  -
curl --silent --compressed https://minime.stephan-brumme.com/files/lodash/lodash-4.14.1.min.zopfli.js.gz | md5sum
4836716efb8c406b7a67499c93076339  -

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

These CDNs send you the original file:
CDN Size (compressed) MD5 (uncompressed) Timestamp
unpkg 23063 bytes 4836716efb8c406b7a67499c93076339 July 29, 2016 @ 23:29
jsdelivr 23019 bytes 4836716efb8c406b7a67499c93076339 (invalid)

And some CDNs send you a different file:
CDN Size (compressed) MD5 (uncompressed) Comment / Diff Timestamp
Boot 27290 bytes 5cfaf2056634e8c0c5f3ccf7da4f4c7a < /**
< * @license
< * lodash lodash.com/license | Underscore.js 1.8.3 undersc [...]
< */
< ;(function(){function t(t,n){return t.set(n[0],n[1]),t}fun [...]
< return t}function i(t,n){for(var r=-1,e=t?t.length:0;++r<e [...]
< var u=-1,o=t?t.length:0;for(e&&o&&(r=t[++u]);++u<o;)r=n(r, [...]
< return-1}function y(t,n,r,e){--r;for(var u=t.length;++r<u; [...]
< }return r}function k(t,n){for(var r=-1,e=Array(t);++r<t;)e [...]
< n=!!(t+"")}catch(t){}return n}function L(t){for(var n,r=[] [...]
[...]
July 29, 2016 @ 16:04
cdnjs 24249 bytes 5cfaf2056634e8c0c5f3ccf7da4f4c7a < /**
< * @license
< * lodash lodash.com/license | Underscore.js 1.8.3 undersc [...]
< */
< ;(function(){function t(t,n){return t.set(n[0],n[1]),t}fun [...]
< return t}function i(t,n){for(var r=-1,e=t?t.length:0;++r<e [...]
< var u=-1,o=t?t.length:0;for(e&&o&&(r=t[++u]);++u<o;)r=n(r, [...]
< return-1}function y(t,n,r,e){--r;for(var u=t.length;++r<u; [...]
< }return r}function k(t,n){for(var r=-1,e=Array(t);++r<t;)e [...]
< n=!!(t+"")}catch(t){}return n}function L(t){for(var n,r=[] [...]
[...]
(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
22188 bytes -3 bytes zopfli --i1000000 --mls256 --bsr21 --lazy --ohh July 29, 2016 @ 18:00
22191 bytes -4 bytes zopfli --i100000 --mls256 --bsr21 --lazy --ohh July 29, 2016 @ 12:07
22195 bytes -1 byte zopfli --i100000 --mls64 --bsr8 --lazy --ohh July 29, 2016 @ 11:30
22196 bytes -1 byte zopfli --i10000 --mls256 --bsr21 --lazy --ohh July 29, 2016 @ 11:17
22197 bytes -1 byte zopfli --i10000 --mls64 --bsr8 --lazy --ohh July 29, 2016 @ 10:55
22198 bytes -2 bytes zopfli --i1000 --mls64 --bsr8 --lazy --ohh July 29, 2016 @ 10:51
22200 bytes -6 bytes zopfli --i1000 --mls64 --bsr17 --lazy --ohh July 29, 2016 @ 10:51
22206 bytes zopfli --i100 --mls32 --bsr9 --lazy --ohh July 29, 2016 @ 10:48

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

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
22229 22228 22230 22234 22234 22231 22233 22232 22231 22233 22232 22229 22231 22235 22235
22212 22216 22225 22218 22230 22226 22218 22222 22195 22223 22220 22213 22227 22219 22234
22205 22205 22205 22207 22207 22236 22213 22211 22201 22212 22201 22217 22206 22224 22209
22207 22210 22221 22207 22225 22209 22212 22210 22209 22211 22212 22202 22213 22228 22213
22216 22208 22208 22215 22208 22195 22214 22207 22213 22217 22199 22202 22224 22212 22213
22209 22201 22217 22199 22195 22200 22203 22212 22199 22211 22199 22200 22211 22212 22223
22214 22215 22220 22223 22208 22195 22213 22207 22214 22212 22215 22200 22215 22205 22216
22213 22208 22225 22217 22209 22225 22211 22211 22191 22211 22212 22202 22207 22223 22216
22200 22199 22218 22206 22210 22207 22216 22207 22199 22212 22217 22204 22216 22228 22210
22217 22213 22219 22222 22231 22208 22212 22208 22199 22213 22214 22203 22202 22201 22211
22216 22208 22219 22208 22209 22194 22213 22209 22201 22211 22212 22214 22214 22228 22213
22215 22211 22225 22206 22214 22204 22213 22211 22210 22211 22210 22201 22200 22224 22211
22208 22206 22221 22224 22207 22200 22211 22211 22200 22212 22219 22200 22218 22214 22216
22209 22207 22206 22214 22207 22195 22210 22208 22214 22214 22200 22200 22199 22211 22215
22209 22209 22224 22213 22204 22215 22212 22210 22211 22212 22212 22202 22202 22204 22209
22207 22199 22201 22219 22205 22206 22214 22199 22200 22212 22199 22207 22202 22208 22210
22208 22213 22206 22203 22203 22210 22213 22213 22213 22210 22201 22211 22200 22218 22209
22208 22210 22218 22209 22205 22203 22212 22188 22199 22209 22210 22203 22208 22226 22212
22215 22205 22216 22206 22222 22213 22211 22208 22207 22217 22219 22211 22207 22226 22215
22213 22206 22229 22217 22211 22214 22211 22209 22189 22209 22211 22203 22206 22209 22215
22213 22209 22221 22217 22223 22217 22210 22212 22210 22213 22219 22213 22205 22225 22213
22211 22207 22205 22206 22206 22200 22202 22207 22213 22210 22210 22202 22203 22207 22212
22209 22200 22206 22206 22201 22207 22203 22210 22200 22218 22215 22200 22211 22215 22208

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 22206 bytes 100%
1,000 22198 bytes -8 bytes 100%
10,000 22196 bytes -2 bytes 100%
100,000 22191 bytes -5 bytes 2.61%
1,000,000 22188 bytes -3 bytes 0.87%
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
22278 bytes +90 bytes (+0.41%) +15 bytes
22336 bytes +148 bytes (+0.67%) +73 bytes
22265 bytes +77 bytes (+0.35%) +2 bytes
22277 bytes +89 bytes (+0.40%) +14 bytes
22263 bytes +75 bytes (+0.34%)
22283 bytes +95 bytes (+0.43%) +20 bytes
22296 bytes +108 bytes (+0.49%) +33 bytes
22324 bytes +136 bytes (+0.61%) +61 bytes
22350 bytes +162 bytes (+0.73%) +87 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 18719 bytes -3469 bytes (-15.63%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 19086 bytes -3102 bytes (-13.98%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 19487 bytes -2701 bytes (-12.17%)
Brotli (Wikipedia) brotli brotli -q 11 20839 bytes -1349 bytes (-6.08%)
LZMA2 (Wikipedia) xz xz -9 21324 bytes -864 bytes (-3.89%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 21488 bytes -700 bytes (-3.15%)
Zstandard (Wikipedia) zstd zstd -19 22047 bytes -141 bytes (-0.64%)

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.