encyclopegia.org

Turtle (syntax)

In computing, Terse RDF Triple Language (Turtle) is a syntax and file format for expressing data in the Resource Description Framework (RDF) data model. Turtle syntax is similar to that of SPARQL, an RDF query language. It is a common data format for storing RDF data, along with N-Triples, JSON-LD and RDF/XML. RDF represents information using semantic triples, which comprise a subject, predicate, and object. Each item in the triple is expressed as a Web URI. Turtle provides a way to group three URIs to make a triple, and provides ways to abbreviate such information, for example by factoring out common portions of URIs. For example, information about Huckleberry Finn could be expressed as: <http://example.org/books/Huckleberry_Finn> <http://example.org/relation/author> <http://example.org/person/Mark_Twain> .

In computing, Terse RDF Triple Language (Turtle) is a syntax and file format for expressing data in the Resource Description Framework (RDF) data model. Turtle syntax is similar to that of SPARQL, an RDF query language. It is a common data format for storing RDF data, along with N-Triples, JSON-LD and RDF/XML. RDF represents information using semantic triples, which comprise a subject, predicate, and object. Each item in the triple is expressed as a Web URI. Turtle provides a way to group three URIs to make a triple, and provides ways to abbreviate such information, for example by factoring out common portions of URIs. For example, information about Huckleberry Finn could be expressed as: <http://example.org/books/Huckleberry_Finn> <http://example.org/relation/author> <http://example.org/person/Mark_Twain> . ==History== Turtle was defined by Dave Beckett as a subset of Tim Berners-Lee and Dan Connolly's Notation3 (N3) language, and a superset of the minimal N-Triples format. Unlike full N3, which has an expressive power that goes much beyond RDF, Turtle can only serialize valid RDF graphs. Turtle is an alternative to RDF/XML, the original syntax and standard for writing RDF. As opposed to RDF/XML, Turtle does not rely on XML and is generally recognized as being more readable and easier to edit manually than its XML counterpart. SPARQL, the query language for RDF, uses a syntax similar to Turtle for expressing query patterns. In 2011, a working group of the World Wide Web Consortium (W3C) started working on an updated version of RDF, with the intention of publishing it along with a standardised version of Turtle. This Turtle specification was published as a W3C Recommendation on 25 February 2014. A significant proportion of RDF toolkits include Turtle parsing and serializing capability. Some examples of such toolkits are Redland, RDF4J, Jena, Python's RDFLib and JavaScript's N3.js. ==Example== The following example defines 3 prefixes ("rdf", "dc", and "ex"), and uses them in expressing a statement about the editorship of the RDF/XML document: @prefix rdf: . @prefix dc: . @prefix ex: . dc:title "RDF/XML Syntax Specification (Revised)" ; ex:editor [ ex:fullname "Dave Beckett"; ex:homePage ] . (Turtle examples are also valid Notation3). The example encodes an RDF graph made of four triples, which express these facts: The W3C technical report on RDF syntax and grammar has the title RDF/XML Syntax Specification (Revised). That report's editor is a certain individual, who in turn Has full name Dave Beckett. Has a home page at a certain place. Here are the triples made explicit in N-Triples notation: "RDF/XML Syntax Specification (Revised)" . _:bnode . _:bnode "Dave Beckett" . _:bnode . The MIME type of Turtle is text/turtle . The character encoding of Turtle content is always UTF-8. ==Named graphs== TriG RDF syntax extends Turtle with support for named graphs. ==See also== N-Triples Notation3 (N3) LV2 ==References== ==External links== Turtle Specification Turtle TL;DR Cheatsheet on Enola.dev

References

No reference rows published for this article.

Cite this article

MLA

"Turtle (syntax)." encyclopegia.org, 2026, https://encyclopegia.org/wiki/turtle-syntax. Accessed 24 November 2026.

Chicago

"Turtle (syntax)." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/turtle-syntax.

APA

encyclopegia.org. (2026). Turtle (syntax). Retrieved November 24, 2026, from https://encyclopegia.org/wiki/turtle-syntax

Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON

Claims

PredicateValueSource
publication date2014-02-25Wikipedia

Related articles

Solza

enwiki · references available

Mohammed Fellah

enwiki · references available

Nightcrawler (album)

enwiki · references available

Willie Fleming

enwiki · references available

Igor Peremota

enwiki · references available

Stefanos Kotsolis

enwiki · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1351923875 · 0.5 · snapshot enwiki-001351923875

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.