Skip to content

mococouo/2json

2json

A dependency-free browser tool for converting CSV files into JSON. The app runs as static files, so it can be hosted on GitHub Pages, any static server, or opened locally.

Built with AI coding models. Designed from real workflow problems.

Features

  • English is the default interface language.
  • Built-in UI translations for 25 major languages, including RTL languages such as Arabic, Persian, and Urdu.
  • Unicode CSV content support plus common file encodings: UTF-8, UTF-16, GB18030, Big5, Shift_JIS, EUC-KR, Windows-1252, and ISO-8859-1.
  • Automatic delimiter detection for comma, semicolon, tab, and pipe-separated files.
  • Output as objects from the header row or arrays of rows.
  • Optional trimming, empty-cell-to-null conversion, pretty JSON, compact JSON, copy, and download.
  • No build step and no runtime dependencies.

Download

Download source archives from GitHub Releases, or open index.html directly in your browser.

Use Locally

Open index.html in a browser.

The legacy csv2json.html file redirects to index.html for compatibility with older links.

Development

There are no runtime dependencies. Node.js is only used for repository checks.

npm run check

Publish With GitHub Pages

  1. Push this folder to a GitHub repository.
  2. In the repository settings, enable GitHub Pages.
  3. Select the repository root as the Pages source.
  4. Open the generated Pages URL.

Project Structure

.
├── index.html       # Main app shell
├── styles.css       # Responsive UI styles
├── script.js        # CSV parser, JSON conversion, and i18n
├── csv2json.html    # Backward-compatible redirect
├── tools/           # Repository validation scripts
├── .github/         # CI, issue templates, and PR template
├── CHANGELOG.md
├── README.md
├── CONTRIBUTING.md
├── CODE_OF_CONDUCT.md
├── SECURITY.md
├── LICENSE
└── package.json

Browser Support

The app targets modern browsers with TextDecoder, File, Blob, and standard DOM APIs.

License

MIT

About

Convert CSV files to JSON locally in your browser, with multilingual UI and encoding support.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors