Turtle Format is a textual syntax for expressing Resource Description Framework (RDF) graphs as a sequence of subject-predicate-object triples. It provides a more compact and readable alternative to RDF/XML, using prefixes to abbreviate long IRIs and punctuation like semicolons and commas to list multiple predicates and objects for a single subject.
Glossary
Turtle Format

What is Turtle Format?
Turtle (Terse RDF Triple Language) is a compact, human-readable syntax for writing RDF graphs, commonly used for serializing ontologies and knowledge bases.
A core feature of Turtle is its support for @prefix declarations, which bind namespace IRIs to short labels, significantly reducing verbosity. The format is the foundation for the W3C standard TriG, which extends Turtle to support named graphs, making it essential for serializing entire knowledge graph datasets in a single, manageable file.
Key Features of Turtle
Turtle (Terse RDF Triple Language) provides a compact, human-readable syntax for writing RDF graphs. It is the preferred format for authoring ontologies and knowledge bases due to its clarity and expressiveness.
Compact Triple Syntax
Turtle serializes RDF data as subject-predicate-object triples, terminated by a period. It eliminates the verbosity of RDF/XML by using IRI prefixes and blank node identifiers.
- Prefix Declaration:
@prefix schema: <https://schema.org/> . - Triple Example:
schema:Book schema:author "Jane Doe" . - Object Lists: Use commas to separate multiple objects for the same subject and predicate.
Predicate-Object Lists
Turtle reduces repetition by allowing a single subject to have multiple predicates and objects grouped together using semicolons (;) and commas (,).
- Semicolons: Introduce a new predicate for the same subject.
- Commas: Introduce a new object for the same predicate.
- This syntactic sugar makes authoring complex entity descriptions significantly more efficient and readable than flat triple formats.
Datatype and Language Tags
Turtle supports explicit datatype annotation for literal values and language tagging for multilingual strings, ensuring semantic precision.
- Datatypes:
"42"^^xsd:integeror"2024-01-01"^^xsd:date - Language Tags:
"Hello"@enor"Bonjour"@fr - This prevents ambiguity in knowledge graph ingestion, distinguishing a string from a number or a date.
Blank Nodes and Collections
Turtle provides shorthand for blank nodes (resources without a global IRI) and RDF collections (ordered lists).
- Blank Node Shorthand: Use square brackets
[ schema:name "Anonymous" ]to create an inline anonymous resource. - Collection Syntax: Use parentheses
( schema:Chapter1 schema:Chapter2 )to represent a closed list. - These constructs are essential for modeling complex, nested structures without generating synthetic URIs.
Base IRI and Prefix Mapping
Turtle uses @base and @prefix directives to resolve relative IRIs, drastically shortening the serialization.
- Base IRI:
@base <https://example.com/data/> . - Prefix Mapping:
@prefix foaf: <http://xmlns.com/foaf/0.1/> . - This allows authors to write
foaf:Personinstead of the full URI, making the document human-writable and reducing file size.
Graph Serialization Standard
Turtle is a W3C standard and the most widely used format for exchanging ontologies and SHACL shapes. It is fully compatible with SPARQL query syntax.
- MIME Type:
text/turtle - File Extension:
.ttl - It serves as the bridge between human-authored semantic models and machine-optimized formats like N-Triples or JSON-LD.
Turtle vs. Other RDF Serializations
A technical comparison of common RDF serialization formats based on syntax, readability, and use cases for knowledge graph and ontology engineering.
| Feature | Turtle | RDF/XML | JSON-LD | N-Triples |
|---|---|---|---|---|
Human Readability | High | Low | Medium | Low |
Line-by-line Parsing | ||||
Compact Syntax | ||||
Native JSON Compatibility | ||||
Streaming Support | ||||
W3C Recommendation | ||||
Typical File Size | Small | Large | Medium | Very Large |
Primary Use Case | Ontology authoring | Legacy systems | Web APIs | Data dumps |
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Frequently Asked Questions
Clear, concise answers to the most common technical questions about the Terse RDF Triple Language (Turtle) and its role in semantic data serialization.
Turtle (Terse RDF Triple Language) is a syntax and file format for serializing Resource Description Framework (RDF) graphs. It works by expressing data as a sequence of subject-predicate-object statements, called triples, terminated by a period. Turtle is designed to be highly compact and human-readable compared to XML-based RDF serializations like RDF/XML. It achieves this by using URIs enclosed in angle brackets (<http://example.org/entity>) or prefixed names (schema:name), literals enclosed in quotation marks, and significant whitespace for separation. The format allows for abbreviation mechanisms like the semicolon (;) to repeat a subject and the comma (,) to repeat a predicate, drastically reducing verbosity when describing multiple properties of the same entity. This makes it the preferred format for authoring and reading ontologies, knowledge graphs, and linked data manually.
Related Terms
Master the ecosystem of technologies that surround the Turtle format for building and serializing enterprise knowledge graphs.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us