jsPsych is a JavaScript library for creating and running behavioral experiments in a web browser. jsPsych simplifies the process of coding browser-based experiments by providing a set of flexibile plugins that define different kinds of tasks a subject could complete during an experiment. By assembling different plugins together and customizing the parameters of each, it is possible to create many different types of experiments.
If creating your experiment is not possible with the current set of jsPsych plugins, consider writing a new plugin. The core jsPsych library provides a framework for constructing experiments by managing the presentation of trials and recording data. It may be faster to develop a jsPsych compatible plugin than writing an experiment from scratch. You will also be able to take advantage of all of the other jsPsych plugins for basic tasks like displaying instructions.
There are three ways to start exploring jsPsych.
- Follow the quickstart guide to get a working jsPsych-ready repository to edit in under 2 minutes.
- Work through the in-depth tutorial to gain an understanding of how jsPsych works.
- Try out the live demos of each jsPsych plugin.
Documentation is available in the GitHub wiki.
Contributions to the code are welcome. Please use the Issue tracker system to report bugs or discuss suggestions for new features and improvements. If you would like to contribute code, submit a Pull request.
For questions about using the library, please post to the jsPsych e-mail list. This creates a publically available archive of questions and solutions.
jsPsych was created by Josh de Leeuw (@jodeleeu) at Indiana University.
If you use this library in academic work, please cite the paper that describes jsPsych
de Leeuw, J.R. (2014). jsPsych: A JavaScript library for creating behavioral experiments in a Web browser. Behavior Research Methods. Advance online publication. doi:10.3758/s13428-014-0458-y