MySQL to MediaWiki Converter

Transform MySQL database dumps into MediaWiki markup for Wikipedia, Wikia, and other MediaWiki-powered sites

MySQL Input

MediaWiki Output

About MySQL to MediaWiki Converter

Convert MySQL database dumps (CREATE TABLE and INSERT statements) to MediaWiki table markup format for use in Wikipedia, Wikia, and other MediaWiki-powered wikis. MediaWiki uses a pipe-based syntax with special formatting for tables.

Key Features

  • Automatic Parsing: Extracts table structure and data from MySQL dumps
  • Header Support: Toggle header row with exclamation mark (!) delimiters
  • Table Classes: Choose from wikitable, sortable, collapsible styles
  • Border Control: Add or remove table borders
  • MediaWiki Compatible: Works with Wikipedia, Wikia, and all MediaWiki sites
  • File Upload: Upload .sql files directly
  • Instant Preview: Real-time conversion as you type
  • Copy & Download: Easy export options

How to Use

  1. Input MySQL Data: Paste your MySQL CREATE TABLE and INSERT statements or upload a .sql file
  2. Configure Options: Choose header, border, and table class settings
  3. Review Output: The MediaWiki markup updates automatically
  4. Copy to Wiki: Use the Copy button and paste into your wiki page
  5. Download (Optional): Save as .wiki file for later use

MediaWiki Table Syntax

  • {|: Table opening with optional attributes
  • ! Header: Exclamation mark for header cells
  • |-: Row separator
  • | Data: Pipe for data cells
  • ||: Cell separator within a row
  • |}: Table closing

Table Classes

  • wikitable: Standard Wikipedia table styling with borders and alternating row colors
  • wikitable sortable: Adds sorting functionality to column headers
  • wikitable collapsible: Makes table collapsible with show/hide button
  • None: No class, uses default MediaWiki styling

Example Conversion

MySQL Input:

CREATE TABLE employees (
  id INT PRIMARY KEY,
  name VARCHAR(100),
  age INT,
  city VARCHAR(50)
);

INSERT INTO employees VALUES (1, 'John Doe', 28, 'New York');
INSERT INTO employees VALUES (2, 'Jane Smith', 34, 'London');

MediaWiki Output:

{| class="wikitable" border="1"
! id !! name !! age !! city
|-
| 1 || John Doe || 28 || New York
|-
| 2 || Jane Smith || 34 || London
|}

Common Use Cases

  • Wikipedia Editing: Add database tables to Wikipedia articles
  • Wiki Documentation: Create structured documentation tables from database exports
  • Wikia/Fandom: Build tables for gaming wikis and fan sites
  • Internal Wikis: Document company data in corporate wikis
  • Database Documentation: Share database content in wiki format
  • Data Migration: Transfer MySQL data to wiki-based systems

MediaWiki Compatibility

This converter generates standard MediaWiki markup that works with:

  • Wikipedia (all language editions)
  • Wikia / Fandom wikis
  • MediaWiki-powered corporate wikis
  • Wikimedia Commons
  • Wiktionary, Wikibooks, Wikiversity
  • Any site using MediaWiki software

Supported MySQL Syntax

  • CREATE TABLE: Extracts column names and table structure
  • INSERT INTO ... VALUES: Parses data from INSERT statements
  • Quoted Values: Handles single and double quotes properly
  • Multiple Inserts: Processes multiple INSERT statements
  • Escaped Characters: Properly handles escaped quotes and special characters

Advanced Features

  • Sortable Tables: Enable column sorting with "wikitable sortable" class
  • Collapsible Tables: Create expandable tables with "wikitable collapsible" class
  • Cell Alignment: MediaWiki supports inline styling for alignment
  • Row Spanning: Can be added manually with rowspan attribute
  • Column Spanning: Can be added manually with colspan attribute

Tips for Best Results

  • Use "wikitable" class for consistent Wikipedia styling
  • Enable "sortable" for tables with many rows
  • Keep cell content concise for better readability
  • Test the output in wiki preview mode before publishing
  • Use header row for column names
  • Avoid nested tables for better compatibility
  • Consider mobile users when creating wide tables

Privacy & Security

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