Hermes (JavaScript engine)
By Meta
Hermes is a JavaScript engine developed by Meta and optimized specifically for running React Native applications on mobile devices, prioritizing fast app startup time and reduced memory usage over peak just-in-time execution speed. It…
Definition
Hermes is a JavaScript engine developed by Meta and optimized specifically for running React Native applications on mobile devices, prioritizing fast app startup time and reduced memory usage over peak just-in-time execution speed. It compiles JavaScript ahead of time into bytecode as part of the app build process rather than compiling from source at every launch, and it is distributed as an open-source component of the React Native project.
Overview
Hermes was created to solve a specific performance problem in React Native apps: general-purpose JavaScript engines like JavaScriptCore, while capable, were not tuned for the startup-time-sensitive, memory-constrained conditions of mobile app launches, where every millisecond before an app becomes interactive affects user experience and every megabyte of memory matters on lower-end devices. Mechanically, Hermes's key design choice is ahead-of-time bytecode compilation: instead of shipping raw JavaScript source that must be parsed and compiled on every app launch, a React Native app's JavaScript is precompiled into Hermes bytecode during the build process, so the engine at runtime only needs to load and interpret that bytecode, skipping parsing and initial compilation cost entirely. Hermes also uses a garbage collector tuned for mobile memory constraints and a compact bytecode format designed to keep app binary size down. Among JavaScript engines used in mobile and app contexts, Hermes differs from JavaScriptCore, the engine React Native previously defaulted to on iOS, by trading some peak throughput on long-running computation for consistently faster startup and lower memory footprint, a trade-off that closely mirrors why QuickJS favors small size over a full JIT pipeline. Unlike V8 or SpiderMonkey, Hermes was not built to power a general-purpose web browser but specifically to run pre-bundled application code within the React Native runtime. In practice, Hermes is the default JavaScript engine for React Native applications, used across both Android and iOS builds, and it is credited with measurable reductions in app startup time ("time to interactive") and memory usage compared to running unmodified JavaScript source through a general-purpose engine at launch. It also provides tooling integration for debugging and profiling React Native apps specifically. Limitations include that Hermes is purpose-built for the React Native application context rather than general web or server-side JavaScript execution, so it is not a substitute for browser engines or Node.js's V8 runtime, and its ahead-of-time compilation model adds a build-time step rather than allowing arbitrary dynamically-fetched JavaScript to run without a compile pass. Long-running, computation-heavy JavaScript inside an app may still perform better under a fully JIT-optimizing engine, but for typical mobile app UI logic, Hermes's startup and memory advantages generally outweigh that trade-off. Debugging also requires Hermes-aware tooling, since generic JavaScript debuggers built around a source-based engine do not map directly onto its precompiled bytecode execution model, which historically meant React Native's debugging story needed dedicated Hermes support to catch up with source-map-based workflows.
Key Features
- Ahead-of-time bytecode compilation during the app build process
- Optimized specifically for React Native mobile application startup
- Garbage collector tuned for mobile memory constraints
- Compact bytecode format that helps reduce app binary size
- Default JavaScript engine across Android and iOS React Native builds
- Provides debugging and profiling tooling for React Native apps
- Reduces app startup time compared to compiling JavaScript at launch
- Open-source and maintained as part of the React Native ecosystem
Use Cases
Alternatives
Frequently Asked Questions
From the Blog
JavaScript for Beginners: The Ultimate 2026 Guide
JavaScript makes web pages interactive — master the core language that runs on every browser and server.
Read More ProgrammingTypeScript for Beginners: JavaScript with a Safety Net
TypeScript adds optional static types to JavaScript, catching bugs before your code runs. This guide explains types, interfaces, generics, and the compile step clearly — with practical examples that show exactly why TypeScript makes large codebases easier to maintain.
Read More ProgrammingJavaScript ES6+ Features Every Developer Should Know
ES6 and beyond transformed JavaScript from a quirky scripting language into a powerful modern programming language. This guide covers the most important features: arrow functions, destructuring, template literals, async/await, modules, and more.
Read More ProgrammingJavaScript Closures Explained With Examples
Learn what JavaScript closures are, how they capture variables from an outer scope, and see practical examples covering counters, data privacy, and common pitfalls.
Read More