Convert HTML to MediaWiki
Max file size 100mb.
HTML vs MediaWiki Format Comparison
| Aspect | HTML (Source Format) | MediaWiki (Target Format) |
|---|---|---|
| Format Overview |
HTML
HyperText Markup Language
The standard markup language for creating web pages and web applications. HTML uses tags to structure content including headings, paragraphs, links, images, tables, and forms. Rendered by web browsers to display formatted content. Web Standard Universal |
MediaWiki
MediaWiki Markup Language
A lightweight markup language used by MediaWiki-powered wikis, including Wikipedia, Fandom, and thousands of other wiki sites. Uses simple syntax conventions like equal signs for headings and apostrophes for bold/italic text instead of HTML tags. Wiki Format Wikipedia |
| Technical Specifications |
Structure: Tag-based markup with nested elements
Encoding: UTF-8 (recommended), ASCII compatible Format: Plain text with XML-like tags Standard: W3C / WHATWG HTML Living Standard |
Structure: Line-based lightweight markup
Encoding: UTF-8 Format: Plain text with special characters Standard: MediaWiki software specification |
| Syntax Examples |
HTML uses angle-bracket tags: <h1>Page Title</h1> <p><b>Bold text</b> and <i>italic text</i></p> <a href="url">Link</a> <ul><li>List item</li></ul> |
MediaWiki uses simplified markup: = Page Title =
'''Bold text''' and
''italic text''
[[Link|Display Text]]
* List item
{| class="wikitable"
|-
| Cell
|}
|
| Content Support |
|
|
| Advantages |
|
|
| Disadvantages |
|
|
| Common Uses |
|
|
| Best For |
|
|
| Version History |
Introduced: 1993 (Tim Berners-Lee)
Current Version: HTML Living Standard Status: Active, continuously updated Evolution: HTML → HTML5 → Living Standard |
Introduced: 2002 (MediaWiki 1.0)
Current Version: MediaWiki 1.41+ syntax Status: Active, evolving with MediaWiki Evolution: UseModWiki → MediaWiki markup |
| Software Support |
Browsers: All modern browsers
Editors: VS Code, Sublime, Notepad++, etc. CMS: WordPress, Joomla, Drupal Other: Email clients, PDF generators |
MediaWiki: Full native support
Wikipedia: Primary content format Fandom: Full support Other: Pandoc, various wiki engines |
Why Convert HTML to MediaWiki?
Converting HTML to MediaWiki markup is essential when you need to migrate web content to a wiki platform such as Wikipedia, Fandom, or any MediaWiki-powered site. HTML's tag-based syntax is powerful for web pages but isn't directly compatible with wiki editing interfaces, which expect MediaWiki's simplified markup language.
MediaWiki markup was designed to make collaborative editing accessible to non-technical users. Instead of writing angle-bracket tags like <b> and <a href="...">, wiki editors use triple apostrophes for bold text and double square brackets for links. This simplicity encourages community participation and makes it easier to review changes in diff views.
The conversion process transforms HTML elements into their MediaWiki equivalents: headings become lines surrounded by equal signs, HTML tables become pipe-delimited wiki tables, links are converted to bracket syntax, and formatting tags are replaced with apostrophe-based markup. While some complex HTML features like JavaScript and advanced CSS don't have MediaWiki equivalents, the core content structure is faithfully preserved.
This converter is particularly useful for organizations migrating documentation from traditional web-based systems to MediaWiki-based knowledge bases. It saves hours of manual reformatting and ensures consistent conversion of tables, lists, headings, and other structural elements that would be tedious to convert by hand.
Key Benefits of Converting HTML to MediaWiki:
- Wiki Compatibility: Content ready for Wikipedia, Fandom, and other MediaWiki sites
- Simplified Editing: MediaWiki markup is easier for collaborative editing
- Content Migration: Move web content to wiki platforms efficiently
- Revision Tracking: Wiki platforms provide built-in version history
- Community Contribution: Lower barrier for non-technical editors
- Template Integration: Leverage MediaWiki's powerful template system
- Structured Knowledge: Organize content with categories and namespaces
Practical Examples
Example 1: Article Page Migration
Input HTML file (article.html):
<h1>Solar System</h1> <p>The <b>Solar System</b> consists of the <a href="/wiki/Sun">Sun</a> and the objects that orbit it.</p> <h2>Planets</h2> <ul> <li>Mercury</li> <li>Venus</li> <li>Earth</li> </ul>
Output MediaWiki file (article.mediawiki):
= Solar System = The '''Solar System''' consists of the [[Sun]] and the objects that orbit it. == Planets == * Mercury * Venus * Earth
Example 2: Data Table Conversion
Input HTML file (data.html):
<table border="1">
<tr>
<th>Planet</th>
<th>Distance (AU)</th>
</tr>
<tr>
<td>Mercury</td>
<td>0.39</td>
</tr>
<tr>
<td>Venus</td>
<td>0.72</td>
</tr>
</table>
Output MediaWiki file (data.mediawiki):
{| class="wikitable"
|-
! Planet !! Distance (AU)
|-
| Mercury || 0.39
|-
| Venus || 0.72
|}
Example 3: Documentation Page with Links
Input HTML file (docs.html):
<h2>Installation Guide</h2> <p>Follow these steps to install:</p> <ol> <li>Download from <a href="https://example.com">official site</a></li> <li>Run the <code>install.sh</code> script</li> <li>See <a href="/wiki/Configuration">Configuration</a> page</li> </ol> <blockquote>Note: Requires admin privileges.</blockquote>
Output MediaWiki file (docs.mediawiki):
== Installation Guide ==
Follow these steps to install:
# Download from [https://example.com official site]
# Run the install.sh script
# See [[Configuration]] page
{{quote|Note: Requires admin privileges.}}
Frequently Asked Questions (FAQ)
Q: What is MediaWiki markup?
A: MediaWiki markup is a lightweight text formatting language used by MediaWiki-powered websites, most notably Wikipedia. It uses simple syntax conventions like equal signs for headings (== Heading ==), apostrophes for bold/italic text ('''bold''', ''italic''), and double square brackets for internal links ([[Page Name]]). It was designed to be easier to write than HTML while still supporting structured content.
Q: Will all my HTML formatting be preserved?
A: Core formatting elements such as headings, bold, italic, links, lists, and tables are faithfully converted. However, advanced HTML features like CSS styling, JavaScript, custom classes, and complex layouts do not have direct MediaWiki equivalents and will be simplified or removed during conversion. The textual content itself is always preserved.
Q: Can I use the converted markup on Wikipedia?
A: Yes! The output uses standard MediaWiki syntax that is fully compatible with Wikipedia, Wikimedia Commons, Wiktionary, and all other Wikimedia Foundation projects. You can paste the converted markup directly into the wiki editor. Note that Wikipedia has its own style guidelines (Manual of Style) that you may need to follow for published articles.
Q: How are HTML tables converted to MediaWiki format?
A: HTML tables are converted to MediaWiki's pipe-based table syntax. The opening <table> tag becomes {|, rows use |-, header cells use !, data cells use |, and the closing tag becomes |}. Table attributes like class="wikitable" can be added for proper styling on wiki sites. Complex nested tables are also supported.
Q: What happens to HTML images during conversion?
A: HTML <img> tags are converted to MediaWiki's file syntax: [[File:filename.jpg|alt text]]. The image filename and alt text are preserved. However, you will need to separately upload the image files to the target wiki, as MediaWiki sites manage images through their own file upload system rather than linking to external URLs.
Q: Does this work with complex HTML pages with CSS and JavaScript?
A: The converter focuses on the HTML content structure and ignores CSS stylesheets and JavaScript code, as these are not supported in MediaWiki markup. The semantic content (text, headings, lists, tables, links) is extracted and converted, while presentation-only elements are stripped. For pages heavily dependent on CSS/JS for layout, some manual adjustment may be needed.
Q: Can I convert MediaWiki back to HTML?
A: Yes, the reverse conversion is also possible. MediaWiki software itself renders wiki markup as HTML for browser display. You can also use tools like Pandoc to convert MediaWiki markup back to HTML. Our converter supports various format combinations, so check our text conversion tools for the reverse direction.
Q: What wiki platforms support MediaWiki markup?
A: MediaWiki markup is supported by all sites running the MediaWiki software, including Wikipedia, Fandom (formerly Wikia), Wikimedia Commons, Wiktionary, Wikibooks, and thousands of privately hosted wikis. Some other wiki platforms like DokuWiki and TWiki use different markup syntaxes, so this conversion is specifically for MediaWiki-compatible sites.