Handwritten Signature Maker
Operator: Abdulla Al Fahad. How tools are built and checked
Signing a document on screen usually means placing a picture of your signature on it, and a photo of ink on paper is a poor picture for that job: the paper is grey rather than white, there is a shadow from the phone, and the background hides whatever sits underneath. Drawing the signature directly avoids all three problems. The strokes are recorded as lines, not as a photo, so the saved file contains ink and nothing else.
This page gives you a wide signing board, a choice of ink and line weight, and two kinds of file: a PNG whose background is fully transparent, and an SVG that stays sharp at any size. The empty margin around the signature is cut away for you, with a slider for how much breathing room to leave.
Key features
- Drawing with a mouse, a pen or a finger through pointer events, with scrolling switched off over the board
- Strokes smoothed with quadratic curves through the midpoints between recorded points
- Black, dark blue or any custom ink colour
- Line weight from 1 to 12 px
- Undo and redo up to 50 steps, including undoing Clear
- Trim to the ink with 0 to 40 px of padding, or keep the whole board
- 1x or 2x export scale
- Transparent PNG and SVG from the same path data, with a checkerboard preview of the exact saved area
What the PNG and SVG files contain
The board is a fixed 900 by 320 unit area, whatever the size of your screen. Pointer positions are mapped into that space, so a signature drawn on a phone and one drawn on a desktop monitor come out at the same size in the file. At 1x, one board unit is one pixel in the PNG; at 2x, the PNG has four times as many pixels and the line weight doubles with it.
The PNG has an alpha channel and no background colour at all. Areas without ink are fully transparent, and the edges of each stroke are anti-aliased, so they blend into whatever colour the page has. The SVG holds one path element whose d attribute lists every stroke as a subpath, with round line caps and joins, the chosen stroke colour and the stroke width in board units. Its viewBox matches the trimmed area, so the SVG and PNG show exactly the same framing.
This version is for drawn signatures only. There is no option to type your name in a handwriting font.
How it works
While you draw, every pointer movement adds a point to the current stroke; when the browser reports several movements between frames, all of them are used, which keeps fast loops from turning into straight segments. A point that lands less than 0.75 board units from the previous one is skipped because it would add nothing visible.
Each stroke is turned into path data by drawing a line to the midpoint of the first two points, then a quadratic curve to each following midpoint with the recorded point as its control point, and finally a line to the last point. Lifting the pen ends the stroke and adds it to the undo history. A single tap becomes a very short segment, which the round line cap draws as a dot, so the dot over an i survives.
For trimming, the tool takes the bounding box of all recorded points, adds half the line weight because the stroke extends beyond its centre line, and then adds the padding on every side. A quadratic curve always stays inside the box formed by its control points, so no part of the ink is cut off. The PNG is drawn by replaying the same path data onto a canvas of that size, which is why the PNG and SVG line up exactly.
Before the PNG is drawn, the pixel count of the output is checked against a 50 megapixel ceiling and the export is refused with the size in the message if it would be larger.
Typical uses
- Placing a signature on a contract or letter in a PDF editor that accepts image stamps
- Adding a signature image to a scanned form before sending it back
- Putting a signature at the end of a letter written in a word processor
- Making a vector signature for a designer to place on a certificate or a printed card
- Making a dark blue signature image with a transparent background, ready to place on a document
Building one
- Pick an ink colour and a line weight. Both can be changed later and apply to the whole signature.
- Sign on the board above the dashed line. Use Undo for a bad stroke, or Clear to start over.
- Leave Trim switched on and set the padding. The checkerboard preview shows the exact area the file will cover.
- Choose 2x if the signature will be printed or placed on a large page, 1x for a small image.
- Press Download PNG for a transparent image, or Download SVG for a file you can scale freely.
Example
Three strokes drawn on the board: a surname, a loop and a dot, with dark blue ink at 3 px
Trim: on, padding 8 px
Scale: 2x
Ink bounding box on the board: 412 × 96 unitsFiles written
signature.png 2 × (412 + 3 + 16) by 2 × (96 + 3 + 16) = 862 × 230 px, transparent background
signature.svg width="862" height="230", one <path d="M…"> with stroke="#1e3a8a" stroke-width="3"Tips for best results
- Sign larger than feels natural. A signature that fills most of the board keeps more detail than a small one scaled up later.
- On a laptop trackpad, hold the click down for the whole stroke; lifting your finger ends the stroke.
- A stylus gives the most natural result. On a phone, turn it sideways so the board is wider.
- Keep the padding small if the signature will sit on a signature line, so it can be placed close to the line.
- Use the SVG when the destination accepts vector images; it never goes blurry when enlarged.
Things to check before you rely on it
The board has no pressure sensitivity. Every part of a stroke has the same width, even when drawn with a pen that reports pressure, so the result looks like a fine felt-tip rather than a fountain pen.
Changing the ink colour or weight restyles strokes already on the board. To mix two colours you would need two separate exports.
Some programs replace transparency with black when they import a PNG. If your signature lands on a black rectangle, the program does not read the alpha channel; try the SVG or a different import option.
A drawn signature image is a picture of a signature. Whether it counts as a valid signature for a given document depends on who receives it, not on the file.
Common errors and how to fix them
- "Draw your signature on the board first; there is nothing to save yet."
- Both download buttons need at least one stroke. If you drew something and still see this, the strokes were cleared; press Undo to bring them back.
- A message says the signature image would be over the 50 megapixel limit.
- This cannot happen with the board's own size at 1x or 2x, but the check is kept so a future larger board never builds a canvas the browser cannot hold. Choose 1x or reduce the padding.
- The page scrolls instead of drawing when using a finger.
- Start the stroke inside the white board. Touches that begin outside it scroll the page as usual.
- "The browser did not write the signature as a PNG file."
- The canvas returned a different format or nothing at all, which happens when the browser is short of memory. Close other tabs and try again, or use the SVG download.
Best practices
- Draw the signature a few times and keep the one that looks most like your paper signature.
- Save both the PNG and the SVG once you are happy, so you do not have to draw it again for another document.
- Keep signature files in a private folder; anyone who has the file can paste it onto a document.
- Check the placed signature at the size it will be printed before sending the document.
Why midpoint smoothing
A mouse or touchscreen reports positions at intervals, so connecting the raw points with straight lines leaves visible corners on every curve. Drawing a quadratic curve from midpoint to midpoint, with the real sample as the control point, rounds those corners while still passing close to every sample. It does not move the start or end of a stroke, and it needs no tuning value, which keeps the result predictable.
The same path data is used four times: on the board while you draw, in the export preview, in the PNG and in the SVG. What you see on the board is what you get in the PNG and the SVG.
Where the drawing is kept
This tool writes nothing to localStorage, sessionStorage or IndexedDB, and the drawing stays in this tab. Reloading or closing the page discards it, so download the files before you leave.
Frequently asked questions
Is the PNG background really transparent?
Yes. Nothing is painted before the strokes, so every pixel outside the ink has zero alpha. The checkerboard in the preview shows through those pixels.
Can I type my name instead of drawing it?
Not in this version; the tool records drawn strokes only.
What size should I export?
For a signature on an A4 or Letter page, 2x gives a clean edge when printed. For an email or a small web form, 1x is enough.
Does the SVG contain one shape per stroke?
No. All strokes are subpaths of a single path element, which keeps the file small and makes it easy to recolour in a vector editor.