โฑ๏ธ Estimated read: 2 min
|
|
Syntax Quick Reference
| Element | Syntax | Example |
|---|
| Key-value | key = value | name = "app" |
| Bare key | Letters, digits, _, - | api-key = "secret" |
| Quoted key | "..." or '...' | "key with spaces" = 1 |
| Dotted key | a.b.c = value | server.port = 8080 |
| Table | [table] | [database] |
| Nested table | [parent.child] | [server.tls] |
| Inline table | { key = value } | point = { x = 1, y = 2 } |
| Array | [val1, val2] | tags = ["a", "b"] |
| Array of tables | [[table]] | [[services]] |
| Comment | # text | # http port |
Data Types
| Type | Syntax | Example |
|---|
| String (basic) | "..." with escapes | "Line\nBreak" |
| String (literal) | '...' no escapes | 'C:\Users\app' |
| Multi-line basic | """...""" | """Line one\nLine two""" |
| Multi-line literal | '''...''' | '''No \escaping''' |
| Integer | decimal, 0x, 0o, 0b | 42, 0xFF, 0o755, 0b1010 |
| Float | decimal point or exponent | 3.14, 5e+22 |
| Special float | inf, -inf, nan | timeout = inf |
| Boolean | true / false | enabled = true |
| Offset date-time | date + time + offset | 2026-05-05T10:00:00Z |
| Local date-time | date + time | 2026-05-05T10:00:00 |
| Local date | date only | 2026-05-05 |
| Local time | time only | 10:00:00 |
Escape Sequences
| Escape | Meaning | Valid in |
|---|
\n | Newline | Basic, multi-line basic |
\t | Tab | Basic, multi-line basic |
\" | Double quote | Basic, multi-line basic |
\\ | Backslash | Basic, multi-line basic |
\uXXXX | Unicode (4 hex) | Basic, multi-line basic |
\UXXXXXXXX | Unicode (8 hex) | Basic, multi-line basic |
Table Rules
| Rule | Detail |
|---|
| Root table | Unnamed, ends at first header |
| Table redefinition | Invalid (error) |
| Dotted-key tables | Cannot reopen with [table] header |
| Sub-table of dotted-key table | Valid if new |
| Inline table | Single line (v1.0.0), no trailing comma |
| Array of tables | [[name]] appends, index in path |
Common Patterns
| Pattern | Example |
|---|
| Group related settings | [server] header |
| Nested sections | [server.tls] |
| Reusable compact object | point = { x = 1, y = 2 } |
| Repeated services | [[services]] |
| Environment override | [tool.pytest.ini_options] |
Cargo.toml Cheatsheet
| Table | Purpose |
|---|
[package] | Name, version, edition |
[dependencies] | Runtime crates |
[dev-dependencies] | Test crates |
[features] | Compile flags |
[package.metadata] | Tool-specific data |
pyproject.toml Cheatsheet
| Table | Purpose |
|---|
[project] | Name, version, deps |
[build-system] | Backend |
[project.optional-dependencies] | Extras |
[project.scripts] | CLI entry points |
[tool.*] | Tool config |
Hugo config.toml Cheatsheet
| Key/Table | Purpose |
|---|
baseURL, title | Site settings |
[params] | Template data |
[permalinks] | URL patterns |
[[menus.main]] | Menu entries |
Type Comparison
| Format | Syntax | Example |
|---|
| String | "..." | "hello" |
| Integer | bare | 42 |
| Float | 3.14 | 3.14 |
| Boolean | true/false | true |
| Date-time | RFC 3339 | 2026-05-05T10:00:00Z |
Version Differences (v1.0.0 vs v1.1.0)
| Feature | v1.0.0 | v1.1.0 |
|---|
| Inline table newlines | No | Yes |
| Inline trailing comma | No | Yes |
\xHH escape | No | Yes |
\e escape | No | Yes |
Quick How-To Guides & Fast FixesNeed a quick fix or step-by-step solution? Browse our fast answers on HowTo.KandZ.me:
Stop using slow, ad-bloated tool sites! ๐คฎ
๐ Search “KandZ Tools” on Google to use many professional utilities for free.
KandZ.me is the ultimate minimalist hub for:
โ
Finance (Mortgage, Interest, Inflation)
โ
Tech (Base64, JSON, Dev Suite, IP)
โ
Health (BMI, BMR, TDEE)
โ
Productivity (Timer, Workspace, QR)
โก๏ธ Fast & Private
๐ No data leaves your device
๐ 100% Free
๐ Use it now: https://tools.kandz.me
๐ Bookmark itโyouโll need it later!