Choose a version:
48% The original file has 513822 bytes (501.8k) and is available from the project website.
There you can find the official minified version, too, which brings down the size to 247388 bytes (241.6k, 48%).

After GZIP compression these minified files vary in size:
unpkg
  93441 bytes (91.3k)
CDN
Boot
  81779 bytes (79.9k)
CDN
cdnjs
  81779 bytes (79.9k)
CDN
gzip -6 (default)
  81138 bytes (79.2k)
local copy
gzip -9
  80821 bytes (78.9k)
local copy
libdeflate -12
  77498 bytes (75.7k)
local copy
7zip -mx=9 -tgzip
  77121 bytes (75.3k)
local copy
kzip -s0 -rn -b8
  76883 bytes (75.1k)
local copy
zultra
  76808 bytes (75.0k)
local copy
pigz -11 -n
  76670 bytes (74.9k)
local copy
Zopfli
  76629 bytes (74.8k)
local copy
Zopfli (defluff)
  76625 bytes (74.8k)
local copy

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

You will automatically get the smallest D3 5.14.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 5150 bytes by using my D3 5.14.0 Zopfli version instead of the best available CDN (6.72% smaller than cdnjs, 76629 vs. 81779 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 --mls4096 --bsr18 --lazy --ohh

(found November 20, 2019)
Description Value Parameter
iterations 1000000  --i1000000
maximum blocks 8  --mb8
maximum length score 4096  --mls4096
block splitting recursion 18  --bsr18
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 4 more bytes (76625 bytes).

Verify file integrity

After decompression, my uncompressed files are identical to the original ones:

MD5:
curl --silent --compressed https://raw.githubusercontent.com/mbostock/d3/v5.14.0/d3.zip --location | md5sum
520c675aa570dea550fefdb9692d6c18  -
curl --silent --compressed https://minime.stephan-brumme.com/files/d3/d3-5.14.0.min.zopfli.js.gz | md5sum
520c675aa570dea550fefdb9692d6c18  -

SHA1:
curl --silent --compressed https://raw.githubusercontent.com/mbostock/d3/v5.14.0/d3.zip --location | sha1sum
6b444c02cee8c9007224df5769f282f84a8d2e43  -
curl --silent --compressed https://minime.stephan-brumme.com/files/d3/d3-5.14.0.min.zopfli.js.gz | sha1sum
6b444c02cee8c9007224df5769f282f84a8d2e43  -

All listed CDNs deliver identical contents:
CDN Size (compressed) MD5 (uncompressed) Timestamp
unpkg 93441 bytes 520c675aa570dea550fefdb9692d6c18 (invalid)
Boot 81779 bytes 520c675aa570dea550fefdb9692d6c18 November 27, 2019 @ 19:31
cdnjs 81779 bytes 520c675aa570dea550fefdb9692d6c18 November 27, 2019 @ 19:31

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

Other Versions

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

6.7.0, 6.6.2, 6.6.1, 6.6.0, 6.5.0, 6.4.0, 6.3.1, 6.2.0, 6.1.1, 6.1.0, 6.0.0,
5.16.0, 5.15.1, 5.15.0, 5.14.2, 5.14.1, 5.14.0, 5.13.1, 5.13.0, 5.12.0, 5.11.0, 5.10.1, 5.10.0,
5.9.7, 5.9.6, 5.9.5, 5.9.4, 5.9.3, 5.9.2, 5.9.1, 5.9.0, 5.8.2, 5.8.1, 5.8.0, 5.7.0, 5.6.0, 5.5.0, 5.4.0, 5.3.0, 5.2.0, 5.1.0, 5.0.1, 5.0.0,
4.13.0, 4.12.2, 4.12.1, 4.12.0, 4.11.0, 4.10.2, 4.10.1, 4.10.0,
4.9.1, 4.9.0, 4.8.0, 4.7.4, 4.7.3, 4.7.2, 4.7.1, 4.7.0, 4.6.0, 4.5.0, 4.4.4, 4.4.3, 4.4.2, 4.4.1, 4.4.0, 4.3.0, 4.2.8, 4.2.7, 4.2.6, 4.2.5, 4.2.4, 4.2.3, 4.2.2, 4.2.1, 4.2.0, 4.1.1, 4.1.0, 4.0.0,
3.5.17, 3.5.16, 3.5.15, 3.5.14, 3.5.13, 3.5.12, 3.5.11, 3.5.10, 3.5.9, 3.5.8, 3.5.7, 3.5.6, 3.5.5, 3.5.4, 3.5.3, 3.5.2, 3.5.1, 3.5.0, 3.4.13, 3.4.12, 3.4.11, 3.4.10, 3.4.9, 3.4.8, 3.4.6, 3.4.5, 3.4.4, 3.4.3, 3.4.2, 3.4.1, 3.4.0, 3.3.13, 3.3.12, 3.3.11, 3.3.10, 3.3.9, 3.3.8, 3.3.7, 3.3.6, 3.3.5, 3.3.4, 3.3.3, 3.3.2, 3.3.1, 3.3.0, 3.2.8, 3.2.7, 3.2.6, 3.2.5, 3.2.4, 3.2.3, 3.2.2, 3.2.1, 3.2.0, 3.1.10, 3.1.9, 3.1.8, 3.1.7, 3.1.6, 3.1.5, 3.1.4, 3.1.3, 3.1.2, 3.1.1, 3.1.0, 3.0.8, 3.0.7, 3.0.6, 3.0.5, 3.0.4, 3.0.3, 3.0.2, 3.0.1, 3.0.0

The project site contains an overview how well these versions were compressed.
Other interesting projects are AngularJS, BackboneJS, Bootstrap, Dojo, Ember, jQuery, Knockout, lodash, React, Socket.IO, ThreeJS, UnderscoreJS and Vue.

Changelog

Best Zopfli parameters so far:
Size Improvement Parameters Found
76629 bytes -4 bytes zopfli --i1000000 --mls4096 --bsr18 --lazy --ohh November 20, 2019 @ 07:09
76633 bytes -9 bytes zopfli --i100000 --mls4096 --bsr18 --lazy --ohh November 19, 2019 @ 12:06
76642 bytes -7 bytes zopfli --i10000 --mls4096 --bsr18 --lazy --ohh November 18, 2019 @ 23:59
76649 bytes -5 bytes zopfli --i1000 --mls4096 --bsr18 --lazy --ohh November 18, 2019 @ 18:12
76654 bytes -3 bytes zopfli --i1000 --mls4096 --bsr20 --lazy --ohh November 18, 2019 @ 18:06
76657 bytes -7 bytes zopfli --i1000 --mls8192 --bsr30 --lazy --ohh November 18, 2019 @ 18:02
76664 bytes -11 bytes zopfli --i1000 --mls4 --bsr15 --lazy --ohh November 18, 2019 @ 18:00
76675 bytes zopfli --i100 --mls4096 --bsr18 --lazy --ohh November 18, 2019 @ 17:03

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

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
77026 77017 77096 77080 77111 77097 77105 77084 77203 77216 77041 77230 77020 77035 77290
76892 76872 76931 76900 76727 76734 76733 76917 77128 76916 76879 76774 76823 77001 76862
76672 76976 76865 76661 76986 76871 76670 76862 76856 76878 76879 76667 76812 76820 76822
76757 76866 76875 76672 76872 76673 76898 76871 76864 76906 76883 76860 76813 76892 76861
76871 76674 76969 76960 76961 76731 76958 76948 76962 76989 77037 76669 76658 76911 76846
76666 76656 76863 76862 76860 76664 76661 76862 76858 76876 76838 76699 76880 76918 76861
76663 76987 76849 76865 76984 76874 76863 76854 76857 76880 76872 76663 76660 76885 76860
76985 76987 76983 76983 76982 76863 76862 76863 76870 76837 76671 76673 76676 76861 76831
76669 76656 76846 76843 76982 76661 76856 76861 76856 76878 76845 76676 76805 76732 76832
76969 76984 76987 76868 76864 76864 76856 76865 76858 76875 76845 76685 76803 76817 76820
76967 76842 76862 76860 76870 76862 76856 76856 76860 76887 76664 76674 76673 76845 76837
76991 76650 76866 76974 76862 76864 76857 76861 76859 76874 76847 76667 76802 76840 76832
76988 76652 76867 76856 76982 76859 76855 76855 76862 76879 76868 76659 76813 76857 76836
76963 76653 76968 76987 76866 76774 76863 76949 76856 76875 76887 76666 76803 76841 76835
76658 76988 76865 76865 76985 76862 76858 76864 76856 76878 76871 76629 76813 76820 76839
76981 76986 76860 76855 76964 76973 76860 76955 76857 76876 76844 76665 76814 76818 76713
76991 76857 76860 76860 76983 76659 76858 76853 76841 76881 76870 76636 76805 76812 76823
76975 76654 76985 76988 76984 76661 76861 76857 76858 76877 76847 76661 76816 76883 76836
77003 76985 76852 76959 76984 76662 76860 76856 76862 76879 76847 76653 76811 76884 76836
76964 76970 76988 76958 76983 76665 76862 76858 76856 76876 76873 76676 76805 76885 76812
76990 76669 76865 76854 76985 76867 76858 76858 76860 76876 76844 76682 76812 76881 76825
76983 76978 76970 76981 76983 76868 76858 76858 76862 76872 76848 76651 76653 76654 76829
76964 76967 76982 76843 76868 76664 76858 76860 76858 76874 76869 76672 76798 76857 76807

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 76675 bytes 100%
1,000 76649 bytes -26 bytes 100%
10,000 76642 bytes -7 bytes 100%
100,000 76633 bytes -9 bytes 0.58%
1,000,000 76629 bytes -4 bytes 0.29%
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
77052 bytes +423 bytes (+0.55%) +169 bytes
78430 bytes +1801 bytes (+2.35%) +1547 bytes
78292 bytes +1663 bytes (+2.17%) +1409 bytes
77056 bytes +427 bytes (+0.56%) +173 bytes
77068 bytes +439 bytes (+0.57%) +185 bytes
77050 bytes +421 bytes (+0.55%) +167 bytes
77030 bytes +401 bytes (+0.52%) +147 bytes
76975 bytes +346 bytes (+0.45%) +92 bytes
76883 bytes +254 bytes (+0.33%)

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 60289 bytes -16340 bytes (-21.32%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 67105 bytes -9524 bytes (-12.43%)
LZMA2 (Wikipedia) xz xz -9 67984 bytes -8645 bytes (-11.28%)
Brotli (Wikipedia) brotli brotli -q 11 68233 bytes -8396 bytes (-10.96%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 70143 bytes -6486 bytes (-8.46%)
Zstandard (Wikipedia) zstd zstd -19 73454 bytes -3175 bytes (-4.14%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 76173 bytes -456 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 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.