How to install OptiFine in Minecraft
OptiFine is one of the most popular mods for Minecraft Java Edition: it improves performance, unlocks advanced graphics settings and lets you run shaders. This guide takes you through the whole process step by step, from downloading the file to your first launch with shaders.
What OptiFine is
OptiFine is a mod for Minecraft Java Edition that has been around since 2011. Over the years it has become the de facto standard for players looking for better performance and extra graphics options. It does several things at once:
- Boosts FPS - optimizes rendering, reduces lag and lowers memory use
- Supports shaders - without OptiFine you can't run shader packs in the standard version of Minecraft
- Extends the graphics settings - dozens of options that aren't available by default (dynamic lights, connected textures, zoom)
- Supports HD texture packs - including packs with animated textures, emissive textures and custom entity models
- Adds zoom - the C key zooms in like a spyglass
OptiFine only works with Minecraft Java Edition. If you play Bedrock Edition (for example on Xbox, PlayStation, a phone or Windows 10/11), OptiFine isn't for you: that version has its own rendering system called RenderDragon.
Requirements before you install
Before you start, make sure you have everything you need:
- Minecraft Java Edition - purchased and installed. OptiFine requires an original, legal copy of the game. If you don't own Minecraft, buy it at minecraft.net
- Java - newer Minecraft versions (1.17+) come with their own Java built into the launcher. For older versions you may need to install Java separately from adoptium.net
- The Minecraft Launcher - the official Minecraft Launcher downloaded from minecraft.net
- Free disk space - OptiFine itself is only a few megabytes, but the whole game folder with mods can take anywhere from a few hundred MB to a few GB
Important: Before you install, check which OptiFine version matches your Minecraft version. OptiFine for 1.20.4 won't work with Minecraft 1.21. Every game version has its own version of the mod.
Downloading OptiFine: watch out for ads
This is one of the most important steps. Only ever download OptiFine from the official site: optifine.net. Unfortunately the internet is full of fake sites imitating the official one that offer files infected with viruses or that steal Minecraft accounts.
Step by step: downloading
- Go to optifine.net by typing the address into your browser's address bar yourself, not by clicking links from Google
- On the home page you'll see a table of available OptiFine versions. Find the one that matches your Minecraft version
- Click the "Download" button next to the version you picked
- You'll be redirected to an ad page. Wait 5 seconds and click the "Skip" button in the top right corner
- The .jar file downloads to your computer (by default into your Downloads folder)
Watch out for ads: The adfly page (which OptiFine uses to make money) shows ads with fake download buttons. The only real button is "Skip", which appears in the top right corner after 5 seconds. Don't click any other buttons or banners on that page.
How to recognize the real OptiFine file
The real OptiFine file is named like OptiFine_1.XX.X_HD_U_XX.jar (where the Xs are version numbers). If the file you downloaded has an .exe or .zip extension or a different name, don't run it and delete it right away. A .jar file is an ordinary Java archive, and it's safe as long as it comes from the official site.
Standalone installation: OptiFine without Forge
This is the simplest way to install it and ideal for beginners. A standalone OptiFine install creates its own profile in the Minecraft Launcher. You don't need any other tools.
Step 1: Run the installer file
Double-click the OptiFine_1.XX.X_HD_U_XX.jar file you downloaded. The OptiFine installer window should open. If the file opens as an archive (you can see the files inside it) instead of starting the installer, right-click the file, choose "Open with" and pick Java.
Step 2: Install
The installer window shows the path to your .minecraft folder. Make sure it points to the right folder (the default is correct). Click the "Install" button. The installation takes a few seconds.
Step 3: Start the Minecraft Launcher
Open the official Minecraft Launcher. In the "Installations" tab (or in the version menu at the bottom of the start screen) a new profile named OptiFine 1.XX.X HD U XX should appear. Select it and click "Play".
How to check that OptiFine is working
Once the game is running, go to Options → Video Settings. If you see far more options than usual (including "Shaders", "Details", "Animations" and "Dynamic Lights"), OptiFine is working properly. The OptiFine version should also show up in the bottom left corner of the game's main menu.
OptiFine as a Forge mod
If you use Forge to run other mods, you can add OptiFine as one of them, with no separate standalone install. That way OptiFine runs alongside your other mods.
Important: Not every mod is compatible with OptiFine. If the game crashes after you add OptiFine to the mods folder, try removing OptiFine and checking which mod causes the conflict. You can find compatibility lists for popular modpacks online.
Step 1: Install Forge
If you don't have Forge installed yet, read our guide on how to install Forge first. The Forge version has to be for the same Minecraft version as OptiFine.
Step 2: Copy the OptiFine file into the mods folder
Instead of running the OptiFine installer, copy the downloaded .jar file straight into the .minecraft/mods/ folder. Here's how to find that folder:
- Windows: Press Win+R, type
%appdata%\.minecraft\modsand press Enter - macOS: Finder → Go to Folder → type
~/Library/Application Support/minecraft/mods - Linux: the
~/.minecraft/mods/folder
If the mods folder doesn't exist, create it yourself. Paste the OptiFine .jar file into it.
Step 3: Start the Forge profile in the launcher
Open the Minecraft Launcher, select the Forge profile for your game version and click "Play". OptiFine loads automatically along with your other mods.
Checking that the mod loaded
Once you're in the game with Forge, you can check which mods loaded from the main menu → "Mods". OptiFine should be on the list, marked as active.
OptiFine graphics settings
OptiFine adds dozens of new graphics options to Minecraft. Here are the most important ones and what they do:
Performance and image quality
- Render Distance - how far the game renders. The higher it is, the better the view and the lower your FPS. Start at 8-10 chunks
- Graphics (Fast/Fancy/Fabulous) - Fast turns off leaf transparency and other effects for better FPS; Fancy turns on realistic leaves; Fabulous adds post-processing (needs a powerful GPU)
- Smooth FPS - stabilizes the frame rate and reduces FPS spikes. Helps on weaker computers
- Chunk Updates - the number of chunk updates per second. A lower value means smoother gameplay but slower terrain loading
Dynamic Lights
One of OptiFine's most popular features. With Dynamic Lights turned on, a torch or a block of glowstone you're holding lights up the area around you in real time, without you having to place the block. You'll find the option in Options → Video Settings → Dynamic Lights.
Zoom
OptiFine adds a zoom key, C by default. It works like a spyglass and comes in handy for building, exploring and looking at distant terrain. You can change the key in the controls settings.
Connected Textures
With a texture pack that supports connected textures, glass, stone and other blocks join up into smooth surfaces with no visible edges between them. The option is in Options → Video Settings → Quality → Connected Textures.
Antialiasing and Anisotropic Filtering
AA (Antialiasing) smooths block edges, and AF (Anisotropic Filtering) improves the quality of textures seen at an angle. Both make the game look better at the cost of performance. Start with AA x2 and AF x4, then adjust them to what your computer can handle.
How to install shaders with OptiFine
Shaders are packs of visual effects that completely change how Minecraft looks: they add realistic shadows, water reflections, atmospheric effects and dynamic lighting. You need OptiFine to run shaders in Java Edition.
Step 1: Download a shader pack
Shaders come as .zip files. Popular packs include BSL Shaders, Complementary Shaders, SEUS (Sonic Ether's Unbelievable Shaders) and Sildur's Vibrant Shaders. Download them from the authors' official sites or from CurseForge, and stay away from random sites with suspicious links.
Step 2: Find the shaderpacks folder
The shader folder is .minecraft/shaderpacks/. You can open it straight from the game: Options → Video Settings → Shaders → Shaders Folder.
Step 3: Copy the shader file
Copy the downloaded shader pack .zip file into the shaderpacks folder. Don't unzip it: Minecraft loads shaders directly from the .zip archive.
Step 4: Turn on shaders in the game
In the game, go to Options → Video Settings → Shaders. The pack you downloaded should appear on the list. Click its name to select it, then click "Done". The game loads the shaders, which can take a moment the first time.
Mind your performance: Shaders are very demanding on your graphics card. If your FPS drops below 30 after you turn shaders on, lower your graphics settings or choose a lighter shader pack (for example Sildur's Enhanced Default instead of SEUS Renewed).
Shaders not working
If the sky turns black or the game looks strange after you turn on a shader, check whether your graphics card supports OpenGL 4.0 or newer. Very old graphics cards (from before 2012) may not support modern shaders.
Common problems and fixes
The .jar file opens as an archive instead of starting the installer
Right-click the OptiFine .jar file → "Open with" → Java Platform SE Binary (or a similar name). If Java isn't on the list, install it from adoptium.net and try again.
The OptiFine profile doesn't show up in the launcher
Make sure you installed OptiFine after launching the matching Minecraft version at least once. The launcher has to download the game files before you install the mod. If the profile still isn't visible, check the "Installations" tab, since the launcher's default view may only show "Latest release".
The game crashes on startup with OptiFine
The most common cause is a conflict with another mod (with a Forge install) or an OptiFine version that doesn't match your Minecraft version. Check the error log in .minecraft/logs/latest.log and look for lines that start with "ERROR" or "FATAL".
Lower FPS after installing OptiFine
It's rare but it can happen, especially on newer Minecraft versions (1.18+), where OptiFine is no longer as well optimized as it used to be. Try lowering the settings in the "Performance" section of the graphics options: in particular, turn off Smooth FPS and set Chunk Updates to 1.
Shaders are too dark or look wrong
Open the shader settings (the "Shader Options" button after you select a pack) and look for an option like "Shadow Distance" or "Brightness". Most shader packs have their own configuration settings in that menu.
The "This version of OptiFine is not compatible with your Minecraft version" error
Download the OptiFine version that exactly matches the Minecraft version you have installed. On optifine.net every OptiFine version is clearly labeled (for example "for Minecraft 1.20.4").
OptiFine vs Sodium + Iris: performance compared
In recent years an alternative set of mods has appeared for the Fabric platform: Sodium as a replacement for OptiFine and Iris Shaders for shader support. It's worth knowing which one to pick.
Sodium + Iris: better performance
Sodium rewrites Minecraft's rendering engine from scratch and gets much higher FPS than OptiFine, especially on versions 1.18 and newer. On powerful computers the difference can be 50-200%, and on weaker ones even more. Iris Shaders works with most popular shader packs written for OptiFine.
OptiFine: ease of use and compatibility
OptiFine is simpler to install: one file, and no mod loader needed. It supports connected textures, custom entity models and animated textures without extra mods. For older Minecraft versions (1.12.2, 1.7.10), OptiFine is still the only sensible option.
When to choose which
- OptiFine - you play an older Minecraft version, you don't want to set up Fabric, you use a texture pack with connected textures, or you play with Forge mods
- Sodium + Iris - you play the latest Minecraft version, you want the highest possible FPS, you don't use Forge, and you're happy to set up a few mods at once
Both options are free and safe. You don't have to decide once and for all: you can keep both profiles in the launcher and switch between them.