Convert RDF N-Quads to CSV

Want to parse RDF N-Quads file and save to CSV file?

Try Data File Converter, a N-Quads to CSV converter for Windows, Mac, and Linux, Convert N-Quads file (.nq, .nquads) to CSV, Easy and Fast.

  • Can run in GUI mode, Step by Step, just a few mouse clicks.
  • Can run in Command line, for Scheduled Tasks and Streams.
  • Convert files locally and privately, avoid uploading large NQ file(s) to online services.

Download DataFileConverter Download DataFileConverter

Convert RDF N-Quads file (.nq, .nquads) to CSV file

Click “Start a New Convert”.

convert RDF N-Quads file to Csv file - task window

then show the wizard.

Select source/target file type.

convert N-Quads RDF file to Csv file - select type

1. Open a RDF N-Quads file.

convert RDF N-Quads file to Csv file - open RDF N-Quads file

2. Config target CSV file.

convert RDF N-Quads file to Csv file - config Csv file

3. Set rows options.

convert N-Quads RDF file to Csv file - summary

4. Convert RDF N-Quads to CSV.

convert N-Quads RDF file to Csv file - convert to Csv file

See CSV file

convert RDF N-Quads file to Csv file - view  Csv file

Convert RDF N-Quads to CSV in command line

Save “RDF N-Quads to CSV” session, then you can:

Set scheduled tasks for converting RDF N-Quads to CSV

You can schedule and automate this “RDF N-Quads to CSV” conversion task by:

  1. Save session and create .bat (Windows) or .sh (Linux/macOS) file for “RDF N-Quads to CSV” conversion.
  2. Set scheduled task for “RDF N-Quads to CSV” conversion.

How RDF maps to CSV

RDF is not a table — it is a graph written as triples (subject – predicate – object). Exporting it to CSV means deciding how the graph becomes rows and columns. Data File Converter does that for you:

In the RDF file In the CSV file
Subject (an IRI or a blank node) one row
Predicate (an IRI such as foaf:name) one column, named after the last part of the IRI
Object (IRI, literal, or blank node) the cell value for that row and column
rdf:type a Type column
Several values for one predicate merged into one cell, or split into several rows
Typed literal ("1234"^^xsd:int, "2026-09-18"^^xsd:date) a number / date cell when the target supports it, otherwise text
Language-tagged literal ("Hello"@en) text cell (the language tag is dropped)

Long IRIs are shortened to readable column names, and when the source is Turtle, N-Triples or N-Quads, prefixes and @base are resolved first — so a foaf: prefix and the full http://xmlns.com/foaf/0.1/ property land in the same column.

And for converting other RDF formats to CSV: RDF/XML(.rdf, .owl), Turtle(.ttl, .n3), N-Triples(.nt, .ntriples).

Need to convert between RDF formats (Turtle, RDF/XML, N-Triples, N-Quads, JSON-LD) instead of to a table? See RDFConverter (coming soon).

FAQ

What is Withdata DataFileConverter?
How long does it take to convert RDF N-Quads to CSV?
Is it safe to convert RDF N-Quads to CSV using DataFileConverter?
Can I convert RDF N-Quads to CSV on Linux, Mac OS?
Can I convert RDF N-Quads to CSV in command line?

More about Withdata DataFileConverter – N-Quads to CSV converter

NQ → CSV reference

Type mapping

Value kindin NQin CSV
Int"1234"^^<http://www.w3.org/2001/XMLSchema#int>1234
Bigint"9007199254740993"^^<http://www.w3.org/2001/XMLSchema#long>9007199254740993
Decimal"1234.56"^^<http://www.w3.org/2001/XMLSchema#decimal>1234.56
Float"1.234e10"^^<http://www.w3.org/2001/XMLSchema#double>1.234e+10
Text"text" as the object of a quadquoted only when it contains a comma or a quote
Long text"multi-line\ntext"must be quoted; line breaks inside force multi-line records
Date"2026-09-18"^^<http://www.w3.org/2001/XMLSchema#date>2026-09-18
Datetime"2026-09-18T14:30:00Z"^^<http://www.w3.org/2001/XMLSchema#d...2026-09-18 14:30:00
Binary"base64..."^^<http://www.w3.org/2001/XMLSchema#base64Binary>not representable - base64 or hex string
Boolean"true"^^<http://www.w3.org/2001/XMLSchema#boolean>TRUE / FALSE, or 1 / 0 depending on the writer
JSONa literal, or its own sub-graph with graph namesthe whole JSON value quoted, with internal quotes doubled

Dialect differences

Both NQ and CSV are file formats, so what differs below is how each one chooses to represent a value.

Propertyin NQin CSV
identifiersLiteral escaping only; four terms per statementDouble quotes; a literal quote is doubled ("" )
datesxsd:dateTime typed literalsConventional text: 2026-09-18 or 2026-09-18 14:30:00
binarybase64 inside a typed literalNot supported
separatorNewline between quadsComma ","
encodingUTF-8 by definitionNo declaration - UTF-8 works only with a BOM
typingResources and typed literals, plus graph namesNone - every field is text
shapeGraph of quads, one per lineFlat table, optional header row
ceilingStreams wellNo formal limit; row count bounded by memory

Do it online, free

Skip the manual work — convert RDF to CSV online, free (runs in your browser, nothing is uploaded). For large files or batch jobs, use the desktop apps.

New to the format? Read what an RDF file is (and how it maps to rows and columns).


Posted

in

by