## File Types

Document AI supports the following image types.

For information about file size and page limits, refer to the [Quotas and
Limits](https://docs.cloud.google.com/document-ai/quotas#content_limits) page.

> [!NOTE]
> **Note:** Document AI includes some supported file types in [Preview](https://cloud.google.com/products/#product-launch-stages). These will be charged when they are released to General Availability (GA).

| Name | File Extension(s) | [MIME Type](https://www.iana.org/assignments/media-types/media-types.xhtml) |
|---|---|---|
| Portable Document Format (PDF) | `.pdf` | `application/pdf` |
| Graphics Interchange Format (GIF) | `.gif` | `image/gif` |
| Tag Image File Format (TIFF) | `.tiff`, `.tif` | `image/tiff` |
| Joint Photographic Experts Group (JPEG) | `.jpg`, `.jpeg` | `image/jpeg` |
| Portable Network Graphics (PNG) | `.png` | `image/png` |
| Bitmap (BMP) | `.bmp` | `image/bmp` |
| WebP | `.webp` | `image/webp` |
| HyperText Markup Language (HTML) | `.html` | `text/html` |
| Microsoft Word Office Open XML (OOXML) | `.docx` | `application/vnd.openxmlformats-officedocument.wordprocessingml.document` |
| Microsoft PowerPoint OOXML | `.pptx` | `application/vnd.openxmlformats-officedocument.presentationml.presentation` |
| Microsoft Excel OOXML | `.xlsx` | `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet` |

Note that some of these image formats are "lossy" (for example, JPEG). Reducing
file sizes for lossy formats may result in a degradation of image quality and
accuracy of results from Document AI.

> [!NOTE]
> **Note:** Prior JPEG compressions for TIFF are unsupported. Type of JPEG encapsulation defined by the TIFF [version 6.0
> specification](https://gitlab.com/libtiff/libtiff/-/commit/f0a54a4fa0cfa377f493d57ee2af393005d5bbe5).

> [!NOTE]
> **Note:** HTML and OOXML support are only available with [layout
> parser](https://docs.cloud.google.com/document-ai/docs/layout-parse-chunk). [Custom
> splitter](https://docs.cloud.google.com/document-ai/docs/custom-splitter) only supports PDF, TIFF, TIF, and GIF file types.

### Document scan resolution

For most accurate OCR results from Document AI, document scans should be
a minimum of 200 dpi [(dots per inch)](https://en.wikipedia.org/wiki/Dots_per_inch).
300 dpi and higher generally produce the best results. OCR accuracy is dependent
on both the resolution and the minimum font size, along with other factors like
document (and if handwritten, handwriting) quality, so testing is recommended.
The [image quality analysis](https://docs.cloud.google.com/document-ai/docs/process-documents-ocr#image-quality_analysis)
feature can help evaluate resolution concerns.

NOTE: 2k x 3k pixels are required for the US driver's license back side image in
order to read the barcode.