Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Tom's Obvious, Minimal Language

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.


Tom's Obvious, Minimal Language.

By Tom Preston-Werner.

If it's not working for you, you're not drinking enough whisky.

Be warned, this spec is still changing a lot. Until it's marked as 1.0, you should assume that it is unstable and act accordingly.


TOML aims to be a minimal configuration file format that's easy to read due to obvious semantics. TOML is designed to map unambiguously to a hash table. TOML should be easy to parse into data structures in a wide variety of languages.


# This is a TOML document. Boom.

title = "TOML Example"

name = "Tom Preston-Werner"
organization = "GitHub"
bio = "GitHub Cofounder & CEO\nLikes tater tots and beer."
dob = 1979-05-27T07:32:00Z # First class dates? Why not?

server = ""
ports = [ 8001, 8001, 8002 ]
connection_max = 5000
enabled = true


  # You can indent as you please. Tabs or spaces. TOML don't care.
  ip = ""
  dc = "eqdc10"

  ip = ""
  dc = "eqdc10"

data = [ ["gamma", "delta"], [1, 2] ]

# Line breaks are OK when inside arrays
hosts = [


  • TOML is case sensitive.
  • Whitespace means tab (0x09) or space (0x20).


Speak your mind with the hash symbol. They go from the symbol to the end of the line.

# I am a comment. Hear me roar. Roar.
key = "value" # Yeah, you can do this.


Strings are single-line values surrounded by double quotes encoded in UTF-8. Quotes and other special characters must be escaped.

"I'm a string. \"You can quote me\". Tab \t newline \n you get it."

Here is the list of special characters.

\0 - null character  (0x00)
\t - tab             (0x09)
\n - newline         (0x0a)
\r - carriage return (0x0d)
\" - quote           (0x22)
\\ - backslash       (0x5c)

Other special characters are reserved and, if used, TOML should produce an error. This means paths on Windows will always have to use double backslashes.

wrong = "C:\Users\nodejs\templates" # note: doesn't produce a valid path
right = "C:\\Users\\nodejs\\templates"


Integers are bare numbers, all alone. Feeling negative? Do what's natural. 64-bit minimum size expected.



Floats are like integers except they have a single dot within. There must be at least one number on each side of the decimal point. 64-bit (double) precision expected.



Booleans are just the tokens you're used to. Always lowercase.



Datetimes are ISO8601 dates, but only the full zulu form is allowed.



Arrays are square brackets with other primitives inside. Whitespace is ignored. Elements are separated by commas. No, you can't mix data types, that's stupid.

[ 1, 2, 3 ]
[ "red", "yellow", "green" ]
[ [ 1, 2 ], [3, 4, 5] ]
[ [ 1, 2 ], ["a", "b", "c"] ] # this is ok

Arrays can also be multiline. So in addition to ignoring whitespace, arrays also ignore newlines between the brackets. Terminating commas are ok before the closing bracket.

key = [
  1, 2, 3

key = [
  2, # this is ok


There are two ways to make keys. I call them "key groups" and "keys". Both are just regular keys, but key groups only ever have a single hash as their value.

Key groups appear in square brackets on a line by themselves. You can tell them apart from arrays because arrays are only ever values.


Under that, and until the next key or EOF are the key/values of that key group. keys are on the left of the equals sign and values are on the right. Keys start with the first non-whitespace character and end with the last non-whitespace character before the equals sign.

key = "value"

You can indent keys and their values as much as you like. Tabs or spaces. Knock yourself out. Why, you ask? Because you can have nested hashes. Snap.

Nested hashes are denoted by key groups with dots in them. Name your key groups whatever crap you please, just don't use a dot. Dot is reserved. OBEY.

type = "pug"

In JSON land, that would give you the following structure.

{ "key": { "tater": { "type": "pug" } } }

You don't need to specify all the superkeys if you don't want to. TOML knows how to do it for you.

# [x] you
# [x.y] don't
# [x.y.z] need these
[x.y.z.w] # for this to work

When converted to a hash table, an empty key group should result in the key's value being an empty hash table.

Be careful not to overwrite previous keys. That's dumb. And should produce an error.

type = "apple"

apple = "yes"



But why?

Because we need a decent human readable format that maps to a hash and the YAML spec is like 80 pages long and gives me rage. No, JSON doesn't count. You know why.

Oh god, you're right

Yuuuup. Wanna help? Send a pull request. Or write a parser. BE BRAVE.


If you have an implementation, send a pull request adding to this list. Please note the commit SHA1 or version tag that your parser supports in your Readme.


Editor support

Something went wrong with that request. Please try again.