How to add OptiFine to a CurseForge or Modrinth modpack

Put the official OptiFine JAR in the mods folder of your compatible Minecraft Java Forge instance. Open that folder from the three-dot menu in CurseForge or Modrinth App.

Two cave entrances on a stepped lakeshore with separate paths to each.

Put the OptiFine JAR in the mods folder of your Minecraft: Java Edition Forge modpack. In CurseForge, open the profile and choose Open Folder from the three-dot menu beside Play. In Modrinth App, open the instance and select More actions (the three dots) and then Open folder.

Match the pack's Minecraft version and Forge build to the row on OptiFine's official downloads page. Close Minecraft and make a copy of the working instance before you add the JAR.

Match the pack before adding anything

Record the pack's Minecraft version, loader and loader build. CurseForge's profile guide distinguishes Forge, Fabric, NeoForge and Quilt. Sharing an app doesn't make their mods interchangeable, and changing a working pack's loader can break its existing mods. If the Forge profile is new and you are using the official launcher, install OptiFine on a compatible Forge profile first.

Find the exact game version on OptiFine's downloads page and check its listed Forge pairing. For Minecraft 1.21.11, the catalog pairs OptiFine_1.21.11_HD_U_J9.jar with Forge 61.0.8. For Minecraft 1.20.1, it pairs OptiFine_1.20.1_HD_U_I6.jar with Forge 47.2.18. Check the pack author's instructions for any restrictions that still apply to that pairing.

Preserve the original profile and worlds

Close Minecraft before copying or changing its files. Open the profile folder using the relevant app route below, then copy the whole folder to a separate location outside the active profile. Check that the copy contains the files you need, including mods, config and any saves folder. Preserve separately stored worlds or other custom locations too; a profile-folder copy only covers what is inside that folder.

In CurseForge, you can clone the working profile before adding OptiFine.

  1. In My Modpacks, right-click the pack and select Clone as....
  2. Keep its existing Minecraft version selected.
  3. Click Create, then check the new profile's files and loader before making the addition there.
Clone as... highlighted in the selected pack's right-click menu under My Modpacks.
Keep the same Minecraft version when you clone the profile.

Keep the original profile. The guide warns that choosing another Minecraft version changes which mods are copied and can affect compatibility. A clone or export also deserves a contents check: CurseForge's Share Profile guide recommends config and mods when sharing without worlds, so that selection cannot preserve a world it excludes.

Find the CurseForge pack's mods folder

  1. Open Minecraft in CurseForge, choose My Modpacks, and open the profile you intend to change.
  2. Open the three-dot menu beside Play and choose Open Folder. This is the route shown in CurseForge's profile-folder example.
  3. Confirm the selected profile, then open its mods subfolder. Use this instance's folder, even if you also have a separate default Minecraft installation.
Open Folder in the three-dot menu beside Play in the selected CurseForge profile.
Use the pack's own menu to open its profile folder.

Open the Modrinth instance folder

  1. Open the intended instance in Modrinth App and check its displayed Minecraft version and loader.
  2. In the instance header, click the three-dot More actions button beside Play and the settings gear. Select Open folder. The Modrinth Help Center describes the same three-dot menu.
  3. Preserve that folder's contents, then open its mods subfolder for the matching Forge pack.
Open folder in the three-dot More actions menu beside Play and the settings gear in Modrinth App.
Open folder sits above Export modpack in More actions.

The instance header uses these labels in Modrinth App 0.23.5 and 0.22.0. Follow the pack's rules before changing a locked or managed instance.

Add one JAR, then check the result

With Minecraft closed, copy OptiFine_1.20.1_HD_U_I6.jar into the selected instance's mods folder only if it uses Minecraft 1.20.1 and the listed Forge 47.2.18 pairing. For another Forge pack, use the JAR named for its exact game version and listed Forge pairing. A Forge forum support reply identifies that destination and stresses OptiFine's specific Forge requirements. Keep any previous OptiFine file outside the active profile while trying its replacement; don't leave two builds in the folder.

Prism's separate OptiFine instructions likewise describe adding the downloaded JAR to a compatible Forge instance. Its Edit > Mods > Add file controls belong to Prism. For the build requirements behind this branch, see OptiFine with Forge.

  1. Launch the profile you changed through its own app. Check the startup log for the intended Minecraft, Forge and OptiFine builds and for loading errors. If the game or Forge build differs, return to the selected profile and reopen its folder before adding or replacing another file. Check for loading errors that follow the JAR discovery message as well.
  2. If the game reaches the menu, try the feature you need in a disposable world before opening an important save. A successful launch doesn't establish that every mod or feature works.
  3. If the pack crashes or the addition remains unverified, close Minecraft and move only the newly added JAR to a holding folder outside the profile. Relaunch the previous combination. Keep the failed attempt's log; if configuration files changed, retain those files and use the preserved original copy for recovery.

Use the right branch for Fabric or NeoForge

A Fabric player should start with OptiFine on Fabric. The Forge JAR route does not establish native Fabric support. For shaders, Iris is a separate shader loader; select its exact game-and-loader file and required dependencies.

NeoForge has a narrow documented exception: the 1.20.1 I6 changelog names NeoForge 47.1.56. That doesn't establish support for a different NeoForge pack. Check NeoForge support against your exact version.

Keep a personal addition out of a shared pack

OptiFine's FAQ says modpack inclusion generally needs explicit permission. Its copyright notice requires advance written permission for public distribution. That permission applies when a launcher export includes the JAR.

Leave the OptiFine JAR out of a pack you distribute unless you have the required permission. Other players can obtain their own matching file from optifine.net. If the download's identity is the concern, check whether OptiFine downloads are safe before opening it.