Skip to main content

For Developers

Cross-Platform WebSerial JavaScript

WebSerial API

Enable direct serial communication between Chrome and your devices using JavaScript no native installation or system drivers required.

Hero Image
Overview

The WebSerial API allows websites to connect directly to devices that communicate over serial ports or Bluetooth RFCOMM channels.

Itโ€™s ideal for devices such as microcontrollers, sensors, point-of-sale peripherals, and other embedded hardware all from within the browser.

Chrome manages permissions and connections securely, making it simple for developers to exchange serial data without custom driver installation.


How It Works

The WebSerial API opens a secure, permission-based serial channel between Chrome and your device, enabling direct read/write access through JavaScript.

How It Works Image
Key Features

check_small Communicate with serial devices directly in the browser

check_small No additional drivers needed for most USB-to-Serial adapters

check_small Works across major platforms โ€” Windows, macOS, Linux, ChromeOS

check_small Supports both physical serial ports and Bluetooth RFCOMM

check_small Secure permission prompt before any serial connection opens.


bookmarks

Testing & Development

You can test WebSerial connections directly from Chrome DevTools or using browser-based sample apps.For devices using USB-to-Serial adapters, no additional drivers are needed on most platforms.

Use Cases

Device Configuration & Debugging

Connect to and configure embedded devices directly from the browser ideal for microcontrollers, development boards, or robotics systems.

Real-Time Data Streaming

Stream live data from sensors, IoT modules, or diagnostic tools for monitoring and analytics dashboards.

Industrial & POS Control

Manage and control lab instruments, industrial peripherals, or point-of-sale systems using secure, browser-based interfaces.

Education & Prototyping

Enable students and engineers to experiment with serial devices without installing extra software.


External Resources

Developer Docs

Explore technical documentation, permission models, and API methods.

Go to Docs

GitHub Samples

Browse live sample projects to test device connections using WebSerial.

View Samples

Compatibility Information

Works On:

Windows, macOS, Linux, ChromeOS

Not Supported:

iOS

Bluetooth Support::

Partial (RFCOMM channels)

Key Technical Notes

No additional drivers needed for most USB-to-Serial adapters
User consent required before opening a serial port.
Supports both physical serial and Bluetooth RFCOMM channels.

Tip

Remember to request user permission to open a serial port before transmitting data.

Platform Notes

WebSerial works without additional drivers on most platforms when using USB-to-Serial adapters.
User permission is required before opening a serial port.

When to Use WebSerial

Use WebSerial when your device

Communicates over standard serial protocols (UART, RS-232, Bluetooth RFCOMM).
Streams data continuously, such as from sensors or barcode scanners.
Doesnโ€™t need structured USB descriptors or configurations.
Should work instantly across Windows, macOS, Linux, ChromeOS.

Tags

Serial
WebSerial
Chrome
JavaScript Driver
Device Access
Bluetooth RFCOMM