# WebAssembly (Wasm)

> Fast code that browsers run. Code in other languages is turned into it.

**Field:** Software Development  
**Category:** Compilers & Runtimes  
**Also known as:** Wasm, .wasm

## Think of it like

Think of it like a plug that fits all the sockets. Code in lots of languages can plug in.

## Definition

WebAssembly is a small code format that browsers run almost as fast as a normal app. You do not write it by hand. You write C, C++, Rust or Go, and a compiler turns it into a .wasm file. The browser loads that file and runs it beside JavaScript, in the same safe sandbox. It is used for games, photo editors and other heavy work in the browser.

## Example

Emma's photo editor has a blur tool written in Rust. Built as Wasm, it runs in the browser about as fast as the desktop app.

## Why it matters

It brings heavy apps to the web without a download. It also lets code in many languages run in a browser.

## Common mistake

Expecting it to replace JavaScript. It is a partner for heavy work, and it still needs JavaScript to touch the page.

## Three principles

- **Compile to it.** From C, C++, Rust or Go.
- **Close to native speed.** Good for heavy work.
- **Runs beside JavaScript.** In the same safe sandbox.

## Related terms

- [Compiler](https://learn.benibix.com/term/development/compiler)
- [Bytecode](https://learn.benibix.com/term/development/bytecode)
- [JavaScript](https://learn.benibix.com/term/development/javascript)
- [Rust](https://learn.benibix.com/term/development/rust)

---

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