What to do next
- Paste your data on the left (or drop a file on it). The format is detected automatically. If it gets it wrong, choose the right one under "Read as".
- Choose the format you want under "Write as" on the right. For smaller JSON, set the indent to "Minify to one line".
- If a red "Where the mistake is" box appears, press "Go to it" and fix the spot. The result updates as you type.
- Press "Copy" or "Save as a file". Ctrl+Enter (⌘+Enter on a Mac) copies too. To open a CSV in Excel, use "Save CSV for Excel".
What you can convert
| Read | Write | Good for |
|---|---|---|
| JSON | JSON | Formatting (indenting), minifying (one line), sorting keys, switching between \uXXXX and the characters themselves |
| JSON, YAML | CSV | Looking at API responses or settings in a spreadsheet |
| CSV | JSON, YAML | Using a spreadsheet table in a program or a config file |
| JSON | YAML | Rewriting a config file as YAML |
| YAML | JSON | Checking what values a YAML config is actually read as |
| YAML | YAML | Tidying the indentation (comments are kept) |
| JSON Lines | JSON, CSV | Turning logs with one record per line into an array or a table |
JSON Lines is a format with one JSON value per line. When several lines of JSON starting with { or [ follow one another, the tool reads them as JSON Lines automatically.
JSON mistakes, and how they're read
JSON is a strict format. It has no comments. You can't put a , after the last item. Text goes in " quotes. true, false and null are written in lowercase. Copy settings from a program's config file or data from another language, and this is where you get caught out.
This tool fixes mistakes whose meaning is clear as it reads them. Everything it fixed is listed with its line number, and the result is valid JSON.
| Written as | What breaks the rules | How this tool reads it |
|---|---|---|
{"a": 1, "b": 2,} | A , after the last item | Drops the , |
{"a": 1 // note
} | Comments (// and /* */) | Drops the comments |
{'a': 'b'} | Text in ' quotes | Puts it in " quotes |
{a: 1} | A key without " quotes | Adds the " quotes |
{"a": True, "b": None} | True, False and None (as written in Python) | Turns them into true, false and null |
{"a": undefined, "b": NaN} | undefined, NaN and Infinity | Turns them into null |
[1 2 3] | Missing , between items | Adds the , |
[+1, 012, .5, 0x1F] | A leading + or 0, a number starting with a decimal point, hexadecimal | Turns them into 1, 12, 0.5 and 31 |
{"a":1,"b":2} | Full-width colons, commas, braces and brackets, or full-width spaces (common with Japanese input) | Reads them as the normal symbols |
{“a”: “b”} | Curly quotes (“ ”) | Reads them as " |
"C:\Users" | A backslash JSON doesn't allow (like \U) | Reads the \ as a plain backslash |
To check without fixing anything, tick "Read JSON strictly". It stops at the first mistake and shows where it is. Use it to check that JSON you're handing to another program follows the rules.
Mistakes it can't fix
With mistakes like an unclosed bracket or a missing value, there's no telling what the right fix is. In those cases, the tool stops and shows where and why.
| Written as | What it says |
|---|---|
{"a": [1, 2} | A [ is closed with } |
{"a": 1 | A { is never closed |
{"a": "abc} | A piece of text is never closed |
{"a": } | There is a } where a value should be |
{"a" 1} | There is no : after the key |
{"a": hello} | hello can't be read as a value |
{"day": 2026-11-28} | 2026-11-28 can't be read as a number |
In JSON, dates and times are written as text ("2026-11-28"). Leave out the " and the tool tries to read them as numbers, and stops.
When the same key appears twice
The JSON rules say the keys inside one { } should be unique. Repeated keys still parse, but what happens then depends on the tool reading them. This tool uses the later value and tells you the key is repeated.
Numbers stay exactly as written
This tool doesn't recalculate numbers. 1.10 stays 1.10, and 1e5 stays 1e5.
This matters most for long integers. The largest integer JavaScript can handle exactly is 9007199254740991 (2 to the power of 53, minus 1). Read a bigger ID the usual way, and it quietly becomes a different number: 12345678901234567890, for example, becomes 12345678901234567000. This tool keeps numbers as written, so they don't change.
The program that receives the converted JSON can still run into the same problem, though. It's safest to put long ID numbers in " quotes as text from the start.
How CSV is read
- Separator: commas, tabs, semicolons and pipes are detected automatically. Cells copied from Excel or Google Sheets paste as tab-separated text, and that reads as it is.
- Fields in " quotes: a field that contains a comma or a line break is put in
"quotes, and a"inside a field is doubled as"". The tool reads this way, and when it writes, it quotes only the fields that need it. - Headings: with the first row as headings, you get an array of "heading: value" objects. Untick it to get an array per row.
- Types: fields that look like numbers become numbers, and
trueandfalsebecome true/false values. Numbers that start with 0 (090…,012) and numbers with 16 or more digits stay as text, so phone numbers, postcodes and member numbers don't turn into numbers and lose their leading 0. - Character encoding: drop in a file, and it's read as UTF-8, Shift_JIS, EUC-JP or UTF-16, whichever it is. CSV saved from Japanese Excel (Shift_JIS) reads as it is too.
CSV for Excel
Open a UTF-8 CSV in Excel as it is, and characters outside English can come out garbled. A UTF-8 file with a marker called a BOM at the start opens normally. "Save CSV for Excel" adds the BOM and ends lines with CRLF.
Excel reads anything that looks like a number as a number. Leading zeros disappear, and digits after the 15th become 0 (Excel keeps 15 significant digits). If you have a column of phone numbers or long ID numbers, don't open the file directly. On Excel's Data tab, choose From Text/CSV, press Edit, select the column and set Home > Transform > Data Type to Text.
Shapes that can become a table, and ones that can't
CSV is just rows and columns. JSON or YAML can become CSV when it has one of these shapes.
| Original shape | As CSV |
|---|---|
| An array of { } objects | The keys become the headings, and each { } becomes a row. Every key is collected, in the order it first appears |
| An array of [ ] arrays | Each [ ] becomes a row (no headings) |
| An array of plain values | A one-column table |
| A single { } | Headings and a single row |
| An array that mixes { } with other values | Can't become a table |
Nested { } objects are spread into columns with the keys joined by dots, like "a.b". Nested arrays go into a single cell as one line of JSON. Press "Table" at the top right to see what the table will look like before you save.
Things to watch in YAML
yes, no, on and off depend on the tool reading them
YAML has two versions, 1.1 and 1.2, and they read unquoted words differently.
| Written value | YAML 1.1 | YAML 1.2 |
|---|---|---|
yes, no, on, off, y, n | True/false values | Text |
true, false | True/false values | True/false values |
012 | Read as octal: the number 10 | The number 12 |
For example, the country code NO (Norway) written without quotes becomes false in tools that follow the 1.1 rules. Which rules a tool follows varies from tool to tool. The documentation for Python's PyYAML shows on and off being read as True and False.
- Reading: this tool reads YAML by the 1.2 rules. Convert your YAML to JSON to see what values it has under 1.2.
- Writing: text such as
no,on,012,1:30and2026-11-28is written in"quotes, so it stays the same text under either set of rules.
Other things
- Indent with spaces. YAML indentation can't use tabs.
- Comments: tidying YAML into YAML keeps the comments. JSON and CSV have nowhere to put comments, so they're lost when you convert.
- A space before #: to put a comment after a value, you need a space before the
#. - Aliases (& and *) and merge keys (<<): they're expanded when read, so converting to another format gives the expanded values.
- Several documents separated by ---: they're read into a single array.
- Old browsers: reading and writing YAML uses a separate part that's loaded only when needed. It may not work in old browsers. If so, a notice appears on screen (JSON and CSV still work).
Tips
- Turning escapes like \u00e9 back into readable characters: paste the JSON and convert it to JSON.
\uXXXXescapes come out as the characters themselves. To do the opposite, tick "Write non-ASCII characters as \uXXXX". - Turning a Python dict or a JavaScript object into JSON: paste something like
{'name': 'x', 'ok': True, 'memo': None}, and the tool changes'to"andTrueandNonetotrueandnull, giving you JSON. It can't read round brackets (tuples) or function calls. - Comparing two JSON files: format both with "Sort keys alphabetically" ticked. Differences in key order disappear and only differences in content remain. Then compare them with the Text Diff and Character Counter.
- Going from CSV to JSON to YAML: press "Use the result as input" to put the result in the box on the left.
- A one-column CSV isn't read as CSV: with no separator, it can't be detected. Choose CSV under "Read as".
- Large data: up to 5 million characters can be read. The screen shows only the first 300,000 characters and the first 200 rows of the table. Copying and saving include everything.
FAQ
- Is the data I paste sent anywhere?
- No. Reading and converting both happen only in the browser you have this page open in, and nothing is saved in your browser either. This site is set up so that its pages can't send anything out.
- Does formatting change how numbers are written, or the order of keys?
- No. Numbers come out exactly as written, and keys stay in their original order (they're sorted only if you tick "Sort keys alphabetically").
- Can it read JSON with comments (JSONC) or JSON5?
- It reads comments, trailing commas, text in ' quotes and keys without quotes. What comes out is valid JSON with no comments. Not every JSON5 feature is supported.
- It says "Where it breaks the JSON rules". Can I still use the result?
- Yes. The result is the fixed, valid JSON. The original data still breaks the rules, though, so if you can fix whatever produces it, use the list to do so.
- How deep can the nesting go?
- Up to 1,000 levels.
- Can it convert to XML or TOML?
- No. This page handles only JSON, CSV and YAML (and JSON Lines).
Sources
- RFC 8259, "The JavaScript Object Notation (JSON) Data Interchange Format" (white space characters, quoting and escaping text, how numbers are written, lowercase true, false and null, unique keys, the range of integers that travel exactly, the BOM)
- RFC 4180, "Common Format and MIME Type for Comma-Separated Values (CSV) Files" (fields in " quotes, writing "", line endings, the heading row)
- YAML Ain’t Markup Language (YAML™) version 1.2.2 (the 10.3 Core Schema rules for true/false and numbers, no tabs in indentation, the space before comments, unique keys)
- Boolean Language-Independent Type for YAML™ Version 1.1 (the words that become true/false values in YAML 1.1)
- JSON Lines (one JSON value per line, UTF-8, line endings)
- MDN, "Number.MAX_SAFE_INTEGER" (the largest integer JavaScript handles exactly)
- Integer Language-Independent Type for YAML™ Version 1.1 (YAML 1.1 reads numbers that start with 0 as octal)
- PyYAML Documentation (an example of on and off read as True and False)
- Microsoft Support, "Opening CSV UTF-8 files correctly in Excel" (a UTF-8 CSV with a BOM opens normally in Excel)
- Microsoft Support, "Keeping leading zeros and large numbers" (Excel removes leading zeros and keeps 15 digits, and how to import a column as text)
All checked on November 28, 2026. YAML is read and written with "yaml", a published open-source package (version 2.9.1, ISC license).