Choose a version:
41% The original file has 122579 bytes (119.7k) and is available from the project website.
There you can find the official minified version, too, which brings down the size to 50731 bytes (49.5k, 41%).

After GZIP compression these minified files vary in size:
Boot
  17045 bytes (16.6k)
CDN
Microsoft
  14073 bytes (13.7k)
CDN
gzip -6 (default)
  14072 bytes (13.7k)
local copy
MaxCDN
  14049 bytes (13.7k)
CDN
gzip -9
  14028 bytes (13.7k)
local copy
cdnjs
  13992 bytes (13.7k)
CDN
unpkg
  13992 bytes (13.7k)
CDN
libdeflate -12
  13589 bytes (13.3k)
local copy
7zip -mx=9 -tgzip
  13584 bytes (13.3k)
local copy
kzip -s0 -rn -b3
  13510 bytes (13.2k)
local copy
pigz -11 -n
  13508 bytes (13.2k)
local copy
Zopfli
  13480 bytes (13.2k)
local copy
Zopfli (defluff)
  13479 bytes (13.2k)
local copy

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

You will automatically get the smallest Bootstrap 4.1.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 512 bytes by using my Bootstrap 4.1.1 Zopfli version instead of the best available CDN (3.80% smaller than unpkg, 13480 vs. 13992 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 --i10000 --mb8 --mls2 --bsr30 --lazy --ohh

(found April 30, 2018)
Description Value Parameter
iterations 10000  --i10000
maximum blocks 8  --mb8
maximum length score 2  --mls2
block splitting recursion 30  --bsr30
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 1 more byte (13479 bytes).

Verify file integrity

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

MD5:
curl --silent --compressed https://raw.githubusercontent.com/twbs/bootstrap/v4.1.1/dist/js/bootstrap.min.js --location | md5sum
eb5fac582a82f296aeb74900b01a2fa3  -
curl --silent --compressed https://minime.stephan-brumme.com/files/bootstrap/bootstrap-4.1.1.min.zopfli.js.gz | md5sum
eb5fac582a82f296aeb74900b01a2fa3  -

SHA1:
curl --silent --compressed https://raw.githubusercontent.com/twbs/bootstrap/v4.1.1/dist/js/bootstrap.min.js --location | sha1sum
fffea98e12e63b66693d567315a2f32392b780b0  -
curl --silent --compressed https://minime.stephan-brumme.com/files/bootstrap/bootstrap-4.1.1.min.zopfli.js.gz | sha1sum
fffea98e12e63b66693d567315a2f32392b780b0  -

All listed CDNs deliver identical contents:
CDN Size (compressed) MD5 (uncompressed) Timestamp
Boot 17045 bytes eb5fac582a82f296aeb74900b01a2fa3 May 16, 2018 @ 03:35
Microsoft 14073 bytes eb5fac582a82f296aeb74900b01a2fa3 May 7, 2018 @ 21:04
MaxCDN 14049 bytes eb5fac582a82f296aeb74900b01a2fa3 (invalid)
cdnjs 13992 bytes eb5fac582a82f296aeb74900b01a2fa3 (invalid)
unpkg 13992 bytes eb5fac582a82f296aeb74900b01a2fa3 (invalid)

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

Other Versions

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

4.1.3, 4.1.2, 4.1.1, 4.1.0,
4.0.0,
3.3.7, 3.3.6, 3.3.5, 3.3.4, 3.3.2, 3.3.1, 3.3.0,
3.2.0,
3.1.1, 3.1.0,
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, D3, Dojo, Ember, jQuery, Knockout, lodash, React, Socket.IO, ThreeJS, UnderscoreJS and Vue.

Changelog

Best Zopfli parameters so far:
Size Improvement Parameters Found
13480 bytes -1 byte zopfli --i10000 --mls2 --bsr30 --lazy --ohh April 30, 2018 @ 20:04
13481 bytes -1 byte zopfli --i10000 --mls512 --bsr10 --lazy --ohh April 30, 2018 @ 19:59
13482 bytes -1 byte zopfli --i1000 --mls512 --bsr10 --lazy --ohh April 30, 2018 @ 19:46
13483 bytes -3 bytes zopfli --i1000 --mls512 --bsr21 --lazy --ohh April 30, 2018 @ 19:45
13486 bytes -1 byte zopfli --i1000 --mls128 --bsr23 --lazy --ohh April 30, 2018 @ 19:45
13487 bytes zopfli --i100 --mls512 --bsr10 --lazy --ohh April 30, 2018 @ 19:40

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

Most recent activity on May 16, 2018 @ 03:35.

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
13504 13504 13537 13536 13504 13504 13505 13507 13508 13508 13504 13509 13538 13511 13506
13527 13527 13527 13492 13526 13528 13526 13507 13498 13499 13507 13502 13545 13493 13493
13495 13491 13490 13528 13493 13529 13490 13492 13496 13503 13495 13508 13492 13494 13500
13523 13523 13527 13493 13494 13498 13496 13528 13483 13491 13492 13501 13499 13492 13491
13525 13525 13499 13492 13493 13529 13497 13492 13494 13526 13491 13491 13499 13490 13491
13483 13483 13498 13493 13493 13529 13490 13492 13485 13497 13492 13492 13500 13494 13494
13524 13524 13525 13490 13493 13503 13495 13492 13480 13491 13499 13492 13530 13493 13491
13525 13525 13501 13493 13493 13499 13497 13492 13480 13497 13527 13501 13491 13489 13490
13494 13492 13494 13489 13496 13529 13497 13492 13490 13500 13527 13530 13490 13500 13492
13527 13527 13501 13493 13493 13503 13491 13493 13491 13494 13500 13500 13537 13500 13492
13524 13524 13484 13491 13529 13529 13490 13492 13495 13496 13491 13529 13530 13531 13491
13524 13524 13489 13490 13492 13529 13490 13491 13483 13497 13491 13497 13497 13497 13496
13527 13528 13499 13492 13494 13498 13496 13492 13496 13491 13493 13500 13491 13491 13491
13484 13484 13491 13484 13483 13486 13494 13491 13495 13495 13490 13499 13492 13532 13489
13524 13524 13490 13490 13492 13495 13490 13493 13484 13492 13491 13499 13531 13532 13492
13525 13525 13499 13491 13493 13498 13490 13492 13495 13497 13500 13500 13499 13494 13492
13481 13481 13489 13491 13493 13529 13490 13491 13483 13491 13492 13500 13539 13482 13492
13527 13527 13528 13491 13493 13528 13497 13492 13480 13491 13492 13501 13491 13491 13492
13527 13527 13527 13495 13494 13528 13490 13493 13496 13491 13492 13503 13500 13493 13493
13528 13528 13487 13491 13494 13527 13484 13492 13483 13497 13498 13501 13531 13537 13492
13490 13485 13492 13528 13493 13504 13497 13492 13490 13497 13493 13530 13533 13497 13494
13480 13480 13487 13493 13493 13529 13496 13492 13495 13497 13493 13498 13499 13541 13497
13482 13482 13499 13491 13493 13498 13496 13492 13489 13491 13491 13530 13534 13532 13491

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 13487 bytes 100%
1,000 13482 bytes -5 bytes 100%
10,000 13480 bytes -2 bytes 100%
100,000 13480 bytes 2.03%
1,000,000 13480 bytes 1.45%
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
13608 bytes +128 bytes (+0.95%) +98 bytes
13608 bytes +128 bytes (+0.95%) +98 bytes
13545 bytes +65 bytes (+0.48%) +35 bytes
13510 bytes +30 bytes (+0.22%)
13543 bytes +63 bytes (+0.47%) +33 bytes
13571 bytes +91 bytes (+0.68%) +61 bytes
13591 bytes +111 bytes (+0.82%) +81 bytes
13625 bytes +145 bytes (+1.08%) +115 bytes
13661 bytes +181 bytes (+1.34%) +151 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
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 11423 bytes -2057 bytes (-15.26%)
ZPAQ (Wikipedia) zpaq zpaq -method 69 11732 bytes -1748 bytes (-12.97%)
Brotli (Wikipedia) brotli brotli -q 11 12210 bytes -1270 bytes (-9.42%)
LZMA2 (Wikipedia) xz xz -9 13048 bytes -432 bytes (-3.20%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 13271 bytes -209 bytes (-1.55%)
Zstandard (Wikipedia) zstd zstd -19 13325 bytes -155 bytes (-1.15%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 13423 bytes -57 bytes (-0.42%)

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