# p5\.js

JavaScript creative\-coding library for interactive graphics and browser\-based sketches\.

ID: Q307 · Revision: 293

Type: software · License: GNU Lesser General Public License 2\.1 for the library; website and example content have separate terms[^license] · Status: active

Website: https://p5js.org/



p5\.js is a free JavaScript library for creative coding, including interactive graphics and animation on a web page\. It can be used through an online editor or as a library in a locally developed web project\. Its sketch\-oriented model offers an alternative to desktop creative\-coding environments when browser delivery is part of the requirement\.[^home][^environment][^canvas]

## Capabilities and substitutions

### Browser sketch development — supported

The library supports interactive JavaScript sketches through online or local web\-development workflows\.[^environment]

Use case: Creating interactive visual sketches for the web · Platforms: Web browser · Region: Version, build and integration requirements apply

### Accessible canvas descriptions — supported

describe adds an author\-written description for screen readers or a visible label\.[^access]

Use case: Creating interactive visual sketches for the web · Platforms: Web browser · Region: Version, build and integration requirements apply

### Version\-1 compatibility — limited

Version 2 changes input events and asset loading; optional compatibility add\-ons cover documented older patterns\.[^migration]

Use case: Creating interactive visual sketches for the web · Platforms: Web browser · Region: Version, build and integration requirements apply

### [Substitute for Processing](/processing) — limited

Can replace desktop visual\-sketch authoring when a JavaScript/browser result is desired; Java code, libraries and export assumptions require porting\.[^environment][^processing]

Use case: Creating interactive visual sketches for the web · Platforms: Web browser · Region: Version, build and integration requirements apply

## References

[^home]: [p5\.js overview](<https://p5js.org/>) — JavaScript creative\-coding library and learning scope (vendor; retrieved 2026-10-07T19:08:40Z)

[^environment]: [Setting up a p5\.js environment](<https://p5js.org/tutorials/setting-up-your-environment/>) — Web Editor, local development and browser preview (vendor; retrieved 2026-10-07T19:11:03Z)

[^canvas]: [p5\.js createCanvas reference](<https://p5js.org/reference/p5/createCanvas/>) — P2D/WebGL modes, browser context and WebGPU add\-on requirements (vendor; retrieved 2026-10-07T19:11:12Z)

[^access]: [p5\.js describe reference](<https://p5js.org/reference/p5/describe/>) — Author\-provided screen\-reader\-accessible canvas descriptions (vendor; retrieved 2026-10-07T19:11:12Z)

[^migration]: [Teachers' guide to p5\.js version 2](<https://p5js.org/tutorials/v2_transition/>) — Input\-event and asset\-loading changes; compatibility add\-ons (vendor; retrieved 2026-10-07T19:11:03Z)

[^download]: [p5\.js downloads](<https://p5js.org/download/>) — Current pinned 2\.3\.3 CDN URL and separate compatible p5\.sound distribution (vendor; retrieved 2026-10-07T19:09:05Z)

[^license]: [p5\.js copyright and acknowledgements](<https://p5js.org/copyright/>) — LGPL 2\.1 library versus MIT website and CC BY\-NC\-SA reference/examples (vendor; retrieved 2026-10-07T19:09:37Z)

[^processing]: [Processing environment](<https://processing.org/environment/>) — Desktop Java\-mode sketch workflow (vendor; retrieved 2026-10-07T19:08:52Z)

Source revision: https://substitutefor.net/entities/Q307?revision=293
