Invalid JSON:
Unexpected token '<', "<!DOCTYPE "... is not valid JSON
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta http-equiv="Content-Security-Policy" content="default-src * filesystem: data: gap: http://www.google-analytics.com http://www.googletagmanager.com http://ssl.gstatic.com http://csvjson.s3.amazonaws.com http://csvjson.s3.us-east-2.amazonaws.com 'unsafe-eval' 'unsafe-inline'; media-src *; img-src * data:"> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <link href="/img/favicon.ico" rel="shortcut icon" type="image/x-icon"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>CSV to JSON - CSVJSON</title> | |
| <meta name="description" content="Online tool for converting CSV to JSON. Convert Excel to JSON. Transpose data. Output array or hash."> | |
| <script type="text/javascript"> | |
| window.APP = { | |
| page: "csv2json", | |
| run: true, | |
| version: 0.316, | |
| id: null, | |
| data: null, | |
| data_url: null }; | |
| </script> | |
| <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js" type="text/javascript"></script> | |
| <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.7.2/font/bootstrap-icons.css"> | |
| <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet"> | |
| <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script> | |
| <link rel="stylesheet" | |
| href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.4.0/styles/default.min.css"> | |
| <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.4.0/highlight.min.js"></script> | |
| <link href="/js/3rd/jQuery-File-Upload/css/jquery.fileupload.css" rel="stylesheet" type="text/css" charset="utf-8" /> | |
| <link rel="stylesheet" href="https://use.typekit.net/dkv2ioo.css"> | |
| <link href="/css/csvjson.css?v=0.316" rel="stylesheet" type="text/css" charset="utf-8" /> | |
| <script src="/js/3rd.min.js?v=0.316" type="text/javascript"></script> | |
| <script src="/js/csvjson.min.js?v=0.316" type="text/javascript"></script> | |
| <script src="/js/app.min.js?v=0.316" type="text/javascript"></script> | |
| <script> | |
| !function(){var analytics=window.analytics=window.analytics||[];if(!analytics.initialize)if(analytics.invoked)window.console&&console.error&&console.error("Segment snippet included twice.");else{analytics.invoked=!0;analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on"];analytics.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);e.unshift(t);analytics.push(e);return analytics}};for(var t=0;t<analytics.methods.length;t++){var e=analytics.methods[t];analytics[e]=analytics.factory(e)}analytics.load=function(t,e){var n=document.createElement("script");n.type="text/javascript";n.async=!0;n.src="https://cdn.segment.com/analytics.js/v1/"+t+"/analytics.min.js";var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(n,a);analytics._loadOptions=e};analytics.SNIPPET_VERSION="4.1.0"; | |
| analytics.load("mVmXAtABgYVqPdbXw1a4Y19vcesa1cec"); | |
| analytics.page(); | |
| }}(); | |
| analytics.ready(function(){ | |
| var flatfileLinks = $('a[href*="flatfile.com"]'); | |
| flatfileLinks.each(function(){ | |
| var bareURL = $(this).attr('href') | |
| $(this).attr('href', bareURL + '&ajs_event=came_from_csvjson&ajs_prop_ccf_id=' + window.analytics.user().anonymousId()) | |
| }) | |
| analytics.trackLink(flatfileLinks, 'Clicked Flatfile Link'); | |
| }) | |
| </script> | |
| <!-- Global site tag (gtag.js) - Google Ads: 831825021 --> | |
| <script async src="https://www.googletagmanager.com/gtag/js?id=AW-831825021"></script> | |
| <script> | |
| window.dataLayer = window.dataLayer || []; | |
| function gtag(){dataLayer.push(arguments);} | |
| gtag('js', new Date()); | |
| gtag('config', 'AW-831825021'); | |
| </script> | |
| </head> | |
| <body> | |
| <header class="px-4 py-4 border-bottom bg-light"> | |
| <div class="container d-flex flex-wrap justify-content-left pt-2 pb-2"> | |
| <div class="d-flex align-items-center me-lg-auto text-decoration-none"> | |
| <a href="/" class="d-flex align-items-center me-lg-auto text-decoration-none"> | |
| <img src="img/logo_bg-light.svg" width="140"> | |
| </a> | |
| </div> | |
| <a class="btn d-none d-sm-block" href="https://flatfile.com/get-started?utm_source=csvjson&utm_medium=owned_site&utm_campaign=q1-2022-csvjson-redesign"> | |
| <img src="img/flatfile-jewel.svg" width="20" style="margin:-2px 5px 0 0px"/> | |
| <b>Turnkey CSV Importer</b> • <small>Installs in minutes</small> | |
| </a> | |
| </div> | |
| </header> | |
| <header class="px-4 border-bottom"> | |
| <div class="container d-flex flex-wrap justify-content-left pt-3 pb-1"> | |
| <div class="row"> | |
| <div class="col-md-12"> | |
| <nav aria-label="breadcrumb"> | |
| <ol class="breadcrumb"> | |
| <li class="breadcrumb-item"><a href="/">Home</a></li> | |
| <li class="breadcrumb-item active" aria-current="page"> | |
| <div class="dropdown d-flex align-items-center me-lg-auto text-decoration-none"> | |
| <a href="#" class="d-flex align-items-center me-lg-auto text-decoration-none dropdown-toggle" id="dropdownNavLink" data-bs-toggle="dropdown" aria-expanded="false"> | |
| csv2json </a> | |
| <ul class="dropdown-menu text-small shadow" aria-labelledby="dropdownNavLink" style=""> | |
| <li><a class="dropdown-item active" href="/csv2json">CSV to JSON</a></li> | |
| <li><a class="dropdown-item " href="/json2csv">JSON to CSV</a></li> | |
| <li><a class="dropdown-item " href="/sql2json">SQL to JSON</a></li> | |
| <li><a class="dropdown-item " href="/csvjson2json">CSVJSON to JSON</a></li> | |
| <li><hr class="dropdown-divider"></li> | |
| <li><a class="dropdown-item " href="/json_validator">JSON Validator</a></li> | |
| <li><a class="dropdown-item " href="/json_beautifier">JSON Beautifier</a></li> | |
| <!--<li><a class="dropdown-item" href="/datajanitor">Data Janitor</a></li>--> | |
| <li><hr class="dropdown-divider"></li> | |
| <li><a class="dropdown-item" href="https://flatfile.com/get-started?utm_source=csvjson&utm_medium=owned_site&utm_campaign=q1-2022-csvjson-redesign">Upgrade to Flatfile</a></li> | |
| </ul> | |
| </div> | |
| </li> | |
| </ol> | |
| </nav> | |
| </div> | |
| </div> | |
| </div> | |
| </header> | |
| <div class="container px-4 py-5"> | |
| <div class="row"> | |
| <div class="description col-md-12"> | |
| <h1 class="text-primary fw-bold">CSV or TSV <small class="bi bi-chevron-right"></small>JSON</h1> | |
| <p>To get started, upload or paste your data from Excel (saved as CSV or TSV). | |
| </div> | |
| </div> | |
| <div class="row gx-5"> | |
| <div class="col-md-5 mb-5"> | |
| <div class="mb-5"> | |
| <label class="form-label">Upload a CSV file</label> | |
| <input id="fileupload" type="file" name="file" class="form-control"/> | |
| </div> | |
| <div class="mb-3"> | |
| <label class="form-label">Or paste your CSV here</label> | |
| <textarea id="csv" class="form-control input save" rows="18" spellcheck="false"> | |
| album, year, US_peak_chart_post | |
| The White Stripes, 1999, - | |
| De Stijl, 2000, - | |
| White Blood Cells, 2001, 61 | |
| Elephant, 2003, 6 | |
| Get Behind Me Satan, 2005, 3 | |
| Icky Thump, 2007, 2 | |
| Under Great White Northern Lights, 2010, 11 | |
| Live in Mississippi, 2011, - | |
| Live at the Gold Dollar, 2012, - | |
| Nine Miles from the White City, 2013, - | |
| </textarea> | |
| </div> | |
| <button id="convert" type="submit" class="btn btn-primary mb-2 me-2"> | |
| <i class="bi bi-chevron-right"></i> Convert | |
| </button> | |
| <button id="clear" type="submit" class="btn btn-light mb-2 me-2"> | |
| <i class="bi bi-backspace"></i> Clear | |
| </button> | |
| </div> | |
| <div class="col-md-7 more-bottom-margin"> | |
| <div class="mb-3"> | |
| <div class="form-check-inline"> | |
| <label class="form-label me-2 save" title="Choose your separator"> | |
| <div class="mb-2">Separator</div> | |
| <select class="form-select" id="separator" name="separator"> | |
| <option value="auto" selected="selected">Auto-detect</option> | |
| <option value="comma">Comma</option> | |
| <option value="semiColon">Semi-colon</option> | |
| <option value="tab">Tab</option> | |
| </select> | |
| </label> | |
| </div> | |
| <div class="form-check-inline"> | |
| <input type="checkbox" id="parseNumbers" name="parseNumbers" class="form-check-input save" checked="checked "/> | |
| <label class="form-check-label" title="Check to parse numbers (i.e. '7e2' would become 700). Uncheck to keep original formatted numbers as strings."> | |
| Parse numbers | |
| </label> | |
| </div> | |
| <div class="form-check-inline"> | |
| <input type="checkbox" id="parseJSON" name="parseJSON" class="form-check-input save" checked="checked "/> | |
| <label class="form-check-label" title="Check to parse potential values as JSON (numbers, null, false, true, [] and {}). Uncheck to keep original values as strings."> | |
| Parse JSON | |
| </label> | |
| </div> | |
| <div class="form-check-inline"> | |
| <input type="checkbox" id="transpose" name="transpose" class="form-check-input save" /> | |
| <label class="form-check-label" title="Transpose the data beforehand."> | |
| Transpose | |
| </label> | |
| </div> | |
| <br/> | |
| <div class="form-check-inline"> | |
| <label class="form-check-label me-2">Output:</label> | |
| <input type="radio" id="output-array" name="output" class="form-check-input save" value="array" checked="checked" /> | |
| <label class="form-check-label" title="Output an array of objects."> | |
| Array | |
| </label> | |
| </div> | |
| <div class="form-check-inline"> | |
| <input type="radio" id="output-hash" name="output" class="form-check-input save" value="hash" /> | |
| <label class="form-check-label" title="Output an object instead of an array. First column is used as hash key."> | |
| Hash | |
| </label> | |
| </div> | |
| <div class="form-check-inline"> | |
| <input type="checkbox" id="minify" name="minify" class="form-check-input save" /> | |
| <label class="form-check-label" title="Minify or compact result by removing spaces and new lines."> | |
| Minify | |
| </label> | |
| </div> | |
| </div> | |
| <div class="mb-3"> | |
| <label class="form-label">JSON</label> <span class="result-note"></span> | |
| <textarea id="result" class="form-control result save" rows="18" spellcheck="false" disabled></textarea> | |
| </div> | |
| <a id="download" class="btn btn-primary mb-2 me-2" href="" download="csvjson.json" disabled="disabled" target="_self"> | |
| <i class="bi bi-cloud-download"></i> Download | |
| </a> | |
| <a href="#" class="btn btn-primary mb-2 me-2 save-permalink" title="Save a permanent link to share with a colleague."><i class="bi bi-save"></i> Save</a> | |
| <a id="copy" class="btn btn-light mb-2 me-2" href="#" title="or Ctrl + A then Ctrl + C to copy to clipboard."><i class="bi bi-share"></i> Copy to clipboard</a> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="container px-4 py-5" id="about-flatfile"> | |
| <h2 class="pb-2 border-bottom">Need help cleaning data?</h2> | |
| <div class="row row-cols-1 row-cols-sm-1 row-cols-md-12 row-cols-lg-12 g-4 py-3"> | |
| <div class="col d-flex align-items-start"> | |
| <div> | |
| <p> | |
| Embed all the functionality of csv<strong>json</strong> in any web application with <a href="https://flatfile.com/get-started?utm_source=csvjson&utm_medium=owned_site&utm_campaign=q1-2022-csvjson-redesign">Flatfile</a>. Auto-match columns, validate data fields, and provide an intuitive CSV import experience. | |
| </p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="container px-4 py-5" id="about-csvjson"> | |
| <h2 class="pb-2 border-bottom">More Details</h2> | |
| <div class="row row-cols-1 row-cols-sm-1 row-cols-md-12 row-cols-lg-12 g-4 py-3"> | |
| <div class="col d-flex align-items-start"> | |
| <div> | |
| <ul> | |
| <li> | |
| This function is available as a <a href="https://www.npmjs.com/package/csvjson-csv2json" target="_blank">npm package</a> | |
| </li> | |
| <li> | |
| CSV stands for <a href="http://en.wikipedia.org/wiki/Comma-separated_values" target="_blank">Comma Separated Values</a>. | |
| Often used as an interchange data format to represent table records, one per line. CSV is plain text. | |
| </li> | |
| <li> | |
| The CSV format is documented in an RFC memo <a href="https://tools.ietf.org/html/rfc4180" target="_blank">RFC-4180</a>. | |
| </li> | |
| <li> | |
| The first line is often the header, or column names. Each subsequent row is a record and should have the same number of fields. | |
| </li> | |
| <li> | |
| Fields containing the separator character, line breaks and double-quotes must be enclosed inside double quotes <code>"</code>. | |
| </li> | |
| <li> | |
| Other separator are often used like tabs <code>\t</code>or semi-colons <code>;</code>. | |
| TSV or Tab Separated Values is used to store table data in Clipboards. | |
| When data is copied from Excel for example, it is stored as TSV in the Clipboard. | |
| </li> | |
| <li> | |
| With CSVJSON you can parse values as numbers or JSON. Turn on respective <strong>Parse Numbers</strong> and <strong>Parse JSON</strong> switches to convert valid numbers and JSON (null, false, true, [] and {}). | |
| </li> | |
| <li> | |
| With CSVJSON you can transpose the csv before conversion. Rows become columns, and columns become rows. | |
| </li> | |
| <li> | |
| With CSVJSON you can output a hash (or object) instead of an array. In that case, the hash key will be the first column. | |
| </li> | |
| </ul> | |
| <p> | |
| <a class="btn btn-light" data-bs-toggle="collapse" href="#collapseOne" role="button" aria-expanded="false" aria-controls="collapseExample"> | |
| View Change Log | |
| </a> | |
| </p> | |
| </div> | |
| </div> | |
| <div id="collapseOne" class="accordion-collapse collapse showclass row row-cols-1 row-cols-sm-1 row-cols-md-12 row-cols-lg-12 g-4"> | |
| <div class="col d-flex align-items-start"> | |
| <div> | |
| <h5>Mar 20, 2019</h5><p> Bug fix: Detect duplicate column headers and make them unique. <a href="https://github.com/FlatFilers/csvjson-app/issues/71">GitHub issue #71</a>.</p> | |
| <h5>Feb 2, 2019</h5><p> Refactored and published <a href="https://www.npmjs.com/package/csvjson-csv2json" target="_blank">npm package csv2json</a>. Fix for <a href="https://github.com/FlatFilers/csvjson-app/issues/70">GitHub issue #70</a>.</p> | |
| <h5>Jan 26, 2019</h5><p> Improvement: Removed 64k limit on download button. Also fixed issue #68 'Cannot work functional with special letters'.</p> | |
| <h5>Mar 31, 2018</h5><p> Improvement: Added option to parse JSON values.</p> | |
| <h5>Dec 18, 2017</h5><p> Improvement: Added option to minify or compact JSON. <a href="https://github.com/FlatFilers/csvjson-app/issues/21">GitHub issue #21</a></p> | |
| <h5>Oct 7, 2016</h5><p> Improvement: Added option to parse number values or not to retain original number formatting. <a href="https://github.com/FlatFilers/csvjson-app/issues/13">GitHub issue #13</a></p> | |
| <h5>Jul 09, 2016</h5><p> Fixed bug : If no text is present in a csv field, it was assigned 0 (zero) by default.</p> | |
| <h5>Jun 20, 2016</h5><p> Bug fix: strings containing quotes and commas were prematurely cut.</p> | |
| <h5>Dec 30, 2015</h5><p> Bug fix: drop quotes on keys of nested objects.</p> | |
| <h5>Nov 26, 2015</h5><p> Improvement: Added options to transpose and output object instead of array.</p> | |
| <h5>Jan 30, 2014</h5><p> Bug fix: Pasting Excel data into Textarea would cause an upload.</p> | |
| <h5>Jan 12, 2014</h5><p> Initial release.</p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <footer class="bd-footer px-3 py-5 mt-5 bg-light"> | |
| <div class="container py-5"> | |
| <div class="row"> | |
| <div class="col-lg-3 mb-3"> | |
| <a class="d-inline-flex align-items-center mb-2 link-dark text-decoration-none" href="/" aria-label="Bootstrap"> | |
| <img src="./img/logo_bg-light.svg" width="140"> | |
| </a> | |
| <ul class="list-unstyled small text-muted"> | |
| <li class="mb-2">Rage designed and built with love by the <a href="https://flatfile.com/get-started?utm_source=csvjson&utm_medium=owned_site&utm_campaign=q1-2022-csvjson-redesign">Flatfile team</a> with the help of <a href="https://github.com/FlatFilers/csvjson-app/graphs/contributors">our contributors</a>.</li> | |
| </ul> | |
| </div> | |
| <div class="col-sm-6 col-xs-12 col-lg-3 mb-3"> | |
| <h5>Convert</h5> | |
| <ul class="list-unstyled"> | |
| <li class="mb-2"><a href="/csv2json">CSV to JSON</a></li> | |
| <li class="mb-2"><a href="/json2csv">JSON to CSV</a></li> | |
| <li class="mb-2"><a href="/sql2json">SQL to JSON</a></li> | |
| <li class="mb-2"><a href="/csvjson2json">CSVJSON to JSON</a></li> | |
| </ul> | |
| </div> | |
| <div class="col-sm-6 col-xs-12 col-lg-3 mb-3"> | |
| <h5>Validate & Transform</h5> | |
| <ul class="list-unstyled"> | |
| <li class="mb-2"><a href="/json_validator">JSON Validator</a></li> | |
| <li class="mb-2"><a href="/json_beautifier">JSON Beautifier</a></li> | |
| <!--<li class="mb-2"><a href="/datajanitor">Data Janitor</a></li>--> | |
| </ul> | |
| </div> | |
| <div class="col-xs-12 col-sm-6 col-lg-3 mb-3"> | |
| <h5>Community</h5> | |
| <ul class="list-unstyled"> | |
| <li class="mb-2"><a href="https://github.com/FlatFilers/csvjson-app/">Github</a></li> | |
| <li class="mb-2"><a href="https://github.com/FlatFilers/csvjson-app/issues?q=is%3Aissue+is%3Aclosed">Change Log</a></li> | |
| <li class="mb-2"><a href="https://github.com/FlatFilers/csvjson-app/issues/new">Issues</a></li> | |
| <li class="mb-2"><a href="https://github.com/FlatFilers/csvjson-app#readme">Docs</a></li> | |
| <li class="mb-2"><a href="https://flatfile.com/get-started?utm_source=csvjson&utm_medium=owned_site&utm_campaign=q1-2022-csvjson-redesign">Corporate sponsor</a></li> | |
| </ul> | |
| </div> | |
| </div> | |
| </div> | |
| </footer> | |
| <script type="text/javascript"> | |
| _linkedin_partner_id = "686353"; | |
| window._linkedin_data_partner_ids = window._linkedin_data_partner_ids || []; | |
| window._linkedin_data_partner_ids.push(_linkedin_partner_id); | |
| </script><script type="text/javascript"> | |
| (function(l) { | |
| if (!l){window.lintrk = function(a,b){window.lintrk.q.push([a,b])}; | |
| window.lintrk.q=[]} | |
| var s = document.getElementsByTagName("script")[0]; | |
| var b = document.createElement("script"); | |
| b.type = "text/javascript";b.async = true; | |
| b.src = "https://snap.licdn.com/li.lms-analytics/insight.min.js"; | |
| s.parentNode.insertBefore(b, s);})(window.lintrk); | |
| </script> | |
| <noscript> | |
| <img height="1" width="1" style="display:none;" alt="" src="https://px.ads.linkedin.com/collect/?pid=686353&fmt=gif" /> | |
| </noscript> | |
| </body> | |
| </html> | |