What Is an RDF File? (And How to Open One)

An RDF file (Resource Description Framework) is a text file that stores a graph of statements. Each statement is a triple — a subject, a predicate and an object. RDF is a W3C standard, and the same graph can be written in several file formats: RDF/XML, Turtle, N-Triples or N-Quads.

What an RDF file looks like

The most readable form is Turtle (.ttl). A statement reads "subject → predicate → object", and a semicolon repeats the subject on the next line:

@prefix foaf: <http://xmlns.com/foaf/0.1/> .

<http://example.org/alice> foaf:name  "Alice" ;
                             foaf:age   42 ;
                             foaf:knows <http://example.org/bob> .

The same three facts written as RDF/XML (.rdf, .owl) are valid XML, which is why an RDF file often opens in an XML editor. N-Triples (.nt) writes one full triple per line, and N-Quads (.nq) adds a fourth term, the named graph.

RDF vs XML vs JSON-LD

RDF (Turtle)XMLJSON-LD
Data modelgraph of triplestree of elementsgraph of triples
Syntaxcompact texttags, verboseJSON
Typical files.ttl, .nt, .nq, .rdf, .owl.xml.jsonld, and JSON-LD inside HTML
Common uselinked data, knowledge graphs, ontologiesdocuments, configurationschema.org structured data

RDF/XML is RDF in XML clothing; JSON-LD is RDF in JSON clothing. Turtle and N-Triples are the same graph again, just easier to read and to parse line by line.

How to open an RDF file

  • Read it raw: any text editor (Notepad, VS Code, Notepad++). RDF is plain text — there is no hidden binary format.
  • See it as a table: a text editor cannot turn triples into rows and columns. Use a converter that understands RDF, such as RDF to Excel or RDF to CSV, which flatten the graph into a flat table.
  • Edit an ontology: tools such as Protégé are built for OWL/RDF ontologies (classes, properties, restrictions) rather than for data export.
  • In a database or triplestore: platforms such as GraphDB, Stardog, Jena or RDF4J load RDF natively and answer SPARQL queries.

How to convert an RDF file

The most common conversions are RDF to Excel, RDF to CSV, RDF to JSON and RDF to SQL. Every RDF serialization — RDF/XML, Turtle, N-Triples and N-Quads — can go to the same flat table. Withdata DataFileConverter does this locally:

To convert an RDF file into another RDF format (for example Turtle to RDF/XML, or N-Triples to Turtle) without flattening it into a table, see RDFConverter (coming soon).

Frequently asked questions

What is an RDF file?

It is a text file that stores a graph of subject-predicate-object triples, per the W3C Resource Description Framework standard. The same graph exists in several serializations: RDF/XML, Turtle, N-Triples and N-Quads.

How do I open an RDF file?

Open it in a plain text editor to read it raw. To see it as rows and columns, use a converter such as RDF to Excel, because a text editor cannot split triples into a table.

Can Excel open an RDF file?

Not directly — Excel has no concept of triples. Convert the RDF file to CSV or Excel first, then open the result.

Why does my RDF file look like XML?

Because RDF/XML is a valid XML serialization of RDF, so a .rdf or .owl file is XML. Turtle and N-Triples express the same triples without XML tags.

What is a .ttl file?

A .ttl file is RDF written in Turtle — the most human-readable RDF syntax, using prefixes such as foaf: instead of full URLs.

How do I convert RDF to Excel or CSV?

Use the RDF to Excel converter or the RDF to CSV converter, or the desktop app for large files, batch conversion and scheduling.

Convert your RDF files now

Start with RDF to Excel or RDF to CSV for a single file, or see the full RDF tool set for Turtle, N-Triples and N-Quads. Related reading: CSV vs JSON vs XML: file size and speed compared.