Use Provector to create vector illustrations with its lightweight drawing interface.
Perfect Freehand
Perfect Freehand provides drawing tools for creating pressure-sensitive freehand lines.

About Perfect Freehand
Perfect Freehand is an open-source TypeScript library for drawing pressure-sensitive freehand lines. It exports a getStroke function that takes an array of input points, such as those recorded from mouse or pointer movement, and returns a new array of outline points forming a polygon that surrounds the input. Those points can then be rendered with whichever technology the developer prefers, with examples given for SVG and HTML Canvas. Stroke appearance can be customized through an options object, including settings such as size and thinning.
By default the library simulates pressure based on the distance between input points. To use real pressure from a pen or stylus, pressure is supplied as the third number for each point and the simulatePressure option is set to false. Points may be provided as arrays of arrays or as arrays of objects, though object points are converted internally to array points, which the source notes affects performance. Community ports exist in Dart, Odin, Python and Rust, and there is a Figma plugin for designers. Pricing is not stated in the source.
Key features
- getStroke returns polygon outline points from an array of input points
- Supports simulated pressure or real pressure from pen or stylus
- Accepts points as arrays of coordinates or as objects
- Stroke appearance configurable via options such as size and thinning
- Output can be rendered with any technology, including SVG and canvas
- Community ports available in Dart, Odin, Python and Rust
- Open-source TypeScript library installable via npm or yarn
- Separates stroke generation from rendering, so output works with any graphics technology
- Handles both simulated pressure and real stylus pressure input
- Point objects are converted internally to arrays, which affects performance
- No rendering is provided; developers must draw the resulting points themselves
- The source lists no pricing information
Perfect Freehand at a glance
- Category
- Design & Creative › Image Creation & Editing
- Type
- Open-source project
- Pricing
- Not confirmed. Check the site
- Open source
- Yes · Source code
- Language
- English
- Last checked
- Oct 6, 2026 · Online when checked
- Listed
- Oct 5, 2026
Perfect Freehand alternatives
Tools and sites you could use instead, ranked by how closely they match.
Convert animated GIFs into animated SVGs with FrameSVG through its web app, command-line tool, or Python library.
SVG graphics can be edited in Method Draw, an open-source vector editor that runs in a web browser.
AI Draw converts photos into contour line art and lets users customize and download the result as an SVG.
Draw vector artwork with shapes, gradients and layers in Vector Paint's browser-based editor.
Draw, edit, style, and animate vector graphics in DrawSVG, an online SVG editor.
Popular in Image Creation & Editing
Well-known listings from the same topic.
Perfect Freehand FAQ
How is the library installed?
How does it handle pressure?
Does it require a particular rendering framework?
Tell us and an editor will check it.
Claim the listing and suggest updates yourself. An editor checks every claim first.











