Repolode
processing

processing/p5.js

p5.js is a free, open-source JavaScript library for creative coding, drawing, and making interactive or generative graphics on the web.

Stars
24,318
Forks
3,897
Open issues
530
Last commit
2 days ago

What is it?

p5.js is a JavaScript library for creative coding that lets artists, designers, educators, and beginners draw, animate, and build interactive graphics directly in the browser. Its setup() and draw() structure makes it easy to start with a few lines of code, and it is based on the core principles of Processing.

The library provides a full set of drawing tools and supports audio-visual, experimental, and generative works. Developers can treat a web page as a sketch, and the project offers extensive reference documentation with visual examples, tutorials, and a web editor for coding without local setup. Community-built libraries extend it with additional capabilities.

p5.js is maintained mostly by volunteers under the Processing Foundation, with an emphasis on accessibility and inclusivity, and it is available in multiple languages.

Key features

  • 01Simple setup() and draw() structure for writing sketches quickly.
  • 02Full set of 2D drawing tools for shapes, text, and images.
  • 03Support for audio-visual, interactive, and generative works.
  • 04Extensive reference docs, tutorials, and visual examples.
  • 05Browser-based web editor for coding without local installation.
  • 06Extendable through community-created libraries.

Use cases

  • Teaching students the basics of programming through visual feedback.
  • Building interactive art or generative visuals for the web.
  • Prototyping interactive designs and animations in the browser.
  • Creating audio-reactive visualizations alongside the p5.sound library.

Quick start

  1. 1

    Open the p5.js web editor to start coding without installing anything

  2. 2

    Follow the Get Started tutorial on the p5.js website

Things to know

  • The project is maintained mostly by volunteers, so issue responses may be slow.
  • It is licensed under LGPL-2.1, a weak copyleft license with terms to review before use.

In collections

Topics

FAQ

What is p5.js?
p5.js is a free, open-source JavaScript library for creative coding, drawing, and making interactive or generative graphics on the web. p5.js is a JavaScript library for creative coding that lets artists, designers, educators, and beginners draw, animate, and build interactive graphics directly in the browser. Its setup() and draw() structure makes it easy to start with a few lines of code, and it is based on the core principles of Processing.
Is p5.js free to use? What license does it have?
p5.js is open source under the LGPL-2.1 license. Check the license terms before using it in commercial products.
Is p5.js still maintained?
Actively maintained. The last commit to p5.js was on Nov 5, 2026.
What can I use p5.js for?
Teaching students the basics of programming through visual feedback. Building interactive art or generative visuals for the web. Prototyping interactive designs and animations in the browser. Creating audio-reactive visualizations alongside the p5.sound library.
How do I install p5.js?
Open the p5.js web editor to start coding without installing anything Follow the Get Started tutorial on the p5.js website
Where can I get p5.js?
The source code and installation instructions are on GitHub: https://github.com/processing/p5.js

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects