CSV to JSON converter
Paste CSV text or open a file and get JSON: a list of objects named after the heading. It finds the separator for you, reads fields that hold quotes, commas and line breaks, and does not spoil numbers with a leading 0 (like a postcode 01234). It runs in your browser and your file is not sent anywhere.
This tool needs JavaScript. If you still see this after a few seconds, JavaScript is switched off in your browser or the page did not load completely: turn JavaScript on or reload the page.
How to use it
- Paste CSV text in the left box, or press "Open file" and choose a .csv file.
- The separator is found for you (choose it yourself if it is wrong). Tick whether the first row is the heading.
- Press "Copy", or "Download" a .json file.
Frequently asked questions
Is Thai text from an Excel CSV file read correctly?
A file saved as "CSV UTF-8" reads Thai correctly, and the tool drops the BOM at the start. If you saved a plain CSV from an older Excel on Windows, the file may use the computer's legacy encoding (Windows-874), which a browser does not read as UTF-8. Save it again as "CSV UTF-8".
Why is the postcode 01234 still text?
A number that starts with 0, or has more than 15 digits (a card or account number), would lose its leading zero or its last digits as a number, so it is kept as text. To make every field text, untick "Turn numbers and true/false into their own types".
What about missing fields and repeated headings?
A row shorter than the heading gets null for the missing fields. An empty heading is named column_N, and a repeated heading gets _2, _3. The tool tells you when it does this.
Good to know
- If you untick "The first row is the heading" you get a list of lists (arrays inside an array).
- Blank lines are skipped.
- Files up to 20 MB open, but the conversion runs on the page itself, so a file of tens of megabytes can slow the page for a moment.
Your data stays on your device
Everything runs in your browser. What you type, paste or open is not sent to freesabai's servers or anyone else's, and is not kept in the browser: close the page and it is gone. The site only counts how many times this page was opened and how many times someone copied or saved a result (never what was pasted or the result, and you can switch the counting off in the footer; see the privacy policy).
Report a problem or suggest an idea
Found a bug, or want this tool to do more? Tell us on the feedback page. No sign-up.
Other developer tools
JSON and data
- JSON formatter and validatorFormat, minify and validate JSON, find the error, fold it into levels
- JSON to YAML converterTurn JSON into YAML, key order kept, nothing leaves your device
- YAML to JSON converterTurn YAML into JSON, and find the line where the YAML is wrong
- JSON to CSV converterTurn a JSON list into CSV for Excel, Thai text included
- CSV to JSON converterTurn CSV into JSON, any separator, quoted fields handled
- CSV viewerOpen a CSV file as a table, sort a column, search, no spreadsheet needed
- Text and JSON diff checkerSee what changed between two texts, side by side or unified, with word highlights
Encoding, hashes and tokens
- Base64 encode and decodeBase64 for text (Thai and UTF-8), URL-safe, and files to and from Base64
- Hash generator: MD5, SHA-256, HMACHash text or files with MD5, SHA-1, SHA-256, SHA-512 and HMAC, and verify a checksum
- JWT decoderRead the header and payload of a JWT, with times you can read (decode only, no signature check)
- URL encode and decodePercent-encode or decode a link, Thai in URLs included, and take a URL apart
- HTML entities encode and decodeTurn special characters into & < > " and back
Generators
Time, numbers and colour
- Unix timestamp converterConvert a timestamp (seconds or milliseconds) to a date and back, with time zones
- Cron expression explainerRead a cron expression in plain words and see its next 5 runs
- Number base converterConvert between binary, octal, decimal and hex, and do bitwise AND, OR, XOR and shifts
- Colour converter: HEX, RGB, HSLConvert a colour between HEX, RGB and HSL, or pick one by eye
- Colour contrast checker (WCAG)Check the contrast between text and background colours for WCAG AA and AAA
Text and code
- Regex testerTry a regular expression, see matches and groups, protected from regexes that never finish
- Markdown previewType Markdown and see it rendered at once, safely, with embedded scripts never run
- Character, word and line counterCount characters, words (Thai too), lines, sentences, paragraphs and reading time