Eskillsfy

Home / Blog / Images

Images · 23 Nov 2026

Signature Maker: how it works and how to build one

Draw or type a signature and download a transparent PNG. This guide explains what happens behind the button and shows the code, so you can build your own.

What it does

Draw your signature with a mouse, finger or stylus, or type it in a handwriting font. Pick ink color and thickness and download a transparent PNG to place on PDFs and documents.

When to use it

  • Signing PDFs and contracts
  • Email signatures
  • Forms that ask for a signature image

How to use it

  1. Draw or type your signature.
  2. Pick the color and thickness.
  3. Download the transparent PNG.

Try it free in your browser, nothing is uploaded: https://eskillsfy.com/tools/signature-maker

How it works

Drawing uses pointer events, which cover mouse, touch and stylus. Each stroke is a list of points; drawing smooth curves between them (quadraticCurveTo through midpoints) avoids jagged lines, and stylus pressure can change the line width.

On export, the tool scans the canvas for non-transparent pixels to find the signature’s bounding box and crops to it, so the PNG has no empty space and a transparent background.

Build it yourself

Here is the core of the tool. It has no dependencies unless noted, so you can paste it into any TypeScript or JavaScript project.

signature.ts (ts)

export function attachSignaturePad(c: HTMLCanvasElement, color = "#0b1f66") {
  const g = c.getContext("2d")!; g.lineCap = g.lineJoin = "round"; g.strokeStyle = color;
  let last: { x: number; y: number } | null = null;
  const pt = (e: PointerEvent) => { const r = c.getBoundingClientRect(); return { x: ((e.clientX - r.left) / r.width) * c.width, y: ((e.clientY - r.top) / r.height) * c.height }; };
  c.onpointerdown = (e) => { c.setPointerCapture(e.pointerId); last = pt(e); };
  c.onpointermove = (e) => {
    if (!last) return;
    const p = pt(e), mid = { x: (last.x + p.x) / 2, y: (last.y + p.y) / 2 };
    g.lineWidth = 2 + (e.pressure || 0.5) * 3;
    g.beginPath(); g.moveTo(last.x, last.y); g.quadraticCurveTo(last.x, last.y, mid.x, mid.y); g.stroke();
    last = p;
  };
  c.onpointerup = () => (last = null);
}

Make it production-ready

  • Store strokes so you can undo and redraw at a new color.
  • Trim to the bounding box on export.

Questions

Is my signature stored?

No. It is drawn in your browser and never uploaded.

Try the Signature Maker

Free, runs in your browser, nothing is uploaded.

Open it
Keep reading

More in Images

All posts