CSV to RDF Converter
Transform CSV data into RDF format
CSV Input
RDF Settings
Customize namespaces, resource type, and subject generation.
Convert CSV to other formats
RDF Output
Convert other formats to RDF
Related Tools
CSV to reStructuredText
Convert CSV to reStructuredText table format
CSV to Ruby
Convert CSV to Ruby arrays and hashes
CSV to SQL
Convert CSV to SQL INSERT statements and CREATE TABLE
CSV to Textile
Convert CSV to Textile table markup
CSV to TOML
Convert CSV to TOML configuration format
CSV to TracWiki
Convert CSV to Trac Wiki table markup
About the CSV to RDF Converter
This tool turns CSV spreadsheets into RDF (Resource Description Framework) triples so you can publish data on the semantic web, feed knowledge graphs, or share Linked Data. It auto-builds subjects, predicates, and objects from each row, lets you control namespaces, and exports clean Turtle, RDF/XML, or JSON-LD.
Why Convert CSV to RDF?
Many teams still store master data in CSV files, but RDF is the standard for interoperable, machine-readable data. Converting CSV to RDF format lets you:
- Publish open data portals using Linked Data best practices.
- Load business glossaries, catalogs, or metadata into triplestores.
- Integrate tabular data with ontologies like Schema.org, FOAF, or custom vocabularies.
- Prototype knowledge graphs before investing in full ETL pipelines.
Key Features
- Multiple RDF Formats: Export Turtle (.ttl), RDF/XML (.rdf), or JSON-LD (.jsonld) with one click.
- Namespace Control: Configure base IRIs for subjects and predicates plus resource type IRIs.
- Subject Generation: Auto-generate subject IRIs per row or choose a specific column as the subject identifier.
- Datatype Detection: Detects IRIs, booleans, integers, decimals, dates, and dateTimes automatically.
- Header-Sensitive Mapping: Uses column names to build predicate terms (with safe sanitization).
- Preview & Download: See the RDF output instantly and download in the desired serialization.
How to Use the Converter
- Paste or Upload CSV: Provide CSV text or upload a
.csvfile. - Choose Options: Toggle headers, select delimiter, pick the RDF format, and configure namespaces/resource type.
- Select Subject Column: Use “auto” for generated IDs or select a header column for subject IRIs.
- Review the RDF Output: Preview Turtle/RDF/XML/JSON-LD and confirm predicates/objects look correct.
- Copy or Download: Copy the RDF snippet to your clipboard or download it for import into a triplestore.
Supported RDF Serializations
- Turtle: Human-readable syntax with
@prefixdeclarations. - RDF/XML: XML-based format compatible with older RDF tooling.
- JSON-LD: JSON-friendly Linked Data for web applications.
Common Use Cases
- Open Data Publishing: Convert CSV datasets to RDF for data.gov portals.
- Knowledge Graph Onboarding: Seed triplestores (Fuseki, GraphDB, Blazegraph, Neptune) with CSV exports.
- Ontology Mapping: Align CSV columns with custom vocabularies or Schema.org classes.
- Research & Academia: Share reproducible RDF datasets alongside papers.
- API Prototyping: Produce JSON-LD to power schema.org-rich APIs.
Best Practices for Clean RDF
- Ensure column headers are descriptive—they become predicate terms.
- Use consistent ID columns if you plan to reuse subject IRIs across datasets.
- Provide fully qualified IRIs in the resource type or predicate namespace fields.
- Trim whitespace and remove duplicate rows to avoid redundant triples.
- Validate exported RDF with tools like the W3C RDF Validator or SHACL constraints.
Privacy & Security
All CSV to RDF conversions happen entirely in your browser using client-side JavaScript. Your CSV data and generated RDF are never uploaded to any server, so sensitive datasets stay confidential.
Start Converting CSV to RDF
Paste your CSV, configure namespaces, and instantly export Resource Description Framework (RDF) data in Turtle, RDF/XML, or JSON-LD. It’s the quickest way to turn spreadsheets into Linked Data with zero software installs.
FAQ: CSV to RDF Converter
How do I import the generated Turtle into a triplestore?
Most triplestores (Fuseki, GraphDB, Blazegraph, Neptune, etc.) provide a web UI where you can upload Turtle files. Download the Turtle output from this tool as .ttl, then use the store’s “Import” or “Upload data” feature to load it into a named graph or the default graph.
What should I use for base and predicate namespaces?
As a rule of thumb, use a stable domain you control for both. For example:
Base namespace (subjects): https://example.com/id/
Predicate namespace: https://example.com/vocab/
The base namespace is used to build subject IRIs for each row, while the predicate namespace is used to construct property IRIs from column names.
How can I align columns with existing vocabularies like Schema.org?
One option is to set the resource type to a known class (e.g., https://schema.org/Person) and then post-process the output or your pipeline to map generated predicates to canonical ones. For more control, you can also manually edit the predicate namespace to match your vocabulary or generate RDF here, then use SPARQL CONSTRUCT queries to remap properties.
Why are some values treated as IRIs and others as literals?
The converter treats cells that look like HTTP/HTTPS URLs as IRIs and everything else as literals (with datatype detection for numbers, booleans, dates, etc.). If you prefer to force URLs to be plain strings, you can wrap them in quotes in the original CSV or adjust the RDF after import using SPARQL updates.
