What is a triple?
A triple is the smallest complete fact in a knowledge graph. RDF 1.1 Concepts (W3C Recommendation, 25 February 2014) defines an RDF graph as "a set of RDF triples" and gives each triple three parts:
| Part | What RDF 1.1 allows | Example | In everyday terms |
|---|---|---|---|
| Subject | An IRI or a blank node | https://acmeroofing.example/#acme-roofing |
The thing you are talking about |
| Predicate | An IRI | http://schema.org/areaServed |
The relationship, usually a schema.org property |
| Object | An IRI, a literal or a blank node | https://acmeroofing.example/#miami or "Miami" |
Another thing, or a plain value |
Read it as a sentence: "Acme Roofing serves Miami." Schema.org is a dictionary of predicate names, such as areaServed, provider and worksFor, so different systems don't have to guess what you meant. When your markup feels overwhelming, reduce it to triples. Every property you add should be a sentence you would actually say about the business.
Triple builder
Runs in your browser. Nothing you type is sent anywhere or stored.
How the builder writes each row
The three outputs carry exactly the same triples. These are the rules it follows:
| Input | What the builder writes | Rule it follows |
|---|---|---|
| A subject or object typed in words, such as "Acme Roofing" | The base URL plus # plus the words in lower case joined by hyphens: https://acmeroofing.example/#acme-roofing |
RDF 1.1: subjects and linked objects are IRIs |
A subject or object that starts with https:// |
That URL, unchanged | RDF 1.1 |
A predicate such as areaServed or schema:areaServed |
http://schema.org/areaServed |
Schema.org's own JSON-LD context maps its terms to http://schema.org/ (checked 13 November 2026), so the Turtle uses the same namespace |
The predicate type (or a) |
rdf:type: a in Turtle, @type in JSON-LD |
RDF 1.1 Turtle and JSON-LD 1.1 |
| Object kind Text | A plain string literal | RDF 1.1 |
| Object kind Number | 12 as xsd:integer; 4.5 as xsd:decimal |
Turtle writes both without quotes. JSON-LD 1.1 reads a JSON number with a fraction as xsd:double, so decimals are written as {"@value": "4.5", "@type": "xsd:decimal"} to keep the same triple |
| Object kind Date | "2009-04-01"^^xsd:date |
XML Schema date, YYYY-MM-DD |
| Object kind URL | An IRI: <https://...> in Turtle, {"@id": "https://..."} in JSON-LD |
Schema.org's context does not mark url or sameAs as IRIs, so a bare string there is, strictly, text |
The "name triple" option adds schema:name with the words you typed for every thing named in words, unless you already gave it a name. Leave it on for markup; turn it off to see only your own rows.
The hints. The builder compares each row with the schema.org 30.1 vocabulary (16 September 2026): it flags predicates and types that don't exist, properties schema.org marks as superseded (such as founders, superseded by founder), and rows where the subject's type is not one schema.org lists for that property. For example, schema.org lists offers on Product, Service, Event and other types, but not on Organization; an organization uses makesOffer. These are hints, not errors: the schema.org data model says consumers "are not obliged to treat unexpected structures as errors".
RDF formats compared
All six formats below write the same RDF data model. Four hold one graph; N-Quads and TriG hold a dataset of several named graphs, and JSON-LD can hold either.
| Format | W3C specification and status | Media type | File extension | Holds |
|---|---|---|---|---|
| Turtle | RDF 1.1 Turtle, Recommendation, 25 February 2014 | text/turtle |
.ttl |
One graph, compact text |
| N-Triples | RDF 1.1 N-Triples, Recommendation, 25 February 2014 | application/n-triples |
.nt |
One graph, one triple per line |
| N-Quads | RDF 1.1 N-Quads, Recommendation, 25 February 2014 | application/n-quads |
.nq |
A dataset, one statement per line |
| TriG | RDF 1.1 TriG, Recommendation, 25 February 2014 | application/trig |
.trig |
A dataset; an extension of Turtle |
| RDF/XML | RDF 1.1 XML Syntax, Recommendation, 25 February 2014 (first Recommendation 2004) | application/rdf+xml |
.rdf |
One graph, as XML |
| JSON-LD | JSON-LD 1.1, Recommendation, 16 July 2020 (JSON-LD 1.0: 16 January 2014) | application/ld+json |
.jsonld |
A graph or a dataset, as JSON |
RDF 1.2 versions are on the way: RDF 1.2 Turtle is a Working Draft dated 11 November 2026, RDF 1.2 N-Triples, N-Quads and TriG are Working Drafts dated 5 November 2026, and RDF 1.2 XML Syntax is a Working Draft dated 25 October 2026. The RDF 1.1 Recommendations above are the current standards.
Which format should you use?
- In web pages: JSON-LD. Google Search supports JSON-LD, Microdata and RDFa, and recommends JSON-LD as the easiest to implement and maintain at scale.
- To read and write by hand: Turtle. The Turtle specification describes it as a syntax that writes a graph "in a compact and natural text form".
- For scripts and bulk loads: N-Triples. The N-Triples specification calls it "an easy to parse line-based subset of Turtle", with one triple per line.
Sources
All checked 13 November 2026:
- W3C, RDF 1.1 Concepts and Abstract Syntax, Recommendation, 25 February 2014
- W3C, RDF 1.1 Turtle, N-Triples, N-Quads, TriG and XML Syntax, Recommendations, 25 February 2014
- W3C, JSON-LD 1.1, Recommendation, 16 July 2020
- W3C, RDF 1.2 Working Drafts: Turtle, N-Triples, N-Quads, TriG, XML Syntax
- Schema.org, vocabulary file, version 30.1, JSON-LD context and data model
- Google Search Central, Introduction to structured data markup, last updated 10 December 2025
Next step
Triples relate things. See how a taxonomy and an ontology use them differently: taxonomy vs ontology.
Frequently asked questions
- What is a triple in RDF?
- A triple is one statement made of a subject, a predicate and an object. RDF 1.1 Concepts says an RDF graph is a set of triples, and that a triple is conventionally written in the order subject, predicate, object.
- Is a schema.org property a predicate?
- Yes. Every schema.org property, such as areaServed or worksFor, is a predicate. Its full IRI is the schema.org namespace plus the property name.
- Which format should I use to publish triples on a website?
- JSON-LD in a script tag. Google supports JSON-LD, Microdata and RDFa, and recommends JSON-LD because it is the easiest to implement and maintain.