Skip to content

feat: CSV ↔ JSON ↔ SQL INSERT Converter — bidirectional data format translator #85

Description

@ajithakdev

Summary

Add a CSV ↔ JSON ↔ SQL INSERT Converter tool. Developers constantly receive data exports in CSV from clients, spreadsheets, or databases and need to convert them for seeding databases, generating mock API responses, or injecting data into test suites.

🔴 Privacy Critical

Developers paste lists of real user IDs, email addresses, order IDs, and internal data from production exports into public online converters. Toolglass keeps everything client-side.

Proposed Implementation

  • Location: src/tools/csv-converter/CsvConverterTool.tsx
  • Dependency: papaparse (~8KB, 100% client-side CSV parser)
  • Features:
    • CSV → JSON: Parse CSV/TSV into JSON array of objects, with auto-detected headers
    • JSON → CSV: Convert JSON array of objects into CSV with configurable delimiter
    • CSV → SQL INSERT: Generate batch INSERT INTO table_name (cols) VALUES (...) statements
      • Auto-detect numeric/boolean/null types
      • Proper string quoting and escaping
      • Configurable table name
      • Dialect: PostgreSQL, MySQL, SQLite
    • JSON → SQL INSERT: Same as above from JSON input
    • File upload (drag & drop) or paste
    • Column preview table
    • Row count, column count display
    • Download converted output as file
    • Copy to clipboard

Acceptance Criteria

  • CSV parsing handles quoted fields, commas within values, newlines in values
  • JSON output is valid and well-formatted
  • SQL INSERT statements are syntactically correct
  • Type detection works (numbers, booleans, nulls, strings)
  • Large files (>10K rows) process without UI freeze
  • TSV (tab-separated) supported alongside CSV

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestnew toolA new tool addition to the toolkit

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions