Data format toolbox
Convert and validate JSON, YAML and CSV with error line numbers, test regular expressions with highlighting, encode and decode URL, Base64 and HTML entities, convert Unix timestamps, and compare two texts.
Everything runs in this page; nothing you paste is sent anywhere. Do not paste secrets into any tool you do not trust, including prompts you copy out of this one.
JSON, YAML and CSV converter and validator
Limits of the YAML converter
This is a small converter written for this page, not a full YAML parser. Supported: nested maps and lists by indentation (spaces only), "key: value", "- item", comments, quoted strings ("..." with JSON escapes, '...'), inline [a, b] and {a: b} lists and maps, block text with | and > (clip and strip), null, true/false and numbers. Not supported: anchors and aliases (&, *), tags (!), multiple documents, complex keys (? ), multi-line plain or quoted scalars, merge keys, the "keep" (+) block chomping, and YAML 1.1 words such as yes/no/on/off as booleans (they stay text). Numbers with leading zeros and dates stay text. Errors name the line. When in doubt, check the result by eye.
Regex tester
| # | Match | Position | Groups |
|---|
JavaScript regex flavour only (other languages differ in small ways). A badly written pattern can make the tab freeze on long text (catastrophic backtracking); at most 500 matches are listed.
URL, Base64 and HTML entities
URL encoding is encodeURIComponent (for one query value, not a whole URL). Base64 works on the UTF-8 bytes of your text. HTML decoding knows numeric references and about 40 common named ones; others are left unchanged.
Unix timestamp and date
Values of 100000000000 or more are read as milliseconds (that is year 5138 in seconds, or March 1973 in ms). A date without a time zone is read in your computer's local zone; a date-only value such as 2023-11-14 is read as UTC.
Compare two texts
Line-by-line comparison (longest common subsequence); up to about 2000 lines per side. Removed lines start with -, added with +.
Ruggi.Site