Tools / Code Converter

Code Converter

Convert data between JSON, YAML, CSV and query-string formats with exact, reversible output

Paste data, pick formats; the conversion runs live.

Input

→

Output

What it does

Formats in, format out.

Three formats both ways

JSON, YAML (flat and nested) and CSV convert in either direction.

Real parsing

JSON.parse for JSON, indentation-aware YAML reading, quoted-field CSV.

Errors with locations

Bad input names the line, not a silent empty output.

Type fidelity

Numbers, booleans and nulls stay typed through JSON round-trips.

Numbers stay numbers

A value reads as a number only when it fits the strict pattern, so 007 and +5 stay text and 12, -3.5 and 1e3 become numbers.

Null, true and false typed

In YAML, null and a tilde become null, and true and false become booleans, before they reach JSON.

One document only

A leading three-dash line is accepted once. A second document is refused with its line number.

Unsupported YAML refused

Tabs for indentation, anchors, aliases, tags and block scalars each stop the run with a message that names the line.

Duplicate keys caught

A key repeated at the same level is an error, not a silent overwrite.

Quoted CSV fields

Commas, doubled quotes and line breaks inside quotes are read correctly. A header row and one data row are required.

How it works

Paste, pick, copy.

Step 1

Paste your data and pick its format.

Step 2

Pick the target format; conversion runs live.

Step 3

Copy the output.

FAQ

YAML anchors?

Not supported - anchors are flagged as unparseable rather than dropped.

CSV dialects?

Comma with optional quoting; semicolon dialects convert after a find-replace.

Why is the string 123 written with quotes in YAML?

Plain 123 would read back as a number. Strings that look like numbers, booleans, null, yes, no, on or off are quoted so a round trip keeps the type.

Are YAML comments kept?

Full-line comments are skipped and trailing comments after a space are removed. They are not carried into the output.

What does a bad flow collection do?

Only JSON-style square and curly brackets are accepted inside YAML. Anything else stops with a message.

Does my data get uploaded?

No. The parsers are JavaScript in the page and run in the tab.

Open Code Converter

Worked example

Real output, from the tool itself.

This is what Code Converter returned for the example input shown, captured from the tool itself - not a mockup.

You enter

From / To

JSON to YAML

Input

{"service":"api","replicas":3,"tls":true,"endpoints":[{"path":"/users","cache":60},{"path":"/orders","cache":null}],"limits":{"rps":100,"burst":200}}

The tool returns

service: api
replicas: 3
tls: true
endpoints:
  -
    path: /users
    cache: 60
  -
    path: /orders
    cache: null
limits:
  rps: 100
  burst: 200
Try it with your own input

Code Converter

See it at work

Convert data between JSON, YAML, CSV and query-string formats with exact, reversible output.

Code Converter
Fields
API
CLI
code
from
to
hiringsai tool code-converter
code string
from csv
to csv
3 fields, 3 required
curl -X POST https://hiringsai.com/api/v1/tools/code-converter/run
-d '{"input": {"code": "<text>", "from": "<text>", "to": "<text>"}}'
JSON result
hiringsai run code-converter --input '{"code": "<text>", "from": "<text>", "to": "<text>"}'
also callable over MCP
JSON result printed
Free toolAPI and MCPNo account
Fields
codestring
fromcsv
tocsv
Ways to use it
pagethis app
APIPOST .../run
CLIhiringsai run
MCPtools/call
API call
POST /api/v1/tools/code-converter/run
input: {"code": "<text>", "from": "<text>", "to": "<text>"}
JSON result back
Command line
hiringsai run code-converter
--input <json>
JSON result printed
The Code Converter page as it opens
Code Converter3 fields
The page as it opens, captured from the live site.
The Code Converter app at phone width
Code Converterphone layout
The same app at phone width.
A woman working at a desktop monitor
Code ConverterFree tool
Convert data between JSON, YAML, CSV and query-string formats with exact, reversible output.
A laptop on a wooden desk with a person typing
Code ConverterAPI and MCP
Call it from a script over the API or MCP.