Text to Handwriting

Text to Handwriting API

Content

Turn typed text into realistic handwriting on ruled, grid or plain paper. Pick a handwriting style and ink, adjust the size and messiness, and download a PDF or PNG.

Authentication

All API requests require a valid API key passed in the Authorization header as a Bearer token.

Rate Limit

20 requests per minute

Endpoints

1 endpoint available

Overview

Writes text out by hand on ruled, wide-ruled, grid, dot-grid or plain paper, in one of 7 handwriting fonts and 4 inks. Each word gets a small, seeded wobble (tilt, height, size, ink) so the page reads as handwritten. It uses the same layout and drawing code as the web page, so the same options and seed give the same pages.

Fonts

  • kalam (Neat), caveat (Quick notes), indie-flower (Rounded), patrick-hand (Print), shadows-into-light (Light), homemade-apple (Cursive), reenie-beanie (Scrawl).

Limits and behavior

  • Up to 20,000 characters and 20 pages. Line breaks start a new line; blank lines leave a blank line.
  • Pages are drawn at 200 DPI. pdf returns one page per sheet at true paper size (application/pdf). png returns one PNG for a single page (image/png) or a ZIP of handwriting-page-N.png files for several (application/zip).
  • Errors are JSON: {"success": false, "error": "..."}. Text is not stored.

Endpoints

POST
https://opentools.ca/api/v1/tools/text-to-handwriting
Render text as handwriting on paper, as a PDF or PNG

Request Body

Content-Type: application/json

ParameterTypeRequiredDescription
text
string
Required
The text to write, up to 20,000 characters.
font
string
Enum: kalam, caveat, indie-flower, patrick-hand, shadows-into-light, homemade-apple, reenie-beanie
OptionalHandwriting style.Default: kalam
ink
string
Enum: blue, black, red, pencil
OptionalInk colour.Default: blue
paper
string
Enum: ruled, wide-ruled, grid, dots, plain
OptionalPaper style. ruled is college ruled.Default: ruled
pageSize
string
Enum: letter, a4
OptionalPaper size.Default: letter
landscape
boolean
OptionalLandscape pages.Default: false
cream
boolean
OptionalCream paper instead of white.Default: false
scale
number
OptionalText size relative to the line spacing, 0.7-1.4.Default: 1
messiness
number
Optional0 (tidy) to 1 (hurried).Default: 0.5
seed
integer
OptionalSeed for the wobble, 0-4294967295. Change it for a different take on the same text.Default: 7
format
string
Enum: pdf, png
Optionalpdf, or png (a ZIP of PNGs when there is more than one page).Default: pdf

Response Example

The body is the file: a PDF (Content-Type: application/pdf, handwriting.pdf), a PNG (image/png, handwriting.png) or a ZIP of PNGs (application/zip, handwriting.zip). Errors return JSON, for example:
{
  "success": false,
  "error": "That text fills 23 pages. The limit is 20; send less text or a smaller size."
}

Error Codes

400
Bad Request - Missing or empty text, an invalid option, or more than 20 pages
401
Unauthorized - Invalid or missing API key
403
Forbidden - API key inactive, expired, or not allowed from this IP
429
Too Many Requests - Rate limit exceeded
500
Internal Server Error

Code Examples

curl -X POST https://opentools.ca/api/v1/tools/text-to-handwriting \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Dear Sam,\n\nThank you for the lovely book!\n\nAlex",
    "font": "homemade-apple",
    "ink": "black",
    "paper": "wide-ruled"
  }' \
  -o handwriting.pdf

Ready to get started?

Create an API key to start using the Text to Handwriting API.

Rather use it in your browser? Open the Text to Handwriting