[twitter-bootstrap] Bootstrap: How do I identify the Bootstrap version?

I want to update Bootstrap on a site, but I don't know the installed version.

How can I identify the bootstrap version, with only bootstrap.css and bootstrap.min.js files?

There is no version in the CSS file and the min.js file contains the following comment.

/*!
* Bootstrap.js by @fat & @mdo
* Copyright 2012 Twitter, Inc.
* http://www.apache.org/licenses/LICENSE-2.0.txt
*/

This question is related to twitter-bootstrap

The answer is


you will see your current bootstrap version in this "bootstrap.min.css/bootstrap.css" files, In the top section


To expound more on @vrian's answer

To view the bootstrap version of a website in your web browser, do the following:

First Method:

  • Open the website on your favourite browser
  • Press Ctrl + U to view the web page source
  • Look at the head section for a file named boostrap.min.js or boostrap.min.css. It should look like this <link href="assets/css/bootstrap.min.css" rel="stylesheet" />
  • Then click it to open the source file
  • This will display the bootstrap version of the website. It should look like this: Bootstrap v4.4.1 (https://getbootstrap.com/)

Second Method:

  • Open the website on your favourite browser
  • Press Ctrl + Shift + I to inspect the webpage element
  • In the inspect console, click on the Style Editor tab
  • And then click on boostrap.min.css
  • This will display the bootstrap version of the website. It should look like this: Bootstrap v4.4.1 (https://getbootstrap.com/)

Bootstrap version in console

That's all

I hope this helps


You can also check the bootstrap version via the javascript console in the browser:

$.fn.tooltip.Constructor.VERSION // => "3.3.7"

Credit: https://stackoverflow.com/a/43233731/1608226

Posting this here because I always come across this question when I forget to include JavaScript in the search and wind up on this question instead of the one above. If this helps you, be sure to upvote that answer as well.

Note: For older versions of bootstrap (less than 3 or so), you'll proably need to search the page's JavaScript or CSS files for the bootstrap version. Just came across this on an app using bootstrap 2.3.2. In this case, the (current) top answer is likely the correct one, you'll need to search the source code for the bootstrap find what version it uses. (Added 9/18/2020, though was in comment since 8/13/2020)


The easiest would be to locate the bootstrap file (bootstrap.css OR bootstrap.min.css) and read through the docblock, you'll see something like this

Bootstrap v3.3.6 (http://getbootstrap.com)


Open package.json and look under dependencies. You should see:

  "dependencies": {
    ...
    "bootstrap-less": "^3.8.8"
    ...
    }

for angular 5 and over


An easy way to do this, without searching files or folders would be:

  • Open your web page on browser
  • press ctrl+U
  • search boostrap.min.js or boostrap.min.css, then click it (it would open source file)
  • at first line(commented) you should see boostrap version

Shoud be stated on the top of the page.

Something like.

/* =========================================================
 * bootstrap-modal.js v1.4.0
 * http://twitter.github.com/bootstrap/javascript.html#modal
 * =========================================================
 * Copyright 2011 Twitter, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * ========================================================= */

To check what version you currently have, you can use -v for the command line/console terminal.

bootstrap -v

https://www.npmjs.com/package/bootstrap-cli


The Bootstrap version will be stated at the top of the CSS file. Simply open it and look at the top of the file.

e.g.

/*!
 * Bootstrap v2.3.0
 *
 * Copyright 2012 Twitter, Inc
 * Licensed under the Apache License v2.0
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Designed and built with all the love in the world @twitter by @mdo and @fat.
 */

That comment looks like it is a custom version of Bootstrap v2.3.3, here is the default header in the .css, notice the last comment line:

/*!
 * Bootstrap v2.3.2
 *
 * Copyright 2013 Twitter, Inc
 * Licensed under the Apache License v2.0
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Designed and built with all the love in the world by @mdo and @fat.
 */

What are you trying to accomplish? If it's customization then you have a set of files to work with though that seems like a bad idea. Otherwise, I would suggest going with the full build of v4.1.x since that is the current release.


You can locate it in the doc Block from bootstrap.min.css, at the top part.


Method 1 - Very Simple

In Package.json - you'll see bootstrap package installed with version mentioned.

"dependencies": {
    // ...
   "bootstrap": "x.x.x"
    // ...
}

Method 2

  1. Open node_modules folder and under that
  2. Search and open bootstrap folder
  3. Now you'll be able to see version number in the following files
    • package.json
    • scss/bootstrap.scss or css/bootstrap.css
    • README.md