Turtle (Terse RDF Triple Language) is the most widely used human-readable syntax for writing RDF data. Its compact, line-oriented format makes it the preferred choice for hand-authoring RDF graphs, publishing Linked Data vocabularies, and illustrating RDF concepts in documentation and tutorials. Turtle strikes a balance between the verbosity of RDF/XML and the extreme minimalism of N-Triples.
Background
Turtle evolved from Dave Beckett's Notation3 (N3) language, which Tim Berners-Lee developed as a human-friendly alternative to RDF/XML. Beckett created Turtle as a simplified subset of N3 that retained its readability while restricting the syntax to pure RDF serialization, removing N3's rules and formulae. The first community drafts appeared in the mid-2000s, and the W3C RDF Working Group took up formal standardization in 2011. Turtle 1.0 was published as a W3C Recommendation on 25 February 2014, alongside updated specifications for RDF 1.1, N-Triples, TriG, and N-Quads.
Purpose and Scope
Turtle serializes RDF graphs as a sequence of subject-predicate-object statements (triples), terminated by periods. It is purely a serialization format — it defines how to write and read RDF data, not the data model itself. Turtle files conventionally use the .ttl extension and the text/turtle media type.
Key syntactic features include:
- Prefix declarations —
@prefix foaf: <http://xmlns.com/foaf/0.1/> .allows compact CURIEs - Base URI —
@base <http://example.org/> .for relative URI resolution - Predicate lists — semicolons separate multiple predicates for the same subject
- Object lists — commas separate multiple objects for the same predicate
- Typed literals —
"42"^^xsd:integerfor datatyped values - Language-tagged strings —
"chat"@frfor multilingual text - Blank nodes —
_:b1or inline[ ... ]syntax
Relationship to Other RDF Syntaxes
Turtle occupies a specific niche in the family of RDF serialization formats:
- N-Triples — a strict subset of Turtle with no abbreviations; one triple per line
- TriG — extends Turtle with named graph syntax for RDF datasets
- N-Quads — extends N-Triples with a fourth element for named graphs
- N3 (Notation3) — a superset of Turtle with rules, formulae, and built-in functions
- RDF/XML — the original XML-based RDF syntax, more verbose but widely supported
- JSON-LD — JSON-based serialization targeting web developers
Governance and Maintenance
Turtle is maintained by the World Wide Web Consortium. The current specification was produced by the RDF Working Group as part of the RDF 1.1 suite. The W3C RDF-star Working Group has been developing extensions to Turtle (known as Turtle-star) that support embedded triples for statement-level annotations.
Notable Implementations
Virtually every RDF library and triple store supports Turtle parsing and serialization, including Apache Jena, RDFLib (Python), rdflib.js, Eclipse RDF4J, and Redland. Most W3C vocabulary specifications (SKOS, DCAT, PROV-O, SHACL) publish their normative definitions in Turtle format. The prefix.cc service provides a community-maintained registry of common Turtle prefixes.
Related Standards
- RDF — the data model that Turtle serializes
- SPARQL — the query language for RDF; SPARQL query patterns closely resemble Turtle syntax
- RDFS and OWL — schema and ontology languages commonly serialized in Turtle
- JSON-LD — an alternative RDF serialization oriented toward JSON-native workflows