Skip to main content
Log in

jsPsych: A JavaScript library for creating behavioral experiments in a Web browser

  • Published:
Behavior Research Methods Aims and scope Submit manuscript

Abstract

Online experiments are growing in popularity, and the increasing sophistication of Web technology has made it possible to run complex behavioral experiments online using only a Web browser. Unlike with offline laboratory experiments, however, few tools exist to aid in the development of browser-based experiments. This makes the process of creating an experiment slow and challenging, particularly for researchers who lack a Web development background. This article introduces jsPsych, a JavaScript library for the development of Web-based experiments. jsPsych formalizes a way of describing experiments that is much simpler than writing the entire experiment from scratch. jsPsych then executes these descriptions automatically, handling the flow from one task to another. The jsPsych library is open-source and designed to be expanded by the research community. The project is available online at www.jspsych.org.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Institutional subscriptions

Fig. 1

Similar content being viewed by others

References

  • Buhrmester, M., Kwang, T., & Gosling, S. D. (2011). Amazon’s Mechanical Turk: A new source of inexpensive, yet high-quality, data? Perspectives on Psychological Science, 6, 3–5. doi:10.1177/1745691610393980

    Article  Google Scholar 

  • Crump, M. J. C., McDonnell, J. V., & Gureckis, T. M. (2013). Evaluating Amazon’s Mechanical Turk as a tool for experimental behavioral research. PloS ONE, 8, e51382. doi:10.1371/journal.pone.0057410

    Article  Google Scholar 

  • Eriksen, B., & Eriksen, C. (1974). Effects of noise letters upon the identification of a target letter in a nonsearch task. Perception & Psychophysics, 16, 143–149. doi:10.3758/BF03203267

    Article  Google Scholar 

  • Fox, E. (1995). Negative priming from ignored distractors in visual selection: A review. Psychonomic Bulletin & Review, 2, 129–139. doi:10.3758/BF03210958

    Article  Google Scholar 

  • Goldstone, R., Rogosky, B., Pevtzow, R., & Blair, M. (2005). Perceptual and semantic reorganization during category learning. In H. Cohen & C. Lefebvre (Eds.), Handbook of categorization in cognitive science (pp. 651–678). Amsterdam: Elsevier.

    Chapter  Google Scholar 

  • Goodman, J. K., Cryder, C. E., & Cheema, A. (2013). Data collection in a flat world: The strengths and weaknesses of Mechanical Turk samples. Journal of Behavioral Decision Making, 26, 213–224. doi:10.1002/bdm.1753

    Article  Google Scholar 

  • Kopp, B., Mattler, U., & Rist, F. (1994). Selective attention and response competition in schizophrenic patients. Psychiatry Research, 53, 129–139.

    Article  PubMed  Google Scholar 

  • Mason, W., & Suri, S. (2012). Conducting behavioral research on Amazon’s Mechanical Turk. Behavior Research Methods, 44, 1–23. doi:10.3758/s13428-011-0124-6

    Article  PubMed  Google Scholar 

  • McDonnell, J. V., Martin, J. B., Markant, D. B., Coenen, A., Rich, A. S., & Gureckis, T. M. (2012). psiTurk (Version 1.02) [Software]. New York, NY: New York University. Available from https://github.com/NYUCCL/psiTurk

  • Palmer, S. E. (1977). Hierarchical structure in perceptual representation. Cognitive Psychology, 9, 441–474. doi:10.1016/0010-0285(77)90016-0

    Article  Google Scholar 

  • Paolacci, G., Chandler, J., & Ipeirotis, P. G. (2010). Running experiments on Amazon Mechanical Turk. Judment and Decision Making, 5, 411–419.

    Google Scholar 

  • Reips, U.-D., & Neuhaus, C. (2002). WEXTOR: A Web-based tool for generating and visualizing experimental designs and procedures. Behavior Research Methods, Instruments, & Computers, 34, 234–240. doi:10.3758/BF03195449

    Article  Google Scholar 

  • Ross, J., Irani, L., Silberman, M. S., Zaldivar, A., & Tomlinson, B. (2010). Who are the turkers? Worker demographics in Amazon Mechanical Turk. In CHI ’10: CHI Conference on Human Factors in Computing Systems (pp. 2863–2872). New York: ACM.

    Google Scholar 

  • Zwaan, R. A., & Pecher, D. (2012). Revisiting mental simulation in language comprehension: six replication attempts. PloS ONE, 7, e51382. doi:10.1371/journal.pone.0051382

    Article  PubMed Central  PubMed  Google Scholar 

Download references

Author note

This material is based on work that was supported by a National Science Foundation Graduate Research Fellowship under Grant No. DGE-1342962. The author thanks Rob Goldstone, Nicholas de Leeuw, Rick Hullinger, and Peter Todd for feedback and suggestions on an earlier draft of this article, as well as the numerous people who have used jsPsych throughout the development process and have provided valuable feedback.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Joshua R. de Leeuw.

Rights and permissions

Reprints and permissions

About this article

Cite this article

de Leeuw, J.R. jsPsych: A JavaScript library for creating behavioral experiments in a Web browser. Behav Res 47, 1–12 (2015). https://doi.org/10.3758/s13428-014-0458-y

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.3758/s13428-014-0458-y

Keywords

Navigation