âšī¸ Skipped - page is already crawled
| Filter | Status | Condition | Details |
|---|---|---|---|
| HTTP status | PASS | download_http_code = 200 | HTTP 200 |
| Age cutoff | PASS | download_stamp > now() - 6 MONTH | 0.3 months ago |
| History drop | PASS | isNull(history_drop_reason) | No drop reason |
| Spam/ban | PASS | fh_dont_index != 1 AND ml_spam_score = 0 | ml_spam_score=0 |
| Canonical | PASS | meta_canonical IS NULL OR = '' OR = src_unparsed | Not set |
| Property | Value |
|---|---|
| URL | https://www.geeksforgeeks.org/javascript/how-to-convert-html-table-to-json-in-javascript/ |
| Last Crawled | 2026-04-09 10:49:50 (8 days ago) |
| First Indexed | 2025-06-07 01:28:10 (10 months ago) |
| HTTP Status Code | 200 |
| Meta Title | How to Convert HTML Table to JSON in JavaScript? - GeeksforGeeks |
| Meta Description | Your All-in-One Learning Portal: GeeksforGeeks is a comprehensive educational platform that empowers learners across domains-spanning computer science and programming, school education, upskilling, commerce, software tools, competitive exams, and more., Your All-in-One Learning Portal. It contains well written, well thought and well explained computer science and programming articles, quizzes and practice/competitive programming/company interview Questions. |
| Meta Canonical | null |
| Boilerpipe Text | null |
| Markdown | [](https://www.geeksforgeeks.org/)
- Courses
- Tutorials
- Interview Prep
- [JS Tutorial](https://www.geeksforgeeks.org/javascript/javascript-tutorial/)
- [Web Tutorial](https://www.geeksforgeeks.org/web-tech/web-technology/)
- [A to Z Guide](https://www.geeksforgeeks.org/javascript/javascript-complete-guide/)
- [Projects](https://www.geeksforgeeks.org/javascript/top-javascript-projects/)
- [OOP](https://www.geeksforgeeks.org/javascript/introduction-object-oriented-programming-javascript/)
- [DOM](https://www.geeksforgeeks.org/javascript/dom-document-object-model/)
- [Set](https://www.geeksforgeeks.org/javascript/javascript-set-reference/)
- [Map](https://www.geeksforgeeks.org/javascript/javascript-map-reference/)
- [Math](https://www.geeksforgeeks.org/javascript/javascript-math-reference/)
- [Number](https://www.geeksforgeeks.org/javascript/javascript-number-reference/)
- [Boolean](https://www.geeksforgeeks.org/javascript/javascript-boolean-reference/)
- [Exercise](https://www.geeksforgeeks.org/javascript/practice-javascript-online/)
# How to Convert HTML Table to JSON in JavaScript?
Last Updated : 5 Dec, 2025
HTML tables are commonly used to present structured data on websites. In many scenarios, this tabular data needs to be converted to JSON format for processing, storage, or server communication. We will discuss different approaches to converting HTML tables to JSON using JavaScript.
These are the following approaches:
Table of Content
- [Manual Traversal of Table Rows and Cells](https://www.geeksforgeeks.org/javascript/how-to-convert-html-table-to-json-in-javascript/#approach-1-manual-traversal-of-table-rows-and-cells)
- [Using a Library (jQuery)](https://www.geeksforgeeks.org/javascript/how-to-convert-html-table-to-json-in-javascript/#approach-2-using-a-library-jquery)
## Manual Traversal of Table Rows and Cells
In this way data extraction is carried out by natural scrolling through tables rows and cells with the help of JavaScript, this data is then reorganized in JSON array form to give more control in the conversion.
****Example:**** In the example below, we will convert data given in table format into JSON format by manual traversal of table rows and cells.
HTML
``
****Output:****

Output
## Using a Library (jQuery)
Be using jQuery further reduce time wasted on navigation of the table and retrieval of the data, using .each() this technique further makes it less complicated in selecting table data and converting it into a JSON array.
****Example:**** In given below example we are going to convert data given in table format into JSON format using jQuery library.
HTML
``
JavaScript
``
****Output:****

Output
Comment
Article Tags:
Article Tags:
[JavaScript](https://www.geeksforgeeks.org/category/web-technologies/javascript/)
[Web Technologies](https://www.geeksforgeeks.org/category/web-technologies/)
### Explore
[](https://www.geeksforgeeks.org/)

Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)

Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
[](https://geeksforgeeksapp.page.link/gfg-app)[](https://geeksforgeeksapp.page.link/gfg-app)
- Company
- [About Us](https://www.geeksforgeeks.org/about/)
- [Legal](https://www.geeksforgeeks.org/legal/)
- [Privacy Policy](https://www.geeksforgeeks.org/legal/privacy-policy/)
- [Contact Us](https://www.geeksforgeeks.org/about/contact-us/)
- [Advertise with us](https://www.geeksforgeeks.org/advertise-with-us/)
- [GFG Corporate Solution](https://www.geeksforgeeks.org/gfg-corporate-solution/)
- [Campus Training Program](https://www.geeksforgeeks.org/campus-training-program/)
- Explore
- [POTD](https://www.geeksforgeeks.org/problem-of-the-day)
- [Job-A-Thon](https://practice.geeksforgeeks.org/events/rec/job-a-thon/)
- [Blogs](https://www.geeksforgeeks.org/category/blogs/?type=recent)
- [Nation Skill Up](https://www.geeksforgeeks.org/nation-skill-up/)
- Tutorials
- [Programming Languages](https://www.geeksforgeeks.org/computer-science-fundamentals/programming-language-tutorials/)
- [DSA](https://www.geeksforgeeks.org/dsa/dsa-tutorial-learn-data-structures-and-algorithms/)
- [Web Technology](https://www.geeksforgeeks.org/web-tech/web-technology/)
- [AI, ML & Data Science](https://www.geeksforgeeks.org/machine-learning/ai-ml-and-data-science-tutorial-learn-ai-ml-and-data-science/)
- [DevOps](https://www.geeksforgeeks.org/devops/devops-tutorial/)
- [CS Core Subjects](https://www.geeksforgeeks.org/gate/gate-exam-tutorial/)
- [Interview Preparation](https://www.geeksforgeeks.org/aptitude/interview-corner/)
- [Software and Tools](https://www.geeksforgeeks.org/websites-apps/software-and-tools-a-to-z-list/)
- Courses
- [ML and Data Science](https://www.geeksforgeeks.org/courses/category/machine-learning-data-science)
- [DSA and Placements](https://www.geeksforgeeks.org/courses/category/dsa-placements)
- [Web Development](https://www.geeksforgeeks.org/courses/category/development-testing)
- [Programming Languages](https://www.geeksforgeeks.org/courses/category/programming-languages)
- [DevOps & Cloud](https://www.geeksforgeeks.org/courses/category/cloud-devops)
- [GATE](https://www.geeksforgeeks.org/courses/category/gate)
- [Trending Technologies](https://www.geeksforgeeks.org/courses/category/trending-technologies/)
- Videos
- [DSA](https://www.geeksforgeeks.org/videos/category/sde-sheet/)
- [Python](https://www.geeksforgeeks.org/videos/category/python/)
- [Java](https://www.geeksforgeeks.org/videos/category/java-w6y5f4/)
- [C++](https://www.geeksforgeeks.org/videos/category/c/)
- [Web Development](https://www.geeksforgeeks.org/videos/category/web-development/)
- [Data Science](https://www.geeksforgeeks.org/videos/category/data-science/)
- [CS Subjects](https://www.geeksforgeeks.org/videos/category/cs-subjects/)
- Preparation Corner
- [Interview Corner](https://www.geeksforgeeks.org/interview-prep/interview-corner/)
- [Aptitude](https://www.geeksforgeeks.org/aptitude/aptitude-questions-and-answers/)
- [Puzzles](https://www.geeksforgeeks.org/aptitude/puzzles/)
- [GfG 160](https://www.geeksforgeeks.org/courses/gfg-160-series)
- [System Design](https://www.geeksforgeeks.org/system-design/system-design-tutorial/)
[@GeeksforGeeks, Sanchhaya Education Private Limited](https://www.geeksforgeeks.org/), [All rights reserved](https://www.geeksforgeeks.org/copyright-information/) |
| Readable Markdown | null |
| Shard | 103 (laksa) |
| Root Hash | 12046344915360636903 |
| Unparsed URL | org,geeksforgeeks!www,/javascript/how-to-convert-html-table-to-json-in-javascript/ s443 |