# onnxruntime-react-native

> ONNX Runtime bridge for react native

Latest version **1.24.3** (published 2026-03-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install onnxruntime-react-native
pnpm add onnxruntime-react-native
yarn add onnxruntime-react-native
bun add onnxruntime-react-native
```

## Health

**Score 70/100 (B)** — status: stable.

Positive: has types; esm support; no vulnerabilities; high maintenance score; high quality score; popular repo.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.24.3 |
| Published | 2026-03-05 |
| First published | 2021-05-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=18 |
| Dependencies | 1 |
| Unpacked size | 105 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 21797 |
| Author | ONNX Runtime |
| Maintainers | onnxruntime, erscor_msft, hanbitmyths |
| Keywords | react-native, ios, android, ONNX, ONNXRuntime, ONNX Runtime |

## Links

- npm: https://www.npmjs.com/package/onnxruntime-react-native
- Repository: https://github.com/Microsoft/onnxruntime
- Homepage: https://github.com/microsoft/onnxruntime/blob/main/js/react_native/README.md
- Issues: https://github.com/Microsoft/onnxruntime/issues
- npm.io page: https://npm.io/package/onnxruntime-react-native

## Dependencies (1)

- [onnxruntime-common](https://npm.io/package/onnxruntime-common.md) 1.24.3

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.24.3 (latest) — 2026-03-05
- 1.21.0-dev.20250306-e0b66cad28 (dev) — 2025-03-06
- 1.24.2 — 2026-02-19
- 1.24.1 — 2026-02-05
- 1.23.2 — 2025-11-04
- 1.23.0 — 2025-09-26
- 1.22.0 — 2025-05-09
- 1.21.0 — 2025-03-08
- 1.21.0-dev.20250228-beb1a9242e — 2025-03-03
- 1.20.1 — 2024-11-22
- 1.20.0 — 2024-10-31
- 1.20.0-dev.20241022-2d00351d7b — 2024-10-25
- 1.19.2 — 2024-09-03
- 1.19.0 — 2024-08-15
- 1.19.0-dev.20240804-ee2fe87e2d — 2024-08-06
- … 52 more at https://npm.io/package/onnxruntime-react-native/versions

## README

# onnxruntime-react-native

ONNX Runtime React Native provides a JavaScript library for running ONNX models in a React Native app.

### Why ONNX models

The [Open Neural Network Exchange](http://onnx.ai/) (ONNX) is an open standard for representing machine learning models. The biggest advantage of ONNX is that it allows interoperability across different open source AI frameworks, which itself offers more flexibility for AI frameworks adoption.

### Why ONNX Runtime React Native

With ONNX Runtime React Native, React Native developers can score pre-trained ONNX models directly in React Native apps by leveraging [ONNX Runtime](https://onnxruntime.ai/docs/), so it provides a light-weight inference solution for Android and iOS.

### Installation

```sh
npm install onnxruntime-react-native
```

### Usage

```js
import { InferenceSession } from "onnxruntime-react-native";

// load a model
const session: InferenceSession = await InferenceSession.create(modelPath);
// input as InferenceSession.OnnxValueMapType
const result = session.run(input, ['num_detection:0', 'detection_classes:0'])
```

Refer to [ONNX Runtime JavaScript examples](https://github.com/microsoft/onnxruntime-inference-examples/tree/main/js) for samples and tutorials. The ONNX Runtime React Native library does not currently support the following features:

- Tensors with unsigned data types, with the exception of uint8 on Android devices
- Model loading using ArrayBuffer

### Operator and type support

ONNX Runtime React Native version 1.13 supports both ONNX and ORT format models, and includes all operators and types.

Previous ONNX Runtime React Native packages use the ONNX Runtime Mobile package, and support operators and types used in popular mobile models.
See [here](https://onnxruntime.ai/docs/reference/operators/MobileOps.html) for the list of supported operators and types.

### License

License information can be found [here](https://github.com/microsoft/onnxruntime/blob/main/README.md#license).

---
_Source: https://npm.io/package/onnxruntime-react-native · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
