Transformers.js
Run Transformers directly in your browser, with no need for a server! Transformers.js is designed to be functionally equivalent to Hugging Face's transformers python library, meaning you can run the same pretrained models using a very similar API. These models support common tasks in different modalities, such as: Natural Language Processing: text classification, named entity recognition, question answering, language modeling, summarization, translation, multiple choice, and text generation. Computer Vision: image classification, object detection, segmentation, and depth estimation. Audio: automatic speech recognition, audio classification, and text-to-speech. Multimodal: embeddings, zero-shot audio classification, zero-shot image classification, and zero-shot object detection. Transformers.js uses ONNX Runtime to run models in the browser. The best part about it, is that you can easily convert your pretrained PyTorch, TensorFlow, or JAX models to ONNX using Optimum.
View Transformers.js on GitHub
Run Transformers directly in your browser, with no need for a server!
Transformers.js is designed to be functionally equivalent to Hugging Face's transformers python library, meaning you can run the same pretrained models using a very similar API. These models support common tasks in different modalities, such as: Natural Language Processing: text classification, named entity recognition, question answering, language modeling, summarization, translation, multiple choice, and text generation. Computer Vision: image classification, object detection, segmentation, and depth estimation. Audio: automatic speech recognition, audio classification, and text-to-speech. Multimodal: embeddings, zero-shot audio classification, zero-shot image classification, and zero-shot object detection.
Transformers.js uses ONNX Runtime to run models in the browser. The best part about it, is that you can easily convert your pretrained PyTorch, TensorFlow, or JAX models to ONNX using Optimum.
Transformers.js at a glance
| Stars | 16k |
|---|---|
| Forks | 1.2k |
| Language | JavaScript |
| License | Apache-2.0 |
| Last update | 2026-09-25 |
| Contributors | 82 |
How to install Transformers.js
bash npm i @huggingface/transformers
Navid.me is reader-supported. When you buy through links on this site, I may earn an affiliate commission. Learn more.
More repo topics
More free tools
Related MCP servers & CLIs
The most actionable AI newsletter for founders
Every week, get proven AI strategies, curated tools, and step-by-step systems to grow your audience, create better content, and build a profitable creator business.
No fluff, no filler, no BS. Just five minutes each week that might level up your online business and life.
P.S. Sign up now to get free access to my ultimate AI tools guide for creators.



























