Converters Tools

Transform data between different formats. Convert JSON, XML, YAML, colors, timestamps, and more with ease.

Data rarely arrives in the format your system needs. These converters translate between JSON, CSV, XML, YAML, SQL, Base64, timestamps, number bases, and text cases - with the privacy benefit of doing it all client-side.

17 tools available

A conversion decides what survives before it decides what the output looks like

Converters look mechanical and are not. Each pair of formats carries a defined set of facts, and a conversion that ignores the difference produces a file that opens without error and is quietly wrong.

CSV escapes three characters, and a space is data

RFC 4180 is a short grammar, and the rules that matter are about quoting: "Fields containing line breaks (CRLF), double quotes, and commas should be enclosed in double-quotes", and "If double-quotes are used to enclose fields, then a double-quote appearing inside a field must be escaped by preceding it with another double quote." It also removes an assumption most parsers make: "Spaces are considered part of a field and should not be ignored." A JSON to CSV conversion is a modelling decision layered on that grammar - a nested object has to be flattened, and a null and an empty string both arrive as empty cells unless you encode the difference.

A timestamp needs an offset to be a timestamp

RFC 3339 defines the wire form as "date-time = full-date "T" full-time", where the time carries a numeric offset or Z, and notes that "the "T" and "Z" characters in this syntax may alternatively be lower case "t" or "z" respectively." An epoch number is another representation of the same instant, and converting to it discards the offset. If a test asserts on a formatted timestamp, assert the offset too - two servers in different zones will otherwise pass and fail the same case at different times of day.

Base64 padding is part of the value, not decoration

RFC 4648 makes the requirement explicit: "Implementations MUST include appropriate pad characters at the end of encoded data unless the specification referring to this document explicitly states otherwise." Some decoders tolerate a stripped pad and some do not, which is why a base64 round-trip can pass in one runtime and fail in another. Hex is the exception: the same RFC's Base 16 encoding has no padding step at all, which is one reason it doubles the payload with nothing to get wrong.

JSON and YAML describe the same data, not the same document

JSON permits reformatting in a bounded way: "Insignificant whitespace is allowed before or after any of the six structural characters", where whitespace means space, tab, line feed and carriage return and nothing else. YAML's whitespace is structural, and its specification names the trap itself - it "insists the " : " mapping value indicator be separated from the value by white space", because otherwise a value such as a:1 "is a plain scalar and not a key/value pair". Converting JSON to YAML preserves the data model; converting back drops comments and anchors, which have no JSON equivalent.

ConversionWhat survivesWhat is lost or changedSource
JSON to CSVfield values and row ordernesting is flattened; null and empty string collapse into one empty cellRFC 4180
CSV to JSONevery cell, quoted or notnumbers, booleans and nulls arrive as textRFC 4180
Timestamp to epochthe instantthe original offset, and the readability of the valueRFC 3339
Text to base64every byte of the inputthe pad characters, if the encoder omits themRFC 4648
JSON to YAMLvalues, keys and structurenothing in the data model, but comments and anchors do not exist in JSONRFC 8259
YAML to JSONvalues and keyscomments, anchors, aliases and multi-document streamsYAML 1.2.2

Run the pair you actually need: JSON to CSV, JSON to YAML, JSON to XML, Timestamp Converter, Base64 Encoder, Number Base Converter and Text Case Converter, then check the output against the table before it reaches a fixture.

Sources: RFC 4180, Common Format and MIME Type for CSV Files; RFC 3339, Date and Time on the Internet: Timestamps; RFC 4648, The Base16, Base32, and Base64 Data Encodings; RFC 8259, The JavaScript Object Notation Data Interchange Format; YAML 1.2.2 specification.