Skip to content

TOML Formatter

Validateur et formateur TOML avec conversion JSON.

TOML Input

Exemples:
En attente...
Conversion JSON

      
Variables d'environnement

      

Reference TOML

Types de base

string = "hello"
integer = 42
float = 3.14
boolean = true
datetime = 2024-01-15T10:30:00Z

Strings

# Basic string
str1 = "Hello\nWorld"

# Literal string (no escape)
str2 = 'C:\path\to\file'

# Multi-line
str3 = """
  Multi-line
  string
"""

Tables

[server]
host = "localhost"
port = 8080

# Nested (inline)
[server.ssl]
enabled = true
cert = "/path/to/cert"

# Inline table
point = { x = 1, y = 2 }

Arrays

# Array of values
ports = [8080, 8081, 8082]

# Array of tables
[[products]]
name = "Widget"
price = 9.99

[[products]]
name = "Gadget"
price = 19.99

Cas d'usage TOML

Fichier Usage
Cargo.toml Configuration Rust
pyproject.toml Configuration Python
Hugo.toml Site statique Hugo
Netlify.toml Deploiement Netlify
deno.json(c) Configuration Deno