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.
Convert RDF N-Quads file (.nq, .nquads) to CSV file
Click “Start a New Convert”.

then show the wizard.
Select source/target file type.

1. Open a RDF N-Quads file.

2. Config target CSV file.

3. Set rows options.

4. Convert RDF N-Quads to CSV.

See CSV file

Convert RDF N-Quads to CSV in command line
Save “RDF N-Quads to CSV” session, then you can:
- Convert RDF N-Quads to CSV in Windows command line.
- Convert RDF N-Quads to CSV in Linux command line.
- Convert RDF N-Quads to CSV in macOS command line.
Set scheduled tasks for converting RDF N-Quads to CSV
You can schedule and automate this “RDF N-Quads to CSV” conversion task by:
- Save session and create .bat (Windows) or .sh (Linux/macOS) file for “RDF N-Quads to CSV” conversion.
- 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
More about Withdata DataFileConverter – N-Quads to CSV converter
NQ → CSV reference
Type mapping
| Value kind | in NQ | in 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 quad | quoted 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 |
| JSON | a literal, or its own sub-graph with graph names | the 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.
| Property | in NQ | in CSV |
|---|---|---|
| identifiers | Literal escaping only; four terms per statement | Double quotes; a literal quote is doubled ("" ) |
| dates | xsd:dateTime typed literals | Conventional text: 2026-09-18 or 2026-09-18 14:30:00 |
| binary | base64 inside a typed literal | Not supported |
| separator | Newline between quads | Comma "," |
| encoding | UTF-8 by definition | No declaration - UTF-8 works only with a BOM |
| typing | Resources and typed literals, plus graph names | None - every field is text |
| shape | Graph of quads, one per line | Flat table, optional header row |
| ceiling | Streams well | No 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).
