Registry
Form W-8BEN — programmatic fill compatibility
Certificate of Foreign Status of Beneficial Owner for United States Tax Withholding and Reporting (Individuals) · Internal Revenue Service (IRS) · Rev. October 2021. Tested 2026-08-07 on the unmodified upstream blank — every number below comes from a recorded run, not from documentation.
Verdict at a glance
| Tool | Version | Result | Detail |
|---|---|---|---|
| pdfops API | hosted, tested 2026-08-07 | verified + deterministic flatten | 22/22 supported fields landed; flatten=true byte-deterministic (sha256 7c06d83ae8a9…) |
| pdf-lib | 1.17.1 | verified (22/22) | 22 fields filled in-process; XFA layer dropped on save |
| @cantoo/pdf-lib (fork) | 2.6.5 | verified (22/22) | 22 fields filled in-process; XFA layer dropped on save |
| pypdf | 6.15.0 | text fields verified (20/20) | 20 text fields written and re-read (text fields only) |
| pdftk-java | 3.3.3 | verified (22/22) | 22 fields filled via FDF and re-dumped |
| qpdf --check | 11.9.0 | structurally clean | errors that qpdf cannot detect |
| poppler render check | 24.02.0 | values render (20/20) | 20/20 filled text values present in pdftotext output of the pdf-lib-filled file; page-1 raster sha256 2822d1ab3920… |
File facts
- Source: https://www.irs.gov/pub/irs-pdf/fw8ben.pdf (issuer page: here)
- Blank tested: irs-w-8ben.pdf · 66 KB · sha256
b821dc1172c91b348a65675529cc792782f11fc1ae8579df92d627113203f918 - License: US federal government work — public domain (17 U.S.C. § 105). The hash-verified blank is redistributed here unmodified.
- Structure: 1 pages · AcroForm + XFA layer (hybrid)
- Fields: 23 (20 text, 2 checkbox, 1 signature)
Quirks & limitations
- The onboarding form every US platform collects from non-US contractors and creators; fintech and marketplace KYC flows fill it programmatically at volume.
- Single page, small field count — a good smoke-test form for a fill pipeline.
Tested request
This exact shape ran against the live API during the recorded test (values here shortened to two fields; the test filled all 22 supported fields). With flatten=true, two identical runs produced byte-identical output — sha256 7c06d83ae8a9c664a286eea96d343311eb6831fa404b76ba70003bd94f493d76.
curl -X POST https://pdfops.dev/api/fill-form \
-F "pdf=@irs-w-8ben.pdf" \
-F 'fields={"topmostSubform[0].Page1[0].f_1[0]":"Jane Doe","topmostSubform[0].Page1[0].f_2[0]":"Jane Doe"}' \
-F "flatten=true" \
-o filled.pdf
Enumerate all 23 field names first with the inspector or POST /api/inspect.
Field schema
All 23 fields (name, type, maxLength, options)
| Field name | Type | maxLength | Options |
|---|---|---|---|
topmostSubform[0].Page1[0].f_1[0] | TextField | ||
topmostSubform[0].Page1[0].f_2[0] | TextField | ||
topmostSubform[0].Page1[0].f_3[0] | TextField | ||
topmostSubform[0].Page1[0].f_4[0] | TextField | ||
topmostSubform[0].Page1[0].f_5[0] | TextField | ||
topmostSubform[0].Page1[0].f_6[0] | TextField | ||
topmostSubform[0].Page1[0].f_7[0] | TextField | ||
topmostSubform[0].Page1[0].f_8[0] | TextField | ||
topmostSubform[0].Page1[0].f_9[0] | TextField | 11 | |
topmostSubform[0].Page1[0].f_10[0] | TextField | ||
topmostSubform[0].Page1[0].c1_01[0] | CheckBox | ||
topmostSubform[0].Page1[0].f_11[0] | TextField | ||
topmostSubform[0].Page1[0].f_12[0] | TextField | 10 | |
topmostSubform[0].Page1[0].f_13[0] | TextField | ||
topmostSubform[0].Page1[0].f_14[0] | TextField | ||
topmostSubform[0].Page1[0].f_15[0] | TextField | ||
topmostSubform[0].Page1[0].f_16[0] | TextField | ||
topmostSubform[0].Page1[0].f_17[0] | TextField | ||
topmostSubform[0].Page1[0].f_18[0] | TextField | ||
topmostSubform[0].Page1[0].c1_02[0] | CheckBox | ||
topmostSubform[0].Page1[0].f_20[0] | Signature | ||
topmostSubform[0].Page1[0].Date[0] | TextField | 10 | |
topmostSubform[0].Page1[0].f_21[0] | TextField |
Frequently asked
Can I fill the Form W-8BEN programmatically?
Yes — the blank Rev. October 2021 Form W-8BEN is a fillable AcroForm with 23 fields. In our tested run, all 22 supported fields were filled through the pdfops API and verified by re-inspecting the output; upstream pdf-lib also round-trips it, and pypdf handled its text fields. Field names are positional (e.g. topmostSubform[0].Page1[0].f1_01[0]) — enumerate them via inspection rather than guessing.
Is the Form W-8BEN an XFA form?
It is a hybrid: the PDF carries both a standard AcroForm field tree and an XFA layer. Programmatic fillers in the pdf-lib family fill the AcroForm layer and drop the XFA layer on save, so the output is a plain AcroForm PDF — which every mainstream viewer renders. Only XFA-first viewers (older Adobe products) behave differently.
Can the Form W-8BEN's signature fields be filled via API?
No — the form has 1 true digital-signature field(s), which require a certificate-based signing workflow. Value-filling APIs (pdfops included) list them at inspection but skip them rather than faking a value. All other field types on the form filled and verified normally.
← All forms in the registry · Inspect your own PDF · Make a flat PDF fillable