p5.js helps artists, designers, and beginners code creatively in the browser. It follows Processing-style sketching on web pages.
Overview
p5.js is a client-side JavaScript library aimed at creative coding on the web. It targets artists, designers, educators, and newcomers who want to learn programming while making visual and interactive work.
The API centers on drawing and sketching, with support for audio-visual, interactive, experimental, and generative projects. You can treat a web page as a canvas for iterative, exploratory code.
Documentation includes visual examples and material in multiple languages. A web editor on the project site lets you start coding without a local setup. Community-created add-on libraries extend drawing, sound, and other capabilities.
The project grew from Processing’s ideas for the web and is sustained by volunteers and the Processing Foundation. Forums, Discord, tutorials, and examples support learning and sharing work.
Key features
- Browser-based creative coding
- Drawing and graphics toolkit
- Interactive and generative sketches
- Audio-visual project support
- Multilingual documentation
- Web editor for quick starts
- Community extension libraries
- Reference with visual examples
Use cases
- Teaching coding through art
- Generative and experimental web art
- Interactive design prototypes
- Student creative technology projects
- Audio-visual web experiences