📣 v4.0 released!
↓ scroll ↓

What is q5?

q5.js WebGPU is the fastest, most beginner friendly 2D graphics library on the web!

It was designed to make creative coding fun and accessible for educators, designers, artists, and beginners.

New v4 Sketch Format

Eliminates the need for preload and setup functions.
Sketch Icon

Performance Showdown

Max shapes rendered per frame on a MacBook Air 2025 in 4K @ 60FPS.
p5.js (Canvas2D)
p5.js (WebGL)
q5.js (WebGPU)

Documentation Quality

Comparing the q5.js WebGPU vs p5.js Canvas2D docs. Less is more!

Avg. Lines per Example

p5.js
33
q5.js
6

Avg. Characters per Example

p5.js
822
q5.js
124

Total Characters in Docs

p5.js
852k
q5.js
91k
Learn more and learn faster with the q5 Learn pages!

Feature Comparison

Tons of modern features in a small bundle.
Does it include? q5 v4 p5 v2
built-in video recorder requires p5.capture addon which is outdated and slow
built-in display modes requires custom CSS styling
built-in sound playback ⚠️ requires p5.sound addon (200kb minified)
HiDPI scaling by default images are not auto-scaled to display at native res
HDR colors by default must be set explicitly
fast SDF shape rendering slow triangle mesh rasterization
fast MSDF text rendering slow triangle mesh rasterization
HTML creation ⚠️ outdated API doesn't use getter/setters
async/await loading
easy parallel loading preload system removed from p5.js v2
legacy support ⚠️ can't run p5 v1 sketches without compatibility addon that overrides load functions
3D rendering only in WebGL mode, which has poor performance
file size 200kb 4400kb 1000kb minified

Addons

q5 works with popular addons.
p5.sound

p5.sound adds audio generation, signal analysis, and advanced mixing capabilities. See p5.sound demos.

p5play

p5play adds high quality Box2D physics simulation, better input handling, a camera, and animations.

ml5.js

ml5.js adds AI capabilities like hand tracking, face detection, and body pose estimation. See ml5 demos.

Start coding 💻

The q5 Web Editor is coming soon!

Join us 🤝

Share your creations on the q5 community Discord.

Local dev 🛠️

You can use q5 offline or always get the latest version from this link:

https://q5js.org/q5.js

Support q5 💙

q5 is 100% free and open source.

If you enjoy using q5, please support the project via Ko-fi, Patreon, or GitHub Sponsors.