Navid MoazzezNavid Moazzez

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
Navid Moazzezby Navid Moazzez·Updated Sept 30, 2026·1 min read
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.

Transformers.js at a glance

Stars16k
Forks1.2k
LanguageJavaScript
LicenseApache-2.0
Last update2026-09-25
Contributors82

How to install Transformers.js

bash npm i @huggingface/transformers

Navid Moazzez

AI business strategist & AI OS builder

Navid Moazzez helps creators and founders master AI and build their own AI Operating System (AI OS) to automate their business and life.

Navid.me is reader-supported. When you buy through links on this site, I may earn an affiliate commission. Learn more.

More free tools

Related MCP servers & CLIs

Free AI newsletter

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.

Loved by 10,000+ readers