---
id: "file_extension"
kind: "datatype"
status: "draft"
is_pii: false
categories: ["common"]
langs: ["common"]
quality: 100
url: "http://registry.apicrafter.io/datatype/file_extension"
---

# File name extension (`file_extension`)

> **Draft.** Draft records have not been reviewed yet and may be incomplete or wrong; do not treat them as authoritative for legal or compliance decisions.

Suffix of a file name that tells the format of the file, such as pdf, docx or csv, written with or without the leading dot. The full name of a file is the datatype filename.

- Personal data (PII): no
- Categories: Common (common)
- Countries: global
- Languages: Common to most languages (common)
- Classification: categorical

## Detection

Regular expression (Python `re`):

```
^\.?[A-Za-z0-9]{1,10}$
```

## Examples

- `pdf`
- `.docx`
- `CSV`
- `report.pdf` (invalid example) — a file name, not an extension

## Mappings

- fta: `FILENAME_EXT`
- wikidata: `P1195`

## Supported by tools

- `fta`

## Translations

- ru: Расширение имени файла

## Sources

- wikipedia: <https://en.wikipedia.org/wiki/Filename_extension>
- wikidata: <https://www.wikidata.org/wiki/Property:P1195>
- other: <https://github.com/tsegall/fta/blob/main/SemanticTypes.md>

## Quality

Score 100/100.

JSON: <http://registry.apicrafter.io/api/v1/datatypes/file_extension.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/any/files/file_extension.yaml>
