RDF Format Converter - Convert Between RDF Formats Online
Convert RDF between Turtle, N-Triples, N-Quads, RDF/XML and JSON-LD in your browser.
How to Convert Between RDF Formats - Universal RDF Converter Guide
Input Your RDF Data
Start by adding your RDF data in any format - Turtle, N-Triples, RDF/XML, or JSON-LD. You have a few easy ways:
Example: Sample Turtle Input
Here's RDF data in Turtle format that you might want to convert:
@prefix schema: <http://schema.org/> .@prefix foaf: <http://xmlns.com/foaf/0.1/> .<http://example.org/person/alice>a schema:Person, foaf:Person ;schema:name "Dr. Alice Johnson" ;schema:jobTitle "Data Scientist" .
Select Output Format
Choose which RDF format you want to convert to. Powered by N3.js and jsonld.js, the converter supports:
Example: The Same Data in N-Triples
Converting the Turtle example above to N-Triples produces:
<http://example.org/person/alice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/Person> .<http://example.org/person/alice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .<http://example.org/person/alice> <http://schema.org/name> "Dr. Alice Johnson" .<http://example.org/person/alice> <http://schema.org/jobTitle> "Data Scientist" .
Notice how prefixes are expanded to full URIs - perfect for streaming and bulk processing!
Export Converted RDF
The output updates as soon as you type or switch formats. Literal values, datatypes and language tags come through as written; blank nodes may get new labels.
Example: JSON-LD Output
The same data as JSON-LD. The converter writes expanded JSON-LD with full IRIs, which any JSON-LD library can compact with your own @context:
[{"@id": "http://example.org/person/alice","@type": ["http://schema.org/Person", "http://xmlns.com/foaf/0.1/Person"],"http://schema.org/name": [{ "@value": "Dr. Alice Johnson" }],"http://schema.org/jobTitle": [{ "@value": "Data Scientist" }]}]
Each value is an object with @value, so datatypes and language tags have somewhere to live.
Frequently Asked Questions
Which RDF formats are supported?
Turtle (.ttl), N-Triples (.nt), N-Quads (.nq), RDF/XML (.rdf) and JSON-LD (.jsonld), in both directions. TriG and Notation3 files are not read. For RDF/XML input the converter understands the syntax real files use: rdf:Description and typed nodes, rdf:about, rdf:ID, rdf:nodeID, rdf:resource, rdf:datatype, xml:lang, xml:base, rdf:li and the Resource, Literal and Collection parse types.
Do you keep my prefixes?
In Turtle output, yes. The prefixes declared in your Turtle input are reused, along with a few common ones such as schema, rdf, rdfs, xsd, foaf, dc and owl. RDF/XML output turns them into xmlns declarations. N-Triples and N-Quads have no prefixes at all, and the JSON-LD output is written in expanded form with full IRIs, so you can compact it with your own @context afterwards.
Will my numbers and datatypes come through unchanged?
Yes. Literal values are copied as text, so 8901240544102066246 stays an xsd:integer with every digit, 14.50 stays 14.50, and language tags like @es are kept. The one place JSON itself sets the rules is JSON-LD input: a plain JSON number with a fraction, such as 14.50, becomes an xsd:double (written 1.45E1), because that is what the JSON-LD standard says. If you need the exact decimal, write it as {"@value": "14.50", "@type": "xsd:decimal"}.
Is anything changed during the conversion?
The triples themselves are not, but a few things around them can be. Blank nodes get new labels (your _:person may come out as _:n3-0), comments are dropped, and statements may come out in a different order. Named graphs only exist in N-Quads and JSON-LD; if your data has them and you pick Turtle, N-Triples or RDF/XML as the output, you get an error saying so instead of a half-converted file.
Can I use this to move data between triple stores?
For small and medium exports, yes. A common case is turning a Turtle dump into N-Triples or N-Quads for a bulk loader, or turning JSON-LD from an API into Turtle you can read. For multi-gigabyte dumps, a command-line tool such as Apache Jena riot will be faster.
Can I convert large RDF files?
Everything runs in your browser tab, so the limit is your device's memory. Files of a few megabytes convert fine; we suggest staying under about 10 MB. For anything larger, use a command-line converter.
Is my data uploaded anywhere?
No. Parsing and writing both happen in your browser, and the file you pick with Upload is read locally. Nothing is sent to our server.
Want to check a file before or after converting it? The RDF Validator points to the exact line of a syntax error.
Related Tools
JSON to RDF Turtle
Convert JSON to RDF Turtle format for semantic web applications
RDF Turtle to JSON
Convert RDF Turtle format to JSON for easier processing
JSON-LD Validator
Validate JSON-LD syntax and context resolution
RDF Validator
Validate RDF Turtle syntax and structure
JSON-LD to RDF Turtle
Convert JSON-LD to RDF Turtle format for semantic web applications
N-Triples Formatter
Format and beautify N-Triples RDF data