CSV ל-JSON
המר נתוני CSV למערך אובייקטי JSON מיידית בדפדפן.
CSV is the lowest common denominator for data exchange — every tool exports it — but most modern application code expects JSON. Converting a CSV export to a JSON array unlocks it for use in JavaScript front-ends, Node.js scripts, REST API mock data, and NoSQL databases that store documents rather than rows.
This converter reads a CSV with a header row, maps each subsequent row to a JSON object keyed by the header values, and outputs a clean JSON array. It is the fastest way to turn a spreadsheet export into seed data for a database, a fixture for a test suite, or a payload for a bulk API import — without writing a throwaway script.
איך להמיר CSV ל-JSON אונליין
- 1
הדבק את ה-CSV
הדבק טקסט CSV בקלט. הכלי מזהה אוטומטית את המפריד (פסיק, נקודה-פסיק, טאב, או קו אנכי).
- 2
מיפוי כותרות למפתחות
השורה הראשונה הופכת למפתחות אובייקטי JSON כברירת מחדל. החלף את 'ללא שורת כותרת' ליצירת מפתחות מספריים במקום.
- 3
העתק פלט JSON
העתק את פלט ה-JSON המעוצב או השתמש בכפתור ההחלפה לפתיחת התוצאה ב-JSON Viewer.
How CSV-to-JSON Conversion Works
The parser reads the first row as column names and then maps each subsequent row positionally. Extra columns beyond the header are discarded; missing columns at the end of a short row produce null values rather than throwing an error. The challenge lies in type inference: should `"42"` become the number `42` or the string `"42"`? This converter performs conservative type coercion — plain integers and floats become JSON numbers, `"true"` and `"false"` become booleans, and everything else stays a string.
Quoted fields are unescaped per RFC 4180, including doubled double-quotes and embedded newlines. The output array is pretty-printed by default so it is immediately readable and diffable in version control, with an option to compact it for smaller file size when the result is destined for an API payload.
למה להשתמש בממיר CSV ל-JSON של FileCrank?
- ✓ זיהוי אוטומטי של מפריד עם אפשרות עקיפה ידנית.
- ✓ השורה הראשונה הופכת אוטומטית למפתחות JSON.
- ✓ פלט מעוצב מוכן להדבקה בקוד.
- ✓ פועל לחלוטין בדפדפן — שום נתון לא נשלח לשרת.
תכונות ומפרטים
שאלות נפוצות
האם השורה הראשונה של ה-CSV הופכת למפתחות JSON?
כן. כברירת מחדל השורה הראשונה מטופלת כשורת כותרת והופכת לשמות המפתחות בכל אובייקט JSON. אם ל-CSV אין שורת כותרת, החלף את האפשרות 'ללא שורת כותרת' והכלי ייצור מפתחות מספריים (col_0, col_1, וכו').
מה קורה אם לשורות ב-CSV יש מספרי עמודות שונים?
שורות עם פחות עמודות מהכותרת יקבלו ערכי null למפתחות החסרים. שורות עם יותר עמודות מהכותרת יתעלמו מהערכים העודפים עם אזהרה.
איך מטפלים ב-CSV שמשתמש בנקודה-פסיק במקום בפסיק?
הכלי מזהה אוטומטית את המפריד. אם הזיהוי האוטומטי טועה, פתח את אפשרויות המפריד ובחר נקודה-פסיק ידנית.
האם פלט ה-JSON ממוזער או מעוצב?
הפלט מעוצב כברירת מחדל לקריאות. אפשר להעתיק את הפלט ולמזערו באמצעות כלי JSON Viewer אם נדרשת גרסה דחוסה בשורה אחת.
Browser Converter vs. Python csv Module vs. Dedicated ETL
Python's `csv` module combined with `json.dumps` gives you full control but requires writing and running code. Dedicated ETL tools add scheduling and monitoring that are overkill for a one-time conversion. Spreadsheet macros can do it but produce inconsistent output depending on locale settings. A browser-based converter is the fastest path from a CSV file to a valid JSON array when you need the result immediately and reproducibility is not a requirement.
כלים קשורים
JSON ל-CSV
המר מערך אובייקטי JSON לפורמט CSV מיידית בדפדפן.
צופה CSV ושולחן חכם
פתח כל קובץ CSV כטבלה אינטראקטיבית חכמה: מיין עמודות, סנן שורות, ערוך תאים בזמן אמת וייצא ל-CSV, XLS או XLSX. הכול בדפדפן, ללא הרשמה.
JSON Viewer, Formatter & Editor
צפה, ערוך ועצב JSON בעץ אינטראקטיבי חי. עריכת ערכים inline, שינוי שם מפתחות, הוספה/הסרה של צמתים, תמיכה בהערות JSONC וייצוא בלחיצה אחת — הכל בדפדפן שלך.
ממיר CSV ל-JSON של FileCrank הופך שורות CSV למערך אובייקטי JSON, מזהה מפרידים אוטומטית וממפה את השורה הראשונה כמפתחות אובייקט, לחלוטין בדפדפן שלך.
Advertisement