MediaWiki to RDF Converter

Transform MediaWiki tables into RDF (Resource Description Framework) format for semantic web applications

MediaWiki Input

RDF Output

About MediaWiki to RDF Converter

Convert MediaWiki table markup to RDF (Resource Description Framework) format for semantic web applications, linked data, and knowledge graphs. RDF is a W3C standard for representing information about resources in the web.

Key Features

  • Multiple RDF Formats: Support for Turtle, RDF/XML, and N-Triples serializations
  • Automatic Type Detection: Detects numeric values and URIs automatically
  • Custom Base URI: Configure the base URI for your RDF resources
  • Semantic Web Ready: Generate W3C-compliant RDF for linked data applications
  • Property Sanitization: Automatically converts headers to valid RDF property names
  • MediaWiki Parser: Accurately parses MediaWiki table syntax
  • File Upload: Upload .wiki files directly
  • Instant Preview: Real-time conversion as you type
  • Copy & Download: Easy export in .rdf, .ttl, or .nt formats

How to Use

  1. Input MediaWiki Table: Paste your MediaWiki table markup or upload a .wiki file
  2. Select RDF Format: Choose between Turtle, RDF/XML, or N-Triples
  3. Configure Base URI: Set the base URI for your RDF resources
  4. Review Output: The RDF output updates automatically
  5. Export: Copy to clipboard or download as .rdf, .ttl, or .nt file

RDF Formats

  • Turtle (.ttl): Human-readable format with compact syntax and prefix support
  • RDF/XML (.rdf): XML-based format, widely supported in legacy systems
  • N-Triples (.nt): Simple line-based format, easy to parse and process

Example Conversion

MediaWiki Input:

{| class="wikitable" border="1"
! Name !! Age !! City !! Department
|-
| John Doe || 28 || New York || Engineering
|-
| Jane Smith || 34 || London || Marketing
|}

Turtle Output:

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix ex: <http://example.org/vocab/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

<http://example.org/data/record1>
  ex:name "John Doe" ;
  ex:age "28"^^xsd:decimal ;
  ex:city "New York" ;
  ex:department "Engineering" .

Common Use Cases

  • Linked Data: Create linked data resources for the semantic web
  • Knowledge Graphs: Build knowledge graphs from Wikipedia tables
  • Ontology Development: Generate RDF data for ontology testing
  • Data Integration: Convert wiki data for RDF-based integration systems
  • SPARQL Queries: Prepare data for SPARQL query endpoints
  • Triple Stores: Import data into RDF triple stores like Apache Jena, Virtuoso
  • Semantic Search: Enable semantic search capabilities
  • DBpedia Integration: Convert Wikipedia tables to DBpedia-compatible format

RDF Concepts

  • Resources: Each row becomes an RDF resource with a unique URI
  • Properties: Column headers become RDF properties in the vocabulary namespace
  • Literals: Cell values become RDF literals with appropriate datatypes
  • Triples: Each cell creates a subject-predicate-object triple
  • Namespaces: Uses standard RDF, XSD, and custom vocabulary namespaces

Type Detection

The converter automatically detects data types:

  • Numeric Values: Assigned xsd:decimal datatype
  • URIs: Values starting with http:// or https:// become resource references
  • Text: All other values become string literals

MediaWiki Table Syntax

Supports standard MediaWiki table markup:

  • {|: Table opening with optional attributes
  • ! Header: Exclamation mark for header cells (separated by !!)
  • |-: Row separator
  • | Data: Pipe for data cells (separated by ||)
  • |}: Table closing

Turtle Format Features

  • Compact and human-readable syntax
  • Prefix declarations for shorter URIs
  • Semicolon notation for multiple properties
  • Datatype annotations with ^^
  • Widely used in semantic web applications

RDF/XML Format Features

  • XML-based serialization
  • Compatible with XML tools and parsers
  • Namespace support
  • rdf:about for resource identification
  • rdf:resource for URI references
  • rdf:datatype for typed literals

N-Triples Format Features

  • Simple line-based format
  • One triple per line
  • Full URIs (no prefixes)
  • Easy to parse and stream
  • Ideal for large datasets

Integration Examples

  • Apache Jena: Import into Jena TDB or Fuseki
  • Virtuoso: Load into OpenLink Virtuoso triple store
  • GraphDB: Import into Ontotext GraphDB
  • RDF4J: Use with Eclipse RDF4J framework
  • SPARQL Endpoints: Query with SPARQL 1.1
  • DBpedia: Compatible with DBpedia data model

Wikipedia Integration

Perfect for converting Wikipedia tables to RDF:

  • Extract data from Wikipedia articles
  • Convert to DBpedia-compatible format
  • Build custom knowledge graphs from Wikipedia
  • Integrate with Wikidata
  • Create semantic annotations

Tips for Best Results

  • Use meaningful column headers that will become property names
  • Choose Turtle format for human readability
  • Use RDF/XML for XML-based workflows
  • Use N-Triples for large-scale data processing
  • Configure a meaningful base URI for your domain
  • Include URIs in cells to create linked data connections
  • Validate output with RDF validators before deployment
  • Consider using owl:sameAs for linking to external resources

Privacy & Security

All conversions happen locally in your browser. Your MediaWiki data is never uploaded to any server, ensuring complete privacy and security.