Conversion is a data-model problem
Formats that look similar do not preserve the same information. JSON has objects, arrays, numbers, strings, booleans, and null. CSV has rows and fields but no universal types. YAML can express comments, anchors, tags, and presentation details. Markdown describes prose structure; HTML describes a document tree. Base64 is an encoding, not encryption. URL encoding applies differently to path, query, and fragment components.
The safe question is what meaning exists in the source that the target cannot represent.
Use a five-step preflight
Do not rely on auto-detection when punctuation overlaps.
An API, spreadsheet, website, and human export need different output.
Types, comments, formulas, ordering, and encoding may not survive.
Include edge cases before processing the full dataset.
Validate with the system that will consume the result.
JSON: strict structure and real types
JSON requires double-quoted keys and strings, does not allow comments or trailing commas, and cannot represent NaN or Infinity. Common failure points include large integers rounded by consumers, dates reduced to strings, duplicate keys overwritten, and unescaped control characters. After formatting or conversion, parse the output again rather than checking appearance.
CSV: context hidden inside a simple file
| Value | Failure | Safe handling |
|---|---|---|
| Comma in text | Extra column | Quote the field |
| Quote in text | Premature close | Double the quote |
| Leading zero | Identifier becomes a number | Import as text |
| Long integer | Precision loss | Keep as text |
| Formula-like prefix | Spreadsheet execution | Sanitize untrusted exports |
Real systems also use tabs, semicolons, different encodings, and application-specific import rules. Parse genuine CSV instead of splitting on commas.
JSON and YAML are not perfectly reversible
JSON-to-YAML is usually straightforward. YAML-to-JSON may discard comments, anchors, aliases, explicit tags, and scalar style. Quote identifiers, version numbers, dates, and ambiguous values when their string identity matters. Test with the actual parser used by the destination.
Markdown and HTML conversions are lossy
Arbitrary HTML can contain layout, forms, scripts, attributes, embedded media, and custom components that Markdown cannot express. HTML-to-Markdown should preserve semantic content, not the full page. Markdown-to-HTML is more predictable within the renderer’s supported syntax. Sanitize generated HTML before publishing untrusted input.
Base64 encodes bytes; it does not protect them
Base64 makes binary data representable as text and increases size. Anyone can decode it. Text must be converted to bytes—usually UTF-8—and decoded with the same character encoding.
Do not use it to hide secrets, credentials, personal information, or executable content.
URL encoding is component-specific
Encoding a complete URL as though it were a query value can corrupt separators. Encode values before inserting them into query parameters, avoid double encoding, use a standards-aware URL parser, and never assume decoded user input is safe HTML or a safe redirect.
Use Jivaro’s converter
- Open Text & Data Format Converter.
- Select source and target explicitly when detection is ambiguous.
- Paste a representative sample.
- Choose JSON pretty/minify, JSON↔YAML, Markdown↔HTML, HTML→text/BBCode, CSV→JSON, URL encode/decode, or Base64 encode/decode.
- Inspect errors and preview.
- Validate in the destination parser.
- Compare key counts, row counts, types, and edge values.
Verification checklist
Use a real parser or importer.
Compare keys, rows, and nesting.
Check IDs, dates, booleans, nulls, and large numbers.
Test names, symbols, and line endings.
Sanitize HTML and spreadsheet-bound data.
Convert back when the formats permit it.
Round-trip examples reveal hidden loss
Convert a YAML configuration to JSON and back: comments and anchors may disappear even when values return. Convert CSV to JSON and back: column order, quoted empty strings, and numeric-looking identifiers may change. Convert Markdown to HTML and back: raw attributes, custom blocks, and exact whitespace may be lost. These are not converter defects when the target format has no equivalent representation.
Create a small “golden” sample containing empty values, Unicode, delimiters, long integers, nested data, and leading zeros. Store the expected parsed result and use it whenever the workflow or converter changes.
Security checks for generated output
Structured text can become executable when imported. HTML can run active content, spreadsheet cells can trigger formulas, URLs can redirect users, and decoded Base64 can contain files or scripts. Treat conversion as representation change—not validation or sanitization. Apply the destination’s security controls after conversion and before publication or execution.
Frequently asked questions
JSON is aligned with YAML 1.2, but comments, anchors, tags, scalar styles, and parser behavior can make conversion lossy.
The importer likely interpreted identifiers as numbers. Import that column as text or use a typed format.
No. It only changes the representation of bytes.
Parse it in the destination system, compare structure and types, test Unicode and edge values, and round-trip when possible.
Related Jivaro apps
Format and convert JSON, YAML, XML, CSV, TSV, NDJSON, Markdown, HTML, BBCode, URLs, Base64, and plain text directly in your browser.
Open appSources and references
- The JSON Data Interchange Format (RFC 8259)RFC Editor · reference
- Common Format and MIME Type for CSV Files (RFC 4180)RFC Editor · reference
- YAML 1.2.2 SpecificationYAML Language Development Team · reference
- Base-N Encodings (RFC 4648)RFC Editor · reference
- URL StandardWHATWG · reference
- CommonMark SpecificationCommonMark · reference
- Text & Data Format ConverterJivaro · first-party

