# JavaScript Engine

> The program that runs JavaScript code. V8 is the best known.

**Field:** Software Development  
**Category:** Compilers & Runtimes  
**Also known as:** JS Engine, V8, JavaScriptCore, SpiderMonkey

## Think of it like

Think of it like the motor in a car. The runtime is the rest of the car.

## Definition

A JavaScript engine is the program that reads and runs JavaScript code. It parses the code, runs it, and compiles the busy parts to machine code as it goes. Chrome and Node.js use the V8 engine. Safari and Bun use JavaScriptCore, and Firefox uses SpiderMonkey. An engine runs the language only. A browser or a runtime adds files, the network or the page around it.

## Example

Jack's code runs in both Chrome and Node.js, because both use V8. Node.js adds files and the network, which Chrome keeps away from web pages.

## Why it matters

The engine decides how fast your JavaScript runs. Knowing which one sits under a runtime tells you a lot about how it will behave.

## Common mistake

Thinking the engine and the runtime are one thing. V8 alone cannot read a file. Node.js is what adds that.

## Three principles

- **Runs the language.** Parses, runs and compiles.
- **Several exist.** V8, JavaScriptCore, SpiderMonkey.
- **Needs a host.** A browser or a runtime.

## Related terms

- [JavaScript](https://learn.benibix.com/term/development/javascript)
- [Node.js](https://learn.benibix.com/term/development/nodejs)
- [Deno](https://learn.benibix.com/term/development/deno)
- [Bun](https://learn.benibix.com/term/development/bun)
- [Just-in-Time Compilation (JIT)](https://learn.benibix.com/term/development/just-in-time-compilation)
- [Runtime Environment](https://learn.benibix.com/term/development/runtime-environment)

![Three stacks side by side. Each has your JavaScript at the top, a runtime layer in the middle that adds files, network and the event loop, and an engine at the bottom. Node.js and Deno sit on the V8 engine. Bun sits on the JavaScriptCore engine.](https://learn.benibix.com/diagrams/run-js-runtimes.svg)

---

Source: https://learn.benibix.com/term/development/javascript-engine
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
