Skip to content

CSV → JSON

Runs in your browser

Quoted fields, embedded commas, and newlines inside cells all handled.

CSV

JSON

What happens to nested data

CSV is flat and JSON isn't, so something has to give. Nested objects become dotted column names — address.city — and arrays become indexed ones, tags.0 and tags.1. Rows that don't share every key get null in the columns they're missing, the same as an explicit null, so they convert back to null too. Going the other way, anything that looks like a number or a boolean is converted, but only when the text survives the round trip — so a zip code of 007 or an ID longer than a double can hold stays a string instead of quietly changing.

Questions

My spreadsheet opens it as one long column.
That's usually a delimiter mismatch — Excel in a lot of European locales expects semicolons, not commas. Switch the delimiter above and re-copy, or use Data → From Text/CSV and pick the separator there.
Why did my leading zeros survive here but not in Excel?
Because this only converts a cell when the text round-trips exactly, so 007 stays the string "007". Excel is far more eager and will happily turn it into 7 on import — that's a spreadsheet behaviour, not something the CSV itself is doing.
Can it handle commas and line breaks inside a value?
Yes, in both directions. Values containing a delimiter, a quote, or a newline get wrapped in quotes with any inner quotes doubled, per RFC 4180 — and the parser understands the same rules coming back, including newlines inside a quoted cell.

Keyboard shortcuts

Global

  • Show this shortcuts dialogShift?
  • Toggle light / dark themeCtrlShiftL
  • Close dialogsEsc

Formatter & Validator

  • Format JSONCtrlEnter
  • Minify JSONCtrlShiftM
  • Copy outputCtrlShiftC
  • Download output as .jsonCtrlShiftS
  • Clear input and outputCtrlShiftX

Tree Viewer

  • Focus the search box/
  • Expand all nodesCtrlShiftE
  • Collapse all nodesCtrlShiftR

Diff

  • Swap document A and BCtrlShiftS

JSON tools

JSON FormatterPretty-print or minify
JSON ValidatorCheck strict JSON validity
JSON Tree ViewerBrowse JSON as a tree
JSON DiffCompare two documents
JSON Path FinderExplore JSONPath expressions
JSON → CSVFlatten JSON into rows
CSV → JSONTurn rows back into objects

JWT tools

JWT DecoderRead header, payload, claims
JWT VerifierCheck an HMAC signature
JWT Expiry Checkeriat, nbf and exp in local time
JWT GeneratorBuild a signed test token
Base64URL EncoderEncode or decode a segment

Code formatters

SQL FormatterBeautify or minify SQL
HTML FormatterBeautify or minify HTML
CSS FormatterBeautify or minify CSS
JavaScript FormatterBeautify or minify JS
Markdown to HTMLConvert with a live preview

Pages

JSON toolsFormat, validate, compare and convert JSON.
JWT toolsDecode, verify and generate JSON Web Tokens.
Code formattersBeautify and minify SQL, HTML, CSS and JavaScript.
HomePopular tools and categories
All categoriesBrowse tools by category
AboutWhat ToolJar is and why
PrivacyWhat is and is not collected

Theme

Switch to light theme
Switch to dark theme