Data Format and Unit Converter avatar

Data Format and Unit Converter

Pricing

from $10.00 / 1,000 successful conversions

Go to Apify Store
Data Format and Unit Converter

Data Format and Unit Converter

Offline conversion between CSV, JSON, JSON Lines, YAML, XML and TOML, plus exact unit conversion for length, mass, temperature, pressure, energy, force, power and volume. No network access and no scraping.

Pricing

from $10.00 / 1,000 successful conversions

Rating

0.0

(0)

Developer

Brightwater Tools

Brightwater Tools

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

12 days ago

Last modified

Categories

Security

Limited permissions

Share

Convert data between CSV, JSON, JSON Lines, YAML, XML and TOML, and convert numbers between engineering units with exact arithmetic. Paste your data, pick the formats, get the result. It runs fully offline: no web requests, no scraping, and your data never leaves the run.

$0.01 per successful conversion. Failed runs are not charged.

What you can do with it

  • Turn a CSV export into JSON for an API, or JSON from an API into a CSV for Excel or Google Sheets.
  • Convert YAML config to JSON or TOML (and back) when moving between tools.
  • Flatten nested JSON into dotted CSV columns (address.city, tags.0).
  • Read XML into JSON, with attributes kept as @name keys.
  • Convert a list of measurements between units, for example inches to centimetres, psi to kPa, °F to °C, lbf to N, US gallons to litres.
  • Use it as a step in your Apify integrations, Make, Zapier or n8n workflows, or call it from the Apify API.

How to use it

  1. Choose a mode: convert for data formats or units for unit conversion.
  2. Fill in the fields for that mode (see below).
  3. Click Start. The result appears in the Output tab and the dataset.

Mode: convert

FieldWhat to enter
dataThe text to convert (paste it in)
input_formatcsv, json, jsonl, yaml, xml or toml
output_formatAny of the same six
csv_delimiterOptional, default , (use ; or a tab for European CSV)
xml_rootOptional root element name when writing XML (default root)
prettyIndented output for JSON, YAML and XML (default on)

Example input:

{
"mode": "convert",
"input_format": "json",
"output_format": "csv",
"data": "[{\"material\": \"steel\", \"density_kg_m3\": 7850}, {\"material\": \"aluminium\", \"density_kg_m3\": 2700}]"
}

Output (one dataset item):

{
"input_format": "json",
"output_format": "csv",
"content": "material,density_kg_m3\nsteel,7850\naluminium,2700\n"
}

Mode: units

FieldWhat to enter
units_categorylength, mass, temperature, pressure, energy, force, power or volume
units_from, units_toUnit names in lower case with underscores, for example inch, centimeter, psi, kilopascal, pound_force, us_gallon
valuesOne number per line, up to 1,000 values
precisionSignificant digits in the result (default 12)

Supported unit names:

CategoryUnits
lengthnanometer, micrometer, millimeter, centimeter, meter, kilometer, inch, foot, us_survey_foot, yard, mile, nautical_mile
massmilligram, gram, kilogram, tonne, ounce, pound, stone, short_ton, long_ton
temperaturekelvin, celsius, fahrenheit, rankine
pressurepascal, kilopascal, megapascal, bar, psi, standard_atmosphere, torr
energyjoule, kilojoule, kilowatt_hour, thermochemical_calorie, kilocalorie, btu_it, electronvolt
forcenewton, kilonewton, dyne, kilogram_force, pound_force, kip
powerwatt, kilowatt, megawatt, horsepower, metric_horsepower, btu_it_per_hour
volumemilliliter, liter, cubic_centimeter, cubic_meter, cubic_inch, cubic_foot, us_fluid_ounce, us_cup, us_pint, us_quart, us_gallon, imperial_gallon

You get one dataset item per value. Factors are exact, taken from the SI and NIST SP 811 definitions (for example 1 in = 2.54 cm exactly, 1 lb = 0.45359237 kg exactly), and rounding happens only at the end.

Pricing

  • $0.01 per successful run (event conversion). In units mode, one run with up to 1,000 values is still one conversion.
  • A tiny Apify start fee per run ($0.00005).
  • Failed runs (bad input, unsupported format) are not charged for the conversion.
  • Apify's free plan includes monthly credit, so you can try it at no cost.

Good to know

  • Size limit: inputs up to 1 MB by default (max_input_bytes, up to 5 MB).
  • CSV has no types: numbers and true/false come back as text after a CSV round trip.
  • Nested data in CSV is flattened to dotted columns. Converting that CSV back does not rebuild the nesting.
  • Spreadsheet safety: values starting with =, +, - or @ are written as they are. Spreadsheets may treat them as formulas, so check untrusted data before opening it in Excel.
  • XML: attributes become @name keys and mixed text becomes #text. XML with DOCTYPE or ENTITY declarations is refused for safety.
  • TOML needs an object at the top level and cannot hold null values.
  • YAML files with several documents become a list.

FAQ

Does it send my data anywhere? No. The conversion runs inside your Apify run with no network calls.

Which units are supported? Common SI, imperial and US customary units in the eight categories above. If a unit name is not recognised, the run fails with a message listing the valid names, and you are not charged for the conversion.

Can I call it from code? Yes, through the Apify API or the Apify client for JavaScript or Python, like any Apify actor.

I found a bug or need a format. Open an issue on this actor's Issues tab.


Made by Brightwater Tools. Built and tested with the help of AI coding tools; every conversion rule is covered by automated tests.