Skip to main content

Overview

Kayston’s Forge provides powerful data transformation tools for developers working with structured data, lists, and database queries. All transformations run entirely in your browser with no external server calls.

Data Format Converters

JSON to CSV

Convert JSON arrays of objects to CSV format. Automatically flattens nested objects.

CSV to JSON

Parse CSV files and convert to JSON arrays. Handles headers, dynamic typing, and empty lines.

CSV to SQL INSERT

Generate SQL INSERT statements from CSV data. Supports multiple SQL dialects.

SQL Formatter

Format SQL queries with proper indentation. Supports MySQL, PostgreSQL, SQLite, and more.

PHP to JSON

Convert PHP serialized data or PHP array syntax to JSON.

JSON to PHP

Convert JSON to PHP serialized format or PHP array syntax.

PHP Serializer

Serialize JSON data to PHP serialized format.

PHP Unserializer

Unserialize PHP data to readable JSON or PHP array syntax.

List & Text Tools

List Splitter

Split lists into batches or chunks. Supports custom delimiters and multiple output templates.

List Compare

Compare two lists to find intersection, union, differences, or unique items.

Text Separator

Change text delimiters (comma, newline, tab, semicolon, pipe, space). Sort or deduplicate.

Line Sort/Dedupe

Sort text lines alphabetically and remove duplicates. Case-insensitive deduplication.

String Case Converter

Convert strings between camelCase, snake_case, kebab-case, PascalCase, SCREAMING_SNAKE_CASE, and Title Case.

JSON ↔ CSV Conversion

Convert between JSON arrays and CSV for spreadsheet compatibility. JSON to CSV Example
// Input
[
  {"name": "Alice", "age": 30, "city": "New York"},
  {"name": "Bob", "age": 25, "city": "Los Angeles"}
]
# Output
name,age,city
Alice,30,New York
Bob,25,Los Angeles
CSV to JSON Example
# Input
name,age,city
Alice,30,New York
Bob,25,Los Angeles
// Output
[
  {"name": "Alice", "age": 30, "city": "New York"},
  {"name": "Bob", "age": 25, "city": "Los Angeles"}
]
The JSON to CSV converter automatically flattens nested objects using dot notation (e.g., address.city becomes a column).

CSV to SQL INSERT

Generate INSERT statements from CSV data with support for multiple SQL dialects. Example
# Input
id,name,email
1,Alice,[email protected]
2,Bob,[email protected]
-- Output (MySQL)
INSERT INTO table_name (id, name, email) VALUES
(1, 'Alice', '[email protected]'),
(2, 'Bob', '[email protected]');
Supported Dialects
  • MySQL / MariaDB
  • PostgreSQL
  • SQLite
  • Microsoft SQL Server
  • Oracle
Customize the table name in the second input field. The tool uses the first row as column names.

SQL Formatting

Format SQL queries with proper indentation and keyword capitalization. Example
-- Input
select u.id,u.name,o.total from users u join orders o on u.id=o.user_id where o.total>100 order by o.total desc;

-- Output
SELECT
  u.id,
  u.name,
  o.total
FROM
  users u
  JOIN orders o ON u.id = o.user_id
WHERE
  o.total > 100
ORDER BY
  o.total DESC;
Supported Dialects
  • SQL (standard)
  • MySQL
  • PostgreSQL
  • MariaDB
  • SQLite
  • BigQuery
  • Snowflake
  • Redshift
  • Spark
  • and more…

PHP Data Conversion

Kayston’s Forge includes full support for PHP serialized data and PHP array syntax. PHP Serialize to JSON
// Input (PHP serialized)
a:2:{s:4:"name";s:5:"Alice";s:3:"age";i:30;}
// Output
{
  "name": "Alice",
  "age": 30
}
PHP Array Syntax to JSON
// Input (PHP array syntax)
[
    'name' => 'Alice',
    'age' => 30,
    'active' => true
]
// Output
{
  "name": "Alice",
  "age": 30,
  "active": true
}
JSON to PHP Array Syntax
// Input
{"name": "Alice", "age": 30}
// Output
[
    'name' => 'Alice',
    'age' => 30,
]
The PHP parser supports both array() and [] syntax. It handles nested arrays, objects, and preserves data types (strings, integers, booleans, null).

List Comparison

Compare two lists to find relationships between datasets. Example: Intersection (items in both lists)
# List A
apple
banana
cherry

# List B
banana
cherry
date

# Output (Intersection)
banana
cherry
Available Operations
  • Intersection - Items in both lists
  • Union - All unique items from both lists
  • A - B - Items only in list A
  • B - A - Items only in list B
  • Symmetric Difference - Items in either list but not both
Comparison is case-insensitive and trims whitespace. Empty lines are ignored.

List Splitter

Split lists into equal-sized batches or chunks. Example: Split into Groups of 3
# Input
apple
banana
cherry
date
eggfruit
fig

# Output (Plain Text)
Group 1:
apple
banana
cherry

Group 2:
date
eggfruit
fig
Output Templates
  • Plain Text - Simple grouped output
  • JSON Array - [["apple", "banana", "cherry"], ["date", "eggfruit", "fig"]]
  • Numbered List - Groups with numeric prefixes
Split Modes
  • Items per Group - Fixed number of items per group
  • Number of Groups - Distribute items evenly across N groups

Text Separator

Change delimiters in delimited text. Example: Comma to Newline
# Input (comma-separated)
apple, banana, cherry, date

# Output (newline-separated)
apple
banana
cherry
date
Supported Delimiters
  • Newline (\n)
  • Comma (,)
  • Comma + Space (, )
  • Semicolon (;)
  • Tab (\t)
  • Space
  • Pipe (|)
  • Custom (any string)
Additional Actions
  • Sort - Sort items alphabetically
  • Unique - Remove duplicates
  • Count - Show item count

Line Sort/Dedupe

Sort text lines and remove duplicates with advanced options. Example
# Input
banana
apple
cherry
apple
date

# Output (Sort Ascending + Dedupe)
apple
banana
cherry
date
Actions
  • Sort Ascending - A-Z
  • Sort Descending - Z-A
  • Dedupe Only - Remove duplicates without sorting
  • Dedupe + Sort - Remove duplicates then sort
Deduplication is case-insensitive and preserves the first occurrence of each unique line.

String Case Converter

Convert between common programming case conventions. Example
Input: hello_world_example

camelCase:         helloWorldExample
PascalCase:        HelloWorldExample
snake_case:        hello_world_example
kebab-case:        hello-world-example
SCREAMING_SNAKE:   HELLO_WORLD_EXAMPLE
Title Case:        Hello World Example
Supported Cases
  • camelCase - First word lowercase, rest capitalized
  • PascalCase - All words capitalized
  • snake_case - Lowercase with underscores
  • kebab-case - Lowercase with hyphens
  • SCREAMING_SNAKE_CASE - Uppercase with underscores
  • Title Case - Space-separated with capitalized words
The converter intelligently parses existing case conventions, so you can convert from any format to any other format.

Best Practices

CSV Headers Always include a header row in CSV files for proper column mapping. The CSV to JSON and CSV to SQL tools use the first row as field names. SQL Dialect Selection Choose the correct SQL dialect for your database:
  • MySQL - Uses backticks for identifiers
  • PostgreSQL - Uses double quotes for identifiers, supports advanced types
  • SQLite - Simpler syntax, fewer data types
  • SQL Server - Uses square brackets for identifiers
PHP Serialization Security
Never unserialize untrusted PHP data in production applications. PHP’s unserialize() function can execute arbitrary code if the input contains malicious object instances. Use JSON for data interchange instead.
List Comparison Performance For very large lists (>10,000 items), the comparison may take a few seconds. Consider breaking large datasets into smaller chunks.

Keyboard Shortcuts

  • Cmd/Ctrl + Enter - Execute transformation
  • Cmd/Ctrl + Shift + C - Copy output
  • Cmd/Ctrl + K - Switch tools

Build docs developers (and LLMs) love