
lab.js
The open-source study builder for high-precision behavioral research and online experiments.

The open-source JavaScript standard for millisecond-accurate behavioral research and cognitive data collection.

jsPsych is a powerful, modular JavaScript library specifically engineered for the creation of behavioral experiments in the browser. By 2026, it has become the gold standard for decentralized psychological research, enabling researchers to build complex, millisecond-accurate experiments that run on any device with a modern web browser. The library's core architecture is built around the concept of a 'timeline,' where users define a sequence of events—from stimuli presentation to data collection trials—that are executed in a deterministic order. Its modular plugin system allows researchers to extend functionality easily, supporting everything from simple Likert scales to sophisticated video-based eye-tracking and real-time audio analysis. Positioned as a bridge between high-precision laboratory tools and the accessibility of the web, jsPsych leverages Web Audio API and high-resolution timing to ensure data integrity comparable to local software installations. Its 2026 market position is bolstered by deep integrations with data-hosting platforms like Pavlovia and JATOS, making it the primary choice for academic institutions, UX researchers, and AI developers conducting human-in-the-loop validation for behavioral models.
jsPsych is a powerful, modular JavaScript library specifically engineered for the creation of behavioral experiments in the browser.
Explore all tools that specialize in reaction time measurement. This domain focus ensures jsPsych delivers optimized results for this specific requirement.
A calibration tool that uses screen physical measurements to estimate the distance between the participant and the screen to normalize stimulus sizing.
Uses low-latency audio processing for precise auditory stimulus timing and recording.
A system for parameterizing trials, allowing for the automatic generation of hundreds of trials from a single template and a data array.
Decouples trial logic from the core engine, allowing developers to create custom input/output handlers.
Real-time trial adjustment based on previous participant performance (e.g., increasing difficulty after a correct response).
Internal tracking of frame-rate and event-loop lag to provide metadata on timing reliability.
CSS-based scaling that maintains aspect ratios and positioning across mobile and desktop devices.
Include the jsPsych library and required plugins via CDN or npm install jspsych.
Initialize the jsPsych object using initJsPsych() to set global parameters.
Define experimental stimuli (images, text, or audio files) as JavaScript variables.
Create individual 'trial' objects using specific plugins (e.g., html-keyboard-response).
Use 'timeline variables' to create sets of randomized trial parameters efficiently.
Build the experiment 'timeline' by pushing trials into a sequential array.
Configure conditional branching or looping logic for complex experiment paths.
Set up the on_finish callback to handle data storage or server-side transmission.
Test local timing accuracy using browser developer tools and timing-check extensions.
Deploy the static files to a web server, Pavlovia, or an internal JATOS instance.
All Set
Ready to go
Verified feedback from other users.
"Highly praised by the scientific community for its reliability, extensive documentation, and the shift it enabled from lab-based to web-based research."
Post questions, share tips, and help other users.

The open-source study builder for high-precision behavioral research and online experiments.

Zymergen was a bio/tech company that engineered microbes for various industrial purposes.

Uncover and optimize your SaaS investment.

A powerful shell designed for interactive use and scripting.

Zopto was a LinkedIn automation tool designed to generate leads, but it is now defunct.

AI-powered collaboration platform that reimagines teamwork through unified communication and workspace automation.

Maximize your Amazon sales and grow your business with powerful, accurate data and AI-driven listing optimization.