If you like control, you can host Font Awesome yourself, and you can choose to use SVG + JS described below or Web Fonts + CSS to get icons into your projects.

Advertisement

Before You Get Started

Make sure you:

Set up with SVG+JS

The all.js file contains the core styling PLUS all of the icons in all the styles that you'll need when using Font Awesome. If you’re just using some styles, you can select just the JS files for the styles you need to cut down on file size and improve performance.

Which Files and Folders What’s in there
/fontawesome6/pro/js Icons and scripts for each style, or all of them at once.
/fontawesome6/free/js Just the Free icons and scripts for each style.

Using Only Certain Styles?

If you’re using only some styles, you can select just the CSS files for the styles you need to cut down on file size and improve performance.

Add Font Awesome Files to Your Project

Copy all.js or individual style script files you want to use into your project’s static assets directory, or wherever you prefer to keep front-end assets or vendor stuff.

Copy the all.js or individual style files into your project directories

Copy the all.js or individual style files into your project directories

Include Font Awesome in Your Project

Link the files into the <head> of each template or page where you want to use Font Awesome icons.

<head>
  <!-- all.js loads all styles and icons -->
  <script defer src="/your-path-to-fontawesome/js/all.js"></script>
</head>

Yuss! You’re Ready to Add Icons

Like Anakin said, it’s woooorking! All of our icons are now ready to do your project’s bidding. Learn how to add them to your project and then use their power to bring order and style to your UI!

Add Some Icons!
Advertisement

Using Only Certain Styles

Want use only certain styles when using our SVG with JS framework? The /js folder contains the core styling and additional files for all of Font Awesome's style options- solid, regular, light, duotone, thin, and brands.

Icon Style JS Filename Availability
Font Awesome Brands brands.js Free
Font Awesome Solid solid.js Free
Font Awesome Regular regular.js Pro only
Font Awesome Light light.js Pro only

Copy the fontawesome.js loader and the .js files for the styles you'd like to use into your project's static assets directory (or where ever you prefer to keep front end assets or vendor stuff). We recommend referencing the fontawesome.js loader last.

<head>
  <!-- Our project just needs Font Awesome Solid + Brands -->
  <script defer src="/your-path-to-fontawesome/js/brands.js"></script>
  <script defer src="/your-path-to-fontawesome/js/solid.js"></script>
  <script defer src="/your-path-to-fontawesome/js/fontawesome.js"></script>
</head>
<body>
  <i class="fa-solid fa-user"></i>
  <!-- uses solid style -->
  <i class="fa-brands fa-github-square"></i>
  <!-- uses brand style -->
</body>
Advertisement

Older Version Compatibility

If your project is using an older version of Font Awesome, we've got you covered with backward compatiiblity for v5-based projects.

Version 5 Compatibility

Once loaded, our SVG + JS framework handles translating any Font Awesome 5 icon names, style syntax, and CSS pseudo-element icon references automatically.

<head>
  <!-- all.js loads all styles and icons + include all v5 backwards compatibility by default -->
  <script defer src="/your-path-to-fontawesome/js/all.js"></script>
</head>

This is true for when the js/all.js file is used or when you load only certain styles.

Version 4 Compatibility

If your project contains Font Awesome 4 icon references, you can include an additional file to support that specific version as well.

In addition to whatever v6 JS files you're including, you'll want to include the following v4-shims.js file, which will map v4 icon names to icons in the latest version of Font Awesome.

<head>
  <!-- all.js loads all styles and icons -->
  <script defer src="/your-path-to-fontawesome/js/all.js"></script>

  <!-- support v4 icon references/syntax -->
  <script defer src="/your-path-to-fontawesome/js/v4-shims.js"></script>
</head>

If you need more help upgrading an existing project to a newer version of Font Awesome, check out our upgrading guides.