Form Parser

Form Parser extracts key-value pairs (KVPs), tables, selection marks (like checkboxes),generic fields, and text to augment and automate document processing.

Note: Form Parser is pre-trained and cannot be up-trained.

Form Parser can be considered over the other parsers when the use case involves:

  • Dealing with structured forms: It excels at extracting KVPs fromwell-defined forms that look like conventional forms with labeled blanks to fillin, such asname: __. Form Parser's pre-trained model offers highaccuracy for common fields like names, dates, and addresses.
  • Flexible table extraction is needed: Form Parser extracts from simple(no cells that span rows or columns) tables that look like tables. No trainingis needed (nor possible). For trained table extraction, the custom extractor canbe used with a parent field containing column (cell) child fields.
  • Need efficiency: Avoid building and maintaining extraction parsers, especially forhigh-volume and varied forms of extraction tasks.

Data-extraction features

Form Parser features encompass:

  • KVP: These are sets of two items within a document—a label or key and itscorresponding data (a value). You can directly use KVPs (if the keys are consistent)or build custom logic to resolve varied keys into consistent structured information.

  • Generic entities: Parse 11 different fields from documents out of the box. These include:

    • email
    • phone
    • url
    • date_time
    • address
    • person
    • organization
    • quantity
    • price
    • id
    • page_number
  • Text and layout: Use our latest OCR engine to extract text and layoutinformation. This includes embedded text from digital PDFs (v2.1 only) or text from images.

  • Tables: Detect and extract tables from images and PDFs.

  • Checkboxes: A high-quality selection mark detector, which extracts checkboxesfrom images and PDF output as KVP, using the text nearest the checkbox, with avalueTypeindicating whether it is filled or unfilled.

Languages and regions

Model versions

The following processor versions are compatible with this feature. For moreinformation, seeManaging processor versions.

Limitations

  • Prior JPEG compressions for TIFF are unsupported. Type of JPEG encapsulation defined by the TIFFversion 6.0 specification.

  • The checkbox model doesn't support parsing radio buttons. Some detected checkboxes might not have corresponding keys.

  • The model doesn't reliably parse a KVP with an unfilled value, such as a blank form.

  • The KVP parsing on documents in certain languages may have lower quality than Latin languages.

Process documents with Form Parser

This quickstart introduces you to the Form Parser feature in Document AI. In this quickstart,you use the Google Cloud console to set up your Google Cloud project andauthorization, create a Form Parser, and then make a request forDocument AI to process a PDF form.

Learn how to:

  1. Enable Document AI in a Google Cloud project.

  2. Create a Form Parser processor, which can identifyand extract text, key-value pairs, tables, and generic entities from many types of documents.

  3. Use the processor to annotate a sample document.


To follow step-by-step guidance for this task directly in the Google Cloud console, clickGuide me:

Guide me


  1. Sign in to your Google Cloud account. If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
  2. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Roles required to select or create a project

    • Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
    • Create a project: To create a project, you need the Project Creator role (roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.create permission.Learn how to grant roles.
    Note: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.

    Go to project selector

  3. Verify that billing is enabled for your Google Cloud project.

  4. Enable the Document AI API.

    Roles required to enable APIs

    To enable APIs, you need the Service Usage Admin IAM role (roles/serviceusage.serviceUsageAdmin), which contains theserviceusage.services.enable permission.Learn how to grant roles.

    Enable the API

  5. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Roles required to select or create a project

    • Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
    • Create a project: To create a project, you need the Project Creator role (roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.create permission.Learn how to grant roles.
    Note: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.

    Go to project selector

  6. Verify that billing is enabled for your Google Cloud project.

  7. Enable the Document AI API.

    Roles required to enable APIs

    To enable APIs, you need the Service Usage Admin IAM role (roles/serviceusage.serviceUsageAdmin), which contains theserviceusage.services.enable permission.Learn how to grant roles.

    Enable the API

Create a Form Parser processor

Use the Google Cloud console to create a Form Parser processor. Seecreating and managing processors for more information.

  1. In the Google Cloud console navigation menu, clickDocument AI andselectProcessor Gallery.

    ProcessorGallery

  2. In theProcessor Gallery,search forForm Parser and selectCreate.

    Form Parser option in UI

  3. In the side window, enter aProcessor name, such asquickstart-form-processor.

  4. Select the region closest to you.

  5. Click theCreate button.

You're taken to theProcessor Details page of your new form parser processor.

Test processor

After creating your processor, you can send annotation requests to it.

  1. Download the sample document.

    It's a PDF file containing a sample handwritten medical intake form. This document is stored in a publicly accessible Cloud Storage bucket.

  2. Click theUpload Test Document button and select the document you just downloaded.

  3. You should now be on theForm Parser analysis page. You can view the OCR detected text, key-value pairs, tables, and generic entities extracted from the document.

    sample form key-value pairs in UI

Clean up

To avoid unnecessary Google Cloud charges, use theGoogle Cloud console to delete your processor andproject if you don't needthem.

What's next

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-02-19 UTC.