# Import a TOML file (/docs/guides/runtime/import-toml)

<!-- agent-signals: reading_time_min: 1 · est_tokens: 119 · updated: 2026-07-28 -->
Related: [Delete directories](/docs/guides/runtime/delete-directory.md), [Delete files](/docs/guides/runtime/delete-file.md), [Import a HTML file as text](/docs/guides/runtime/import-html.md), [Import a JSON file](/docs/guides/runtime/import-json.md), [Import a JSON5 file](/docs/guides/runtime/import-json5.md), [Import a YAML file](/docs/guides/runtime/import-yaml.md)

Bun natively supports importing `.toml` files.

```toml data.toml icon="file-code"
name = "bun"
version = "1.0.0"

[author]
name = "John Dough"
email = "john@dough.com"
```

***

Import the file like any other source file.

```ts data.ts icon="/icons/typescript.svg"
import data from "./data.toml";

data.name; // => "bun"
data.version; // => "1.0.0"
data.author.name; // => "John Dough"
```

***

See [TypeScript](/runtime/typescript) for more on using TypeScript with Bun.
