ForHosting KIT · Documents & PDF

Identify paper size from dimensions in mm or inches

The paper size identifier turns measured width and height into a recognized standard name.

● BetaFree · in your browser
Use it from WebAPIEmailTelegramApp soon

Enter dimensions in millimetres or inches, and it compares them with ISO A, B, and C formats plus widely used North American office sizes. Portrait and landscape measurements are both accepted. A small default tolerance accounts for ordinary measuring and trimming differences, while an optional custom tolerance gives automated workflows explicit control. If no standard has both edges within that limit, the request returns an error instead of presenting a misleading guess.

Measure the sheet and choose the correct unit

Measure the two straight edges of the paper, enter them as width and height, and select either millimetres or inches. The order does not prevent a match: a 297 by 210 mm landscape sheet and a 210 by 297 mm portrait sheet are both compared with the same standard dimensions. Use the actual trimmed sheet rather than the printable area shown by an application or printer driver. Printable areas exclude margins and therefore do not describe the physical paper. The default tolerance is 2 mm for millimetre input and 0.08 inches for inch input, enough to absorb ordinary ruler precision and modest cutting variation without making unrelated formats look interchangeable. Width and height must be positive finite numbers. Decimal values are accepted, which is useful when a ruler, scanner, or production system reports fractional inches. The result preserves the submitted orientation while reporting the matched standard in its conventional portrait dimensions, making the distinction clear for downstream users and systems.

Understand how the closest match is selected

Every submitted pair is converted internally to millimetres and compared against a fixed table of ISO A0 through A10, ISO B0 through B10, ISO C0 through C10, and common North American formats such as Letter, Legal, Tabloid, Executive, Statement, Folio, Junior Legal, and Government Letter. The comparison ignores orientation by sorting the short and long edges. A candidate qualifies only when the absolute error on each edge is no greater than the tolerance. Among qualifying candidates, the algorithm first minimizes the larger edge error and then the combined error, producing a deterministic closest result. The response includes the paper name, family, standard, detected orientation, conventional standard dimensions, edge differences, and effective tolerance. These details make the decision auditable rather than returning only a label. The table and arithmetic are local and fixed: there is no network request, probabilistic classification, changing external catalog, or hidden metadata lookup involved in deciding the answer.

Set tolerance carefully and handle rejected measurements

Tolerance represents the maximum allowed discrepancy for each individual edge, not a percentage and not a combined allowance. A tolerance of 1 mm means both the short-edge difference and long-edge difference must independently be 1 mm or less. Use a tighter value when dimensions originate from reliable design metadata or calibrated production equipment. Use a slightly wider value for hand measurements, scans with uncertain cropping, or paper that may have been trimmed, but keep it small enough to preserve the meaning of a standard-size identification. If no candidate qualifies, the capability returns an invalid-input error stating that no standard lies within the selected tolerance. That failure is intentional: it distinguishes genuinely custom stock, an incorrect unit, a measurement mistake, or excessive trimming from a recognized format. Automated callers should treat the error as a prompt to verify the measurements or route the item as custom paper, rather than silently assigning the numerically nearest standard regardless of distance.

Identify an unknown sheet

Measure loose paper from an archive or supply cabinet and recover its likely ISO or North American format name.

Normalize document intake

Convert scanner or operator measurements into consistent paper-size labels before routing, storage, or print processing.

Validate print production dimensions

Check whether trimmed output remains close enough to an intended standard and reject measurements outside an explicit tolerance.

What does one request cost?

The API price is $0.002 per request. The same deterministic calculation can run free in the browser.

Can I enter landscape dimensions?

Yes. Matching is orientation-independent, and the response separately reports whether the submitted width and height describe portrait or landscape orientation.

Which paper sizes are recognized?

The fixed table includes ISO A0–A10, B0–B10, C0–C10, and common North American Letter, Legal, Tabloid, Executive, Statement, Folio, Junior Legal, and Government Letter formats.

What tolerance is used by default?

The default is 2 mm for millimetre input or 0.08 inches for inch input. You can provide a custom non-negative tolerance in the selected unit.

Why did my dimensions return an error instead of the nearest size?

A label is returned only when both edge differences fall within tolerance. The error prevents a custom, badly measured, or incorrectly labelled sheet from receiving a misleading standard name.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/doc/paper-size-from-dimensions

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/doc/paper-size-from-dimensions \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"width":210,"height":297}'
{
  "width": 210,
  "height": 297
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "doc.paper_size_from_dimensions",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

max_mb25
max_pages200
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Read the full KIT documentation →