MediaWiki to Firebase Converter

Transform MediaWiki tables into Firebase-compatible JSON format

About MediaWiki to Firebase Converter

Convert MediaWiki table markup to Firebase Realtime Database JSON structure with automatic key generation and field sanitization. Perfect for importing wiki data into Firebase applications.

Key Features

  • Firebase Structure: Creates proper Firebase Realtime Database JSON format
  • MediaWiki Parser: Accurately parses MediaWiki table syntax with {| |} delimiters
  • Smart Key Generation: Auto-detects IDs or generates sequential keys
  • Field Sanitization: Converts headers to valid Firebase keys
  • Flexible Key Formats: Choose between auto, item_N, or row_N formats
  • Header Support: Uses header row (!) as field names
  • Direct Import: Output can be directly imported to Firebase

How to Use

  1. Input MediaWiki Table: Paste your MediaWiki table markup or upload a .wiki file
  2. Configure Options: Choose key format and header settings
  3. Review Output: The Firebase JSON generates automatically
  4. Copy or Download: Use the output in your Firebase project

Key Format Options

  • Auto: Uses first column value as key if it looks like an ID (alphanumeric with dashes/underscores)
  • item_N: Sequential keys like item_0, item_1, item_2...
  • row_N: Sequential keys like row_0, row_1, row_2...

Example Conversion

MediaWiki Input:

{| class="wikitable" border="1"
! ID !! Name !! Age !! City !! Active
|-
| user1 || John Doe || 28 || New York || true
|-
| user2 || Jane Smith || 34 || London || false
|}

Firebase JSON Output:

{
  "user1": {
    "id": "user1",
    "name": "John Doe",
    "age": "28",
    "city": "New York",
    "active": "true"
  },
  "user2": {
    "id": "user2",
    "name": "Jane Smith",
    "age": "34",
    "city": "London",
    "active": "false"
  }
}

Common Use Cases

  • Wikipedia Data Import: Import Wikipedia table data into Firebase
  • Wiki to Database: Migrate wiki documentation to Firebase
  • Database Seeding: Create initial data for Firebase projects from wikis
  • Data Migration: Move data from MediaWiki to Firebase
  • Testing: Generate test data for Firebase applications from wiki tables

Firebase Compatibility

  • Realtime Database: Direct import to Firebase Realtime Database
  • Valid Keys: All keys are sanitized for Firebase compatibility
  • Nested Structure: Creates proper object hierarchy
  • JSON Format: Standard JSON that Firebase accepts

Field Sanitization

Headers are automatically converted to valid Firebase keys:

  • Converted to lowercase
  • Spaces replaced with underscores
  • Special characters removed
  • Numbers at start prefixed with underscore

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

Privacy & Security

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

FAQ  MediaWiki to Firebase Converter

Do I need a Firebase project set up to use this tool?

No. The converter simply generates Firebase-compatible JSON. You can use it offline and later paste or import the JSON into any Firebase Realtime Database project.

Where do I paste this JSON in the Firebase console?

In the Firebase console, open your Realtime Database, click the three-dot menu next to the root node (or any child node), and choose Import JSON. Then upload or paste the JSON generated by this tool.

What happens if my header names contain spaces or special characters?

Headers are automatically sanitized into valid Firebase keys by lowercasing, replacing spaces with underscores, and stripping unsupported characters. This keeps your data structure safe and compatible with Firebase rules.

Can I control the top-level key names for each record?

Yes. Use the Key Format option to choose between auto-detected IDs, item_N, or row_N style keys. Auto mode uses the first column as an identifier when it looks like a valid key.

Is this suitable for very large tables?

The tool is best suited for small to medium-sized tables, seed data, and configuration records. Very large tables may produce big JSON files that are slower to handle in the browser and in Firebase imports.