Turtle (Terse RDF Triple Language) is a W3C-standardised serialisation syntax for expressing RDF graphs in a compact, human-readable plain-text form. It extends Notation3 (N3) by providing a concise prefix-based shorthand for IRIs, support for blank nodes, and literal datatypes, enabling structured linked-data documents to be authored and exchanged without the verbosity of RDF/XML.
Content
- Turtle originated from Tim Berners-Lee’s Notation3 (N3) language developed in the early 2000s as part of the Semantic Web initiative. Dave Beckett and Tim Berners-Lee refined N3 into a cleaner subset focused solely on the RDF data model, producing the “Turtle” dialect around 2008. The W3C RDF Working Group formally standardised it as a W3C Recommendation in February 2014 (alongside N-Triples, N-Quads, and TriG), giving it the same official standing as the earlier but far more verbose RDF/XML format. This standardisation cemented Turtle as the community’s preferred format for hand-authored RDF documents.
- A Turtle document opens with optional
@prefix(or SPARQL-stylePREFIX) declarations that bind short tokens to full IRI namespaces, dramatically reducing visual noise. Each RDF triple is written assubject predicate object .with commas separating multiple objects sharing the same subject and predicate, and semicolons separating multiple predicate-object pairs sharing the same subject. Blank nodes are denoted by square brackets enclosing their property lists. Literals carry optional language tags (@en) or datatype IRIs (^^xsd:integer). This grammar makes the subject-predicate-object structure of RDF immediately legible, unlike XML angle-bracket encoding, while remaining fully round-trippable to any other RDF serialisation. - Turtle matters because it dramatically lowers the barrier to reading and writing RDF-based knowledge representations. Ontology engineers use it to express OWL class hierarchies and property restrictions; linked-data publishers ship dataset descriptions in it; and tool developers rely on it as the canonical exchange format between triple stores, reasoners, and SPARQL engines. Its compactness means diffs of evolving ontologies are intelligible in version control, supporting collaborative knowledge graph maintenance. The format’s close syntactic relationship with SPARQL — which reuses Turtle’s prefix syntax verbatim — also reduces cognitive switching cost for practitioners working across both authoring and querying tasks.
- In 2024-2025 Turtle remains the dominant format for RDF authoring in academic and enterprise knowledge graph projects. Most major triple stores (Apache Jena, Blazegraph, Virtuoso, GraphDB, Oxigraph) accept Turtle natively, and popular linked-data toolkits (RDFLib, rdflib-rs, Corese) treat it as their primary interchange format. Recent tooling advances include Language Server Protocol (LSP) plugins that provide syntax highlighting, prefix auto-completion, and inline IRI validation for Turtle files in VS Code and other editors. The emergence of shape constraint languages such as SHACL and ShEx has further entrenched Turtle, as both languages are themselves typically expressed in Turtle syntax, reinforcing its role as the lingua franca of the RDF ecosystem.