RDFLib (Python)
Convert from any graph formatto RDFLib (Python) Convert from RDFLib (Python)to any other format
RDFLib is a pure-Python library for working with RDF (the Resource Description Framework), maintained by the community-run RDFLib organization on GitHub and distributed under the BSD-3-Clause license (version 7.6.0, February 2026). It is the de-facto standard toolkit for RDF processing in Python and the anchor of a broader family of related packages (SPARQLWrapper, pyLODE, and others). Because it is dependency-light and pure Python, it is widely embedded in semantic-web, linked-data, and ontology-engineering pipelines.
The core abstraction is the Graph: an iterable collection of subject-predicate-object triples, where terms are URIRefs, BNodes, or Literals (with datatype and language tags), organized through Namespace helpers. Named graphs and quads are handled via the Dataset/ConjunctiveGraph classes. Storage is decoupled through a pluggable Store interface, so the same Graph API can be backed by an in-memory store, an on-disk Berkeley DB store, or a remote SPARQL endpoint, with additional backends supplied as plugins.
RDFLib ships parsers and serializers for essentially the full RDF syntax landscape, making it a practical hub for format conversion: Turtle, N-Triples, N-Quads, RDF/XML, N3, TriG, TriX, JSON-LD, RDFa, and Microdata, plus HexTuples; RDF-star (RDF-star) syntaxes are supported in recent releases. Loading a file in one syntax and reserializing in another is a one-line idiom, which makes RDFLib a common building block behind lightweight RDF converters. It also includes a SPARQL 1.1 implementation covering both queries and updates, with a mechanism for registering custom functions.
Within the graph-data ecosystem it occupies the RDF/triple-store niche rather than the labeled-property-graph niche served by tools like NetworkX or Neo4j; for heavier, JVM-based RDF workloads Jena/RIOT is the closest analogue, and dotNetRDF covers the .NET world. Its main strengths are breadth of format coverage, a clean Pythonic API, and its embedded SPARQL engine. The chief limitations are performance and scale: being pure Python, parsing, in-memory storage, and query execution are slow relative to native or JVM engines, so it is best suited to small-to-medium datasets and scripting rather than large-scale triple-store serving.
Graph Formats(Input & Output)
Input Formats
Frequently Asked Questions
What graph file formats does RDFLib (Python) support?
See the list on this page — it shows every format RDFLib (Python) can read, write and display.
How do I import a graph into RDFLib (Python)?
Convert your file to a format RDFLib (Python) can read, then open it in RDFLib (Python). Use GraphInOut to get a RDFLib (Python)-compatible file in seconds.
How do I convert a file so RDFLib (Python) can open it?
Use the convert links above — upload or paste your graph, pick a format RDFLib (Python) accepts and download the result, right in your browser.