# Electron

> A tool for building desktop apps with web code. One app runs on Windows, macOS and Linux.

**Field:** Software Development  
**Category:** Platforms & OS  
**Also known as:** Electron.js, ElectronJS

## Think of it like

Think of it like a web page in its own picture frame. The page is the same, but it hangs on your own wall.

## Definition

Electron is a free tool for building desktop apps with web code. You write the app in HTML, CSS and JavaScript. Electron packs it with a browser engine, Chromium, and with Node.js. The result runs on Windows, macOS and Linux. VS Code is built with it. The cost is size, since every app carries its own browser engine.

## Example

Emma knows only web code. With Electron, she turns her to-do web page into a desktop app that her team installs.

## Example code

```console
$ npm install --save-dev electron
$ npx electron .
```

Add Electron to a project, then open the app in its own window.

## Why it matters

Web coders can ship desktop apps and skip a new language. Many popular apps are built this way.

## Common mistake

Expecting an Electron app to be small and light. Each one carries a whole browser engine, so it uses more memory.

## Three principles

- **Web code.** HTML, CSS and JavaScript build the app.
- **Browser inside.** Chromium and Node.js ship in each app.
- **Size is the cost.** Big downloads and more memory.

## Related terms

- [Desktop Application](https://learn.benibix.com/term/development/desktop-application)
- [Cross-Platform](https://learn.benibix.com/term/development/cross-platform)
- [Node.js](https://learn.benibix.com/term/development/nodejs)
- [JavaScript](https://learn.benibix.com/term/development/javascript)
- [HyperText Markup Language (HTML)](https://learn.benibix.com/term/development/html)
- [Visual Studio Code](https://learn.benibix.com/term/development/visual-studio-code)

## Taught in

- [Cross-Platform Software](https://learn.benibix.com/learn/development-platforms/cross-platform-software): OS and Files, 7/10

![One box on the left, One codebase, has three arrows to three boxes on the right: Windows on x86-64, macOS on ARM and Linux on x86-64, each marked its own build. A note under it says an Electron app packs a browser engine and Node.js into every one of these builds.](https://learn.benibix.com/diagrams/dev-platform-targets.svg)

---

Source: https://learn.benibix.com/term/development/electron
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.
