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

File details and verification
Filename
sample-1kb.toml
Exact size
1,024 bytes
Displayed size
1 KB
Catalog status
Valid catalog fixture
SHA-256
5321484b28dd4dd11e150116a8e70e97e8d5d953bb38a6340a13766822d35faf
Header signature
Not applicable (no stable header signature for this format)
Verified on
2026-08-10
MIME type
application/octet-stream
Lines
30
Note
simple-config
License
CC0 / Public Domain
Download URL
https://cdn.truefilesize.com/toml/sample-1kb.toml

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

sample-10kb.toml

10 KB

300 lines

File details and verification
Filename
sample-10kb.toml
Exact size
10,240 bytes
Displayed size
10 KB
Catalog status
Valid catalog fixture
SHA-256
992b4727534ae1bcda3554eed59293151327273a579c93ac096edf4c5117959f
Header signature
Not applicable (no stable header signature for this format)
Verified on
2026-08-10
MIME type
application/octet-stream
Lines
300
Note
cargo-toml-style
License
CC0 / Public Domain
Download URL
https://cdn.truefilesize.com/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

File details and verification
Filename
sample-50kb.toml
Exact size
51,200 bytes
Displayed size
50 KB
Catalog status
Valid catalog fixture
SHA-256
5a2a0d9d6085dab87abf8c5eee4cc5657a8b002697fae9d63bf0056dec6a918e
Header signature
Not applicable (no stable header signature for this format)
Verified on
2026-08-10
MIME type
application/octet-stream
Lines
1,500
Note
config-style
License
CC0 / Public Domain
Download URL
https://cdn.truefilesize.com/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

File details and verification
Filename
sample-100kb.toml
Exact size
102,400 bytes
Displayed size
100 KB
Catalog status
Valid catalog fixture
SHA-256
a3a794e7e1260443ced1aba6f31c963c50bb16454d45a4e68c8339b98165d525
Header signature
Not applicable (no stable header signature for this format)
Verified on
2026-08-10
MIME type
application/octet-stream
Lines
3,000
Note
nested
License
CC0 / Public Domain
Download URL
https://cdn.truefilesize.com/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

File details and verification
Filename
sample-500kb.toml
Exact size
512,000 bytes
Displayed size
500 KB
Catalog status
Valid catalog fixture
SHA-256
9209706b64e239498ce9e6c49f5592e36c893b81f5a2b67566559f625d848195
Header signature
Not applicable (no stable header signature for this format)
Verified on
2026-08-10
MIME type
application/octet-stream
Lines
15,000
Note
large-dataset
License
CC0 / Public Domain
Download URL
https://cdn.truefilesize.com/toml/sample-500kb.toml

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

sample-cargo.toml

784 B

60 lines

File details and verification
Filename
sample-cargo.toml
Exact size
784 bytes
Displayed size
784 B
Catalog status
Valid catalog fixture
SHA-256
e70936cee722e99bb96bfa02fa72df1953692572cc5675c7a90f835073f60b0f
Header signature
Not applicable (no stable header signature for this format)
Verified on
2026-08-10
MIME type
application/octet-stream
Lines
60
Note
cargo-manifest
License
CC0 / Public Domain
Download URL
https://cdn.truefilesize.com/toml/sample-cargo.toml

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

sample-pyproject.toml

997 B

45 lines

File details and verification
Filename
sample-pyproject.toml
Exact size
997 bytes
Displayed size
997 B
Catalog status
Valid catalog fixture
SHA-256
e13cc764a7af6be4f7bb03c09b28bb677a85d1cb96c55954476aecb15e1fa307
Header signature
Not applicable (no stable header signature for this format)
Verified on
2026-08-10
MIME type
application/octet-stream
Lines
45
Note
python-project
License
CC0 / Public Domain
Download URL
https://cdn.truefilesize.com/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