تخطى إلى المحتوى الرئيسي

محوّل CSV إلى JSON

حوّل بيانات CSV إلى مصفوفة كائنات JSON فورًا في متصفحك.

Input
0 chars | 0 bytes
Output
0 chars | 0 bytes

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. 1

    الصق CSV

    الصق نص CSV في الإدخال. تكتشف الأداة تلقائيًا الفاصل (فاصلة، فاصلة منقوطة، تبويب، أو أنبوب).

  2. 2

    ربط الرؤوس بالمفاتيح

    يصبح الصف الأول مفاتيح كائنات JSON افتراضيًا. بدّل 'بلا صف رأس' لتوليد مفاتيح رقمية عوضًا عن ذلك.

  3. 3

    انسخ إخراج JSON

    انسخ إخراج JSON المنسّق أو استخدم زر التبديل لفتح النتيجة في عارض JSON.

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 تلقائيًا.
  • ✓ إخراج منسّق جاهز للصقه في الكود.
  • ✓ يعمل بالكامل في المتصفح — لا تُرسل بيانات إلى أي خادم.

الميزات والمواصفات

أقصى حجم للملف
حتى 100 ميغابايت
الخصوصية
تُحذف الملفات بعد نحو ساعة
السعر
مجاني، بدون تسجيل
المعالجة
100% على الجهاز
دعم الحافظة
One-click copy to clipboard
بياناتك لا تغادر متصفحك — كل المعالجة محلية.لا حاجة لحساب أو تسجيل.مجاني بلا حدود للاستخدام.

الأسئلة الشائعة

هل يصبح الصف الأول من CSV مفاتيح JSON؟

نعم. افتراضيًا يُعامَل الصف الأول كصف رأس ويصبح أسماء المفاتيح في كل كائن JSON. إذا لم يكن في CSV صف رأس، بدّل خيار 'بلا صف رأس' وستُولّد الأداة مفاتيح رقمية (col_0، col_1 إلخ).

ماذا يحدث إذا كانت صفوف CSV بأعداد أعمدة مختلفة؟

الصفوف التي تحتوي على أعمدة أقل من الرأس ستحصل على قيم null للمفاتيح المفقودة. الصفوف التي تحتوي على أعمدة أكثر ستُتجاهل القيم الإضافية مع ظهور تحذير.

كيف أتعامل مع CSV يستخدم الفاصلة المنقوطة بدلاً من الفاصلة؟

تكتشف الأداة الفاصل تلقائيًا. إذا أخطأ الاكتشاف التلقائي، افتح خيارات الفاصل وحدد الفاصلة المنقوطة يدويًا.

هل إخراج JSON مضغوط أم منسّق؟

الإخراج منسّق افتراضيًا لسهولة القراءة. يمكنك نسخ الإخراج وضغطه باستخدام أداة عارض JSON إذا كنت تحتاج نسخة مضغوطة بسطر واحد.

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.

محوّل CSV إلى JSON من FileCrank يُحوّل صفوف CSV إلى مصفوفة كائنات JSON مع اكتشاف تلقائي للفواصل وتعيين الصف الأول كمفاتيح، بالكامل في متصفحك.

Advertisement

Ad