Skip to content
>_ TrueFileSize.com

Sample TOML File Download — Free Config File Examples

Download free sample TOML config file examples from 1KB to 500KB — Cargo.toml (Rust), pyproject.toml (Python), and nested structures. Use these TOML test files for parser validation, Rust/Python tooling testing, and config management workflows.

Generate custom TOML fileCreate up to 1GB locally in your browser

sample-1kb.toml

1 KB

30 lines

Verified file details
Filename
sample-1kb.toml
Exact size
1,024 bytes
Displayed size
1 KB
MIME type
application/octet-stream
Lines
30
Note
simple-config
License
CC0 / Public Domain
Download URL
https://truefilesize.com/files/toml/sample-1kb.toml

See how TrueFileSize generates and measures sample files, or review the editorial policy.

sample-10kb.toml

10 KB

300 lines

Verified file details
Filename
sample-10kb.toml
Exact size
10,240 bytes
Displayed size
10 KB
MIME type
application/octet-stream
Lines
300
Note
cargo-toml-style
License
CC0 / Public Domain
Download URL
https://truefilesize.com/files/toml/sample-10kb.toml

See how TrueFileSize generates and measures sample files, or review the editorial policy.

sample-50kb.toml

50 KB

1,500 lines

Verified file details
Filename
sample-50kb.toml
Exact size
51,200 bytes
Displayed size
50 KB
MIME type
application/octet-stream
Lines
1,500
Note
config-style
License
CC0 / Public Domain
Download URL
https://truefilesize.com/files/toml/sample-50kb.toml

See how TrueFileSize generates and measures sample files, or review the editorial policy.

sample-100kb.toml

100 KB

3,000 lines

Verified file details
Filename
sample-100kb.toml
Exact size
102,400 bytes
Displayed size
100 KB
MIME type
application/octet-stream
Lines
3,000
Note
nested
License
CC0 / Public Domain
Download URL
https://truefilesize.com/files/toml/sample-100kb.toml

See how TrueFileSize generates and measures sample files, or review the editorial policy.

sample-500kb.toml

500 KB

15,000 lines

Verified file details
Filename
sample-500kb.toml
Exact size
512,000 bytes
Displayed size
500 KB
MIME type
application/octet-stream
Lines
15,000
Note
large-dataset
License
CC0 / Public Domain
Download URL
https://truefilesize.com/files/toml/sample-500kb.toml

See how TrueFileSize generates and measures sample files, or review the editorial policy.

sample-cargo.toml

2 KB

60 lines

Verified file details
Filename
sample-cargo.toml
Exact size
2,048 bytes
Displayed size
2 KB
MIME type
application/octet-stream
Lines
60
Note
cargo-manifest
License
CC0 / Public Domain
Download URL
https://truefilesize.com/files/toml/sample-cargo.toml

See how TrueFileSize generates and measures sample files, or review the editorial policy.

sample-pyproject.toml

1.5 KB

45 lines

Verified file details
Filename
sample-pyproject.toml
Exact size
1,536 bytes
Displayed size
1.5 KB
MIME type
application/octet-stream
Lines
45
Note
python-project
License
CC0 / Public Domain
Download URL
https://truefilesize.com/files/toml/sample-pyproject.toml

See how TrueFileSize generates and measures sample files, or review the editorial policy.

Use cases for sample TOML files

  • Testing TOML parsers (@iarna/toml, toml-js, Python tomllib)
  • Validating Cargo.toml manifests for Rust projects
  • Testing pyproject.toml parsing for Python build tools
  • Benchmarking TOML vs YAML vs JSON parsing performance
  • Testing config file loading in application frameworks
  • Validating TOML schema and type checking tools

TOML vs YAML vs JSON

FeatureTOMLYAMLJSON
SimplicitySimple (no gotchas)Complex (many edge cases)Simple
Native typesDates, times, integersImplicit (error-prone)Strings, numbers, bools
CommentsYes (#)Yes (#)No
Deeply nestedVerbose (dotted keys)Natural (indentation)Natural (braces)
Used byRust (Cargo), Python, HugoK8s, Docker, Ansiblenpm, APIs, TypeScript

TOML syntax overview

# Strings, numbers, booleans
title = "My Application"
port = 8080
debug = false

# Dates (native type — no quotes needed)
created = 2024-01-15T10:30:00Z

# Arrays
tags = ["web", "api", "production"]

# Tables (like objects/sections)
[database]
host = "localhost"
port = 5432
name = "myapp"

# Nested tables (dotted keys)
[database.pool]
min = 5
max = 20

# Array of tables
[[servers]]
name = "alpha"
ip = "10.0.0.1"

[[servers]]
name = "beta"
ip = "10.0.0.2"

Technical specifications

Full nameTom's Obvious Minimal Language
Extension.toml
MIME typeapplication/toml
Current versionTOML v1.0.0 (2021)
Native typesString, Integer, Float, Boolean, DateTime, Array, Table
Created byTom Preston-Werner (2013)

Frequently Asked Questions

What is TOML?
TOML (Tom's Obvious Minimal Language) is a configuration file format created by Tom Preston-Werner (GitHub co-founder) in 2013. It has explicit types (strings, integers, dates, arrays, tables), supports comments, and avoids the gotchas of YAML (no implicit type coercion, no indentation sensitivity). TOML is the standard config format for Rust (Cargo.toml), Python (pyproject.toml), Hugo, Deno, and many CLI tools.
TOML vs YAML — Which is better for configuration?
TOML is simpler and safer — explicit types, no indentation bugs, no Norway problem (YAML's NO→false gotcha). YAML is better for deeply nested structures (Kubernetes manifests, Ansible playbooks) and has anchors for DRY configs. Use TOML for project manifests (Cargo.toml, pyproject.toml) and app config. Use YAML for DevOps and infrastructure-as-code.
TOML in Rust/Cargo — How does Cargo.toml work?
Cargo.toml is the manifest file for every Rust project — it defines package metadata (name, version, edition), dependencies with version constraints, build profiles (release/debug), features, and workspace configuration. Our sample-cargo.toml provides a realistic Cargo.toml with dependencies, dev-dependencies, build profiles, and benchmarks for testing Cargo tooling and TOML parsers.
How do I parse TOML in Python?
Python 3.11+ has built-in support: import tomllib; data = tomllib.loads(toml_string). For older Python: pip install tomli (read-only) or tomlkit (read/write with comments preserved). Our sample-pyproject.toml provides a realistic test fixture with [project], [tool.ruff], [tool.pytest], and [tool.mypy] sections.
What is pyproject.toml?
pyproject.toml (PEP 518/621) is the modern Python project configuration file, replacing setup.py and setup.cfg. It defines the build system, project metadata, dependencies, and tool configurations (pytest, ruff, mypy, black) in a single TOML file. Our sample-pyproject.toml includes all standard sections for testing Python build tools.

Other data formats

Related reading